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

Unified Diff: Source/core/paint/LayerClipRecorder.h

Issue 1284203004: Generate scroll/clip display item hierarchy for SPv2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix failing test. Update test expectation. Created 5 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: Source/core/paint/LayerClipRecorder.h
diff --git a/Source/core/paint/LayerClipRecorder.h b/Source/core/paint/LayerClipRecorder.h
index b1f93ed8a892d6c249456fd98c1990c68323b069..8534e014334e2851ecb50491b2c7a633a7556404 100644
--- a/Source/core/paint/LayerClipRecorder.h
+++ b/Source/core/paint/LayerClipRecorder.h
@@ -16,6 +16,7 @@ namespace blink {
class ClipRect;
class GraphicsContext;
+class LayoutBox;
class LayoutBoxModelObject;
class CORE_EXPORT LayerClipRecorder {
@@ -35,7 +36,14 @@ public:
// same time we pass a fragmentOffset, so that we can translate from flow thread coordinates to
// visual coordinates. This may look rather confusing/redundant, but it is needed for rounded
// border clipping. Would be nice to clean up this.
- explicit LayerClipRecorder(GraphicsContext&, const LayoutBoxModelObject&, DisplayItem::Type, const ClipRect&, const DeprecatedPaintLayerPaintingInfo* localPaintingInfo, const LayoutPoint& fragmentOffset, PaintLayerFlags, BorderRadiusClippingRule = IncludeSelfForBorderRadius);
+ LayerClipRecorder(GraphicsContext&, const LayoutBoxModelObject&, DisplayItem::Type, const ClipRect&, const DeprecatedPaintLayerPaintingInfo*, const LayoutPoint& fragmentOffset, PaintLayerFlags, BorderRadiusClippingRule = IncludeSelfForBorderRadius);
+
+ // Note: This constructor is designed for SPv2, and has drastically different semantics than
+ // the other version above. In the old layer painting model, a layer is responsible for
+ // calculating the accumulated clip from ancestors, and applies the clip to itself.
+ // In SPv2, it is the layer that establishes overflow clipping who is responsible to clip
+ // its descendants. This constructor takes a layer, and only issues clip for that layer.
+ LayerClipRecorder(GraphicsContext&, const LayoutBox&, const LayoutPoint& paintOffset);
pdr. 2015/09/03 06:16:59 Because the two modes for LayerClipRecorder are so
trchen 2015/09/04 06:10:15 Done.
~LayerClipRecorder();

Powered by Google App Engine
This is Rietveld 408576698