Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 2241663002: Take CSS Clip and contain: paint into account when computing visual rects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
index 57cfc9ebe551b980838e02bad3c29dddd71c6cfb..5eecea33f8aaaed42a80ed7258f8f5c4f0044142 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -581,14 +581,8 @@ bool CompositedLayerMapping::updateGraphicsLayerConfiguration()
static IntRect clipBox(LayoutBox* layoutObject)
{
- LayoutRect result = LayoutRect(LayoutRect::infiniteIntRect());
- if (layoutObject->hasOverflowClip() || layoutObject->style()->containsPaint())
- result = layoutObject->overflowClipRect(LayoutPoint());
-
- if (layoutObject->hasClip())
- result.intersect(layoutObject->clipRect(LayoutPoint()));
-
- return pixelSnappedIntRect(result);
+ // TODO(chrishtr): pixel snapping is most likely incorrect here.
+ return pixelSnappedIntRect(layoutObject->clippingRect());
}
static LayoutPoint computeOffsetFromCompositedAncestor(const PaintLayer* layer, const PaintLayer* compositedAncestor)
« no previous file with comments | « third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698