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

Unified Diff: third_party/WebKit/Source/core/paint/LayerClipRecorder.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/LayerClipRecorder.cpp
diff --git a/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp b/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
index 44470cca68a5ce631f99b1453e85e930080470b5..9e33e9b87324b19f0a11540024748c4bb3613513 100644
--- a/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
+++ b/third_party/WebKit/Source/core/paint/LayerClipRecorder.cpp
@@ -71,6 +71,18 @@ void LayerClipRecorder::collectRoundedRectClips(PaintLayer& paintLayer, const Pa
if (layer == localPaintingInfo.rootLayer)
break;
}
+
+ // TODO(schenney): Not right, but hack to get something that applies a radius then figure out the correct way to do it.
chrishtr 2016/10/21 23:15:08 This is to get the right positioning relative to t
Stephen Chennney 2016/10/24 20:15:27 Yes, the clipping container is in one layer (the p
+ if (paintFlags & PaintLayerPaintingAncestorClippingMaskPhase) {
+ const LayoutObject* clippingContainer = paintLayer.clippingContainer();
+ LayoutPoint fragmentDelta(fragmentOffset);
+ paintLayer.convertToLayerCoords(paintLayer.root(), fragmentDelta);
+ LayoutPoint containerDelta;
+ clippingContainer->enclosingLayer()->convertToLayerCoords(clippingContainer->enclosingLayer()->root(), containerDelta);
+ LayoutPoint offset(containerDelta.x() - fragmentDelta.x(), containerDelta.y() - fragmentDelta.y());
+ LayoutSize size(toLayoutBox(clippingContainer) ? toLayoutBox(clippingContainer)->size() : LayoutSize(clippingContainer->enclosingLayer()->size()));
+ roundedRectClips.append(clippingContainer->style()->getRoundedInnerBorderFor(LayoutRect(offset, size)));
+ }
}
LayerClipRecorder::~LayerClipRecorder()

Powered by Google App Engine
This is Rietveld 408576698