Skip to content
Permalink
Browse files
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.


Canonical link: https://commits.webkit.org/98205@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
leviw committed Mar 13, 2012
1 parent da154a5 commit e79cb9773371a49a060fbb8aae79650b82526f19
Showing 4 changed files with 27 additions and 5 deletions.
@@ -1,3 +1,25 @@
2012-03-13 Levi Weintraub <leviw@chromium.org>

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.

2012-03-13 Nat Duca <nduca@chromium.org>

[chromium] vsync ticks are needed in invisible tabs when we are still updating resources
@@ -3919,9 +3919,9 @@ LayoutRect RenderLayer::boundingBox(const RenderLayer* ancestorLayer) const
return result;
}

LayoutRect RenderLayer::absoluteBoundingBox() const
IntRect RenderLayer::absoluteBoundingBox() const
{
return boundingBox(root());
return pixelSnappedIntRect(boundingBox(root()));
}

void RenderLayer::clearClipRectsIncludingDescendants()
@@ -475,8 +475,8 @@ class RenderLayer : public ScrollableArea
LayoutRect boundingBox(const RenderLayer* rootLayer) const;
// Bounding box in the coordinates of this layer.
LayoutRect localBoundingBox() const;
// Bounding box relative to the root.
LayoutRect absoluteBoundingBox() const;
// Pixel snapped bounding box relative to the root.
IntRect absoluteBoundingBox() const;

void updateHoverActiveState(const HitTestRequest&, HitTestResult&);

@@ -1610,7 +1610,7 @@ bool RenderLayerCompositor::requiresCompositingForPosition(RenderObject* rendere

// Fixed position elements that are invisible in the current view don't get their own layer.
FrameView* frameView = m_renderView->frameView();
if (frameView && !layer->absoluteBoundingBox().intersects(LayoutRect(frameView->scrollXForFixedPosition(), frameView->scrollYForFixedPosition(), frameView->layoutWidth(), frameView->layoutHeight())))
if (frameView && !layer->absoluteBoundingBox().intersects(IntRect(frameView->scrollXForFixedPosition(), frameView->scrollYForFixedPosition(), frameView->layoutWidth(), frameView->layoutHeight())))
return false;

return true;

0 comments on commit e79cb97

Please sign in to comment.