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

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

Issue 2194273002: Fix border radius on composited children. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Super hacky patch Created 4 years, 3 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/paint/PaintLayerClipper.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
index 214c5beccd500073757151192bf0383e8f21fb45..d36d6165fd64bb7a93b872befb38cb0d0f673e69 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp
@@ -189,7 +189,7 @@ LayoutRect PaintLayerClipper::localClipRect(const PaintLayer* clippingRootLayer)
}
void PaintLayerClipper::calculateRects(const ClipRectsContext& context, const LayoutRect& paintDirtyRect, LayoutRect& layerBounds,
- ClipRect& backgroundRect, ClipRect& foregroundRect, const LayoutPoint* offsetFromRoot) const
+ ClipRect& backgroundRect, ClipRect& foregroundRect, const LayoutPoint* offsetFromRoot, const bool addAncestorClips) const
{
bool isClippingRoot = &m_layer == context.rootLayer;
LayoutBoxModelObject& layoutObject = *m_layer.layoutObject();
@@ -212,9 +212,9 @@ void PaintLayerClipper::calculateRects(const ClipRectsContext& context, const La
layerBounds = LayoutRect(offset, LayoutSize(m_layer.size()));
// Update the clip rects that will be passed to child layers.
- if ((layoutObject.hasOverflowClip() || layoutObject.styleRef().containsPaint()) && shouldRespectOverflowClip(context)) {
+ if (addAncestorClips || ((layoutObject.hasOverflowClip() || layoutObject.styleRef().containsPaint()) && shouldRespectOverflowClip(context))) {
foregroundRect.intersect(toLayoutBox(layoutObject).overflowClipRect(offset, context.overlayScrollbarClipBehavior));
- if (layoutObject.styleRef().hasBorderRadius())
+ if (layoutObject.styleRef().hasBorderRadius() || addAncestorClips)
chrishtr 2016/10/21 23:16:20 What does this one achieve? It seems to force sett
Stephen Chennney 2016/10/24 20:15:27 This is the hackish part of the whole thing. It's
foregroundRect.setHasRadius(true);
// FIXME: Does not do the right thing with columns yet, since we don't yet factor in the

Powered by Google App Engine
This is Rietveld 408576698