Skip to content
  • weinig@apple.com's avatar
    WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=29760 · a09f5201
    weinig@apple.com authored
    Implement CSSOM Range.getClientRects/getBoundingClientRect 
    
    Reviewed by Dan Bernstein.
    
    Tests: fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html
           fast/dom/Range/getBoundingClientRect.html
           fast/dom/Range/getClientRects.html
    
    * dom/Range.cpp:
    (WebCore::Range::getClientRects):
    (WebCore::Range::getBoundingClientRect):
    (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoom):
    (WebCore::Range::getBorderAndTextQuads):
    * dom/Range.h:
    * dom/Range.idl:
    Implement Range.getClientRects/getBoundingClientRect.
    
    * dom/Element.cpp:
    * rendering/RenderObject.h: 
    (WebCore::adjustForAbsoluteZoom):
    (WebCore::adjustIntRectForAbsoluteZoom):
    (WebCore::adjustFloatPointForAbsoluteZoom):
    (WebCore::adjustFloatQuadForAbsoluteZoom):
    Move point/quad adjustment methods from Element.cpp to RenderObject.h
    so that Range.cpp can use them as well.
    
    LayoutTests: Tests for https://bugs.webkit.org/show_bug.cgi?id=29760
    Implement CSSOM Range.getClientRects/getBoundingClientRect 
    
    Reviewed by Dan Bernstein.
    
    * fast/dom/Element/getBoundingClientRect-expected.txt: Copied from LayoutTests/fast/dom/getBoundingClientRect-expected.txt.
    * fast/dom/Element/getBoundingClientRect-getClientRects-relative-to-viewport-expected.txt: Copied from LayoutTests/fast/dom/getBoundingClientRect-getClientRects-relative-to-viewport-expected.txt.
    * fast/dom/Element/getBoundingClientRect-getClientRects-relative-to-viewport.html: Copied from LayoutTests/fast/dom/getBoundingClientRect-getClientRects-relative-to-viewport.html.
    * fast/dom/Element/getBoundingClientRect.html: Copied from LayoutTests/fast/dom/getBoundingClientRect.html.
    * fast/dom/Element/getClientRects-expected.txt: Copied from LayoutTests/fast/dom/getClientRects-expected.txt.
    * fast/dom/Element/getClientRects.html: Copied from LayoutTests/fast/dom/getClientRects.html.
    * fast/dom/Range/getBoundingClientRect-expected.txt: Added.
    * fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport-expected.txt: Added.
    * fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html: Added.
    * fast/dom/Range/getBoundingClientRect.html: Added.
    * fast/dom/Range/getClientRects-expected.txt: Added.
    * fast/dom/Range/getClientRects.html: Added.
    * fast/dom/Window/window-properties-expected.txt:
    * fast/dom/getBoundingClientRect-expected.txt: Removed.
    * fast/dom/getBoundingClientRect-getClientRects-relative-to-viewport-expected.txt: Removed.
    * fast/dom/getBoundingClientRect-getClientRects-relative-to-viewport.html: Removed.
    * fast/dom/getBoundingClientRect.html: Removed.
    * fast/dom/getClientRects-expected.txt: Removed.
    * fast/dom/getClientRects.html: Removed.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a09f5201