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

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

Issue 2923683002: Fix nested border radius with composited child. (Closed)
Patch Set: Split tests, check layer sizes, document Created 3 years, 6 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/PaintLayerPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
index 2d9eb0c4ca3a6d1d87618137e994a85af0e774c2..ed6b8695cf3742006909231deb71ebf26c7f05b3 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -427,15 +427,18 @@ PaintResult PaintLayerPainter::PaintLayerContents(
? kUncachedClipRects
: kPaintingClipRects;
LayoutPoint offset_to_clipper;
- PaintLayer* paint_layer_for_fragments = &paint_layer_;
+ const PaintLayer* paint_layer_for_fragments = &paint_layer_;
if (paint_flags & kPaintLayerPaintingAncestorClippingMaskPhase) {
- // Compute fragments and their clips with respect to the clipping
- // container. The paint rect is in this layer's space, so convert it
- // to the clipper's layer's space. The rootLayer is also changed to
- // the clipper's layer to simplify coordinate system adjustments.
- // The change to rootLayer must persist to correctly record the clips.
+ // Compute fragments and their clips with respect to the outermost
+ // clipping container. This handles nested border radius by including
+ // all of them in the mask.
+ //
+ // The paint rect is in this layer's space, so convert it to the clipper's
+ // layer's space. The rootLayer is also changed to the clipper's layer to
+ // simplify coordinate system adjustments. The change to rootLayer must
+ // persist to correctly record the clips.
paint_layer_for_fragments =
- paint_layer_.ClippingContainer()->EnclosingLayer();
+ paint_layer_.EnclosingLayerWithCompositedLayerMapping(kExcludeSelf);
local_painting_info.root_layer = paint_layer_for_fragments;
paint_layer_.ConvertToLayerCoords(local_painting_info.root_layer,
offset_to_clipper);
@@ -1010,9 +1013,6 @@ void PaintLayerPainter::PaintFragmentWithPhase(
break;
}
- // TODO(schenney): Nested border-radius clips are not applied to composited
- // children, probably due to an incorrect clipRoot.
- // https://bugs.chromium.org/p/chromium/issues/detail?id=672561
clip_recorder.emplace(context, paint_layer_.GetLayoutObject(), clip_type,
clip_rect, painting_info.root_layer,
fragment.pagination_offset, paint_flags,
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayerPaintingInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698