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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2194273002: Fix border radius on composited children. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update the comment on why we say an empty div can paint Created 4 years 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 894f7d8e93f14ad42f8ad43f5a2f0513a35b4157..cfe134a8b9bd8c820b2ee6657e6b5f0d927994cc 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -2257,6 +2257,13 @@ bool LayoutBox::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const {
return false;
}
+ // If the box paints into its own backing, we can assume that it's painting
+ // may have some effect. For example, honoring the border-radius clip on
+ // a composited child paints into a mask for an otherwise non-painting
+ // element, because children of that element will require the mask.
+ if (hasLayer() && layer()->compositingState() == PaintsIntoOwnBacking)
+ return false;
+
return true;
}

Powered by Google App Engine
This is Rietveld 408576698