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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp

Issue 2781693002: Apply CSS clip to foreground and background clip rects. (Closed)
Patch Set: none Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
index e7dbd7470e30caf86a33b8fdbd7f87425e17ed8d..ac670bf730d2374730a42870f98319e2bd4f9368 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
@@ -457,6 +457,13 @@ void PaintLayerClipper::calculateClipRectWithGeometryMapper(
DCHECK(ancestorProperties && ancestorProperties->localBorderBoxProperties());
PropertyTreeState destinationPropertyTreeState =
*ancestorProperties->localBorderBoxProperties();
+ // CSS clip of the root is always applied.
+ if (ancestorProperties->cssClip()) {
+ DCHECK(destinationPropertyTreeState.clip() ==
+ ancestorProperties->cssClip());
+ destinationPropertyTreeState.setClip(
+ ancestorProperties->cssClip()->parent());
+ }
if (&m_layer == context.rootLayer) {
// Set the overflow clip for |propertyTreeState| so that it differs from
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerClipperTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698