Changeset 110629 in webkit


Ignore:
Timestamp:
Mar 13, 2012 3:53:35 PM (12 years ago)
Author:
leviw@chromium.org
Message:

Revert RenderLayer::absoluteBoundingBox to an IntRect
https://bugs.webkit.org/show_bug.cgi?id=81017

Reviewed by Eric Seidel.

Reverting RenderLayer::absoluteBoundingBox to an (pixel snapped) IntRect. Whenever
possible, we use integers representing for absolute coordinates. This is especially
relevant for methods, such as this one, that are exported and used in platform code.

No new tests. No change in behavior.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::absoluteBoundingBox):

  • rendering/RenderLayer.h:

(RenderLayer):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForPosition): This intersects
the absolute bounding box with the FrameView, which uses all integer values. It's
the only use of absoluteBoundingBox in WebCore.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r110627 r110629  
     12012-03-13  Levi Weintraub  <leviw@chromium.org>
     2
     3        Revert RenderLayer::absoluteBoundingBox to an IntRect
     4        https://bugs.webkit.org/show_bug.cgi?id=81017
     5
     6        Reviewed by Eric Seidel.
     7
     8        Reverting RenderLayer::absoluteBoundingBox to an (pixel snapped) IntRect. Whenever
     9        possible, we use integers representing for absolute coordinates. This is especially
     10        relevant for methods, such as this one, that are exported and used in platform code.
     11
     12        No new tests. No change in behavior.
     13
     14        * rendering/RenderLayer.cpp:
     15        (WebCore::RenderLayer::absoluteBoundingBox):
     16        * rendering/RenderLayer.h:
     17        (RenderLayer):
     18        * rendering/RenderLayerCompositor.cpp:
     19        (WebCore::RenderLayerCompositor::requiresCompositingForPosition): This intersects
     20        the absolute bounding box with the FrameView, which uses all integer values. It's
     21        the only use of absoluteBoundingBox in WebCore.
     22
    1232012-03-13  Nat Duca  <nduca@chromium.org>
    224
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r110120 r110629  
    39203920}
    39213921
    3922 LayoutRect RenderLayer::absoluteBoundingBox() const
    3923 {
    3924     return boundingBox(root());
     3922IntRect RenderLayer::absoluteBoundingBox() const
     3923{
     3924    return pixelSnappedIntRect(boundingBox(root()));
    39253925}
    39263926
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r110120 r110629  
    476476    // Bounding box in the coordinates of this layer.
    477477    LayoutRect localBoundingBox() const;
    478     // Bounding box relative to the root.
    479     LayoutRect absoluteBoundingBox() const;
     478    // Pixel snapped bounding box relative to the root.
     479    IntRect absoluteBoundingBox() const;
    480480
    481481    void updateHoverActiveState(const HitTestRequest&, HitTestResult&);
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r110456 r110629  
    16111611    // Fixed position elements that are invisible in the current view don't get their own layer.
    16121612    FrameView* frameView = m_renderView->frameView();
    1613     if (frameView && !layer->absoluteBoundingBox().intersects(LayoutRect(frameView->scrollXForFixedPosition(), frameView->scrollYForFixedPosition(), frameView->layoutWidth(), frameView->layoutHeight())))
     1613    if (frameView && !layer->absoluteBoundingBox().intersects(IntRect(frameView->scrollXForFixedPosition(), frameView->scrollYForFixedPosition(), frameView->layoutWidth(), frameView->layoutHeight())))
    16141614        return false;
    16151615
Note: See TracChangeset for help on using the changeset viewer.