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

Unified Diff: Source/core/paint/DeprecatedPaintLayer.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/DeprecatedPaintLayer.h
diff --git a/Source/core/paint/DeprecatedPaintLayer.h b/Source/core/paint/DeprecatedPaintLayer.h
index 07155d41d34941c5cb88ad850524513c4390f61a..de5f19551991732529811697e8cd62967cb37592 100644
--- a/Source/core/paint/DeprecatedPaintLayer.h
+++ b/Source/core/paint/DeprecatedPaintLayer.h
@@ -142,7 +142,15 @@ public:
return curr;
}
- const LayoutPoint& location() const { ASSERT(!m_needsPositionUpdate); return m_location; }
+ enum LocationQueryBehavior {
+ IncludeScroll,
+ ExcludeScroll
+ };
+ LayoutPoint location(LocationQueryBehavior behavior = IncludeScroll) const { ASSERT(!m_needsPositionUpdate); return behavior == IncludeScroll ? m_location : locationExcludeOverflowScroll(); }
pdr. 2015/09/03 06:16:59 With SPV2, won't all location(...)/convertToLayerC
trchen 2015/09/04 06:10:14 Better, we can exclude scroll offset in the beginn
+ // Note: This function is only needed during the transition period to SPv2.
+ // Once we have eliminated layer-based hit testing and clipping,
+ // we can cache the unscrolled location instead.
+ LayoutPoint locationExcludeOverflowScroll() const;
// FIXME: size() should ASSERT(!m_needsPositionUpdate) as well, but that fails in some tests,
// for example, fast/repaint/clipped-relative.html.
const IntSize& size() const { return m_size; }
@@ -227,7 +235,7 @@ public:
return !layoutObject()->hasTransformRelatedProperty() && !layoutObject()->isSVGRoot();
}
- void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutPoint&) const;
+ void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutPoint&, LocationQueryBehavior = IncludeScroll) const;
void convertToLayerCoords(const DeprecatedPaintLayer* ancestorLayer, LayoutRect&) const;
// Does the same as convertToLayerCoords() when not in multicol. For multicol, however,
@@ -245,7 +253,7 @@ public:
// Bounding box relative to some ancestor layer. Pass offsetFromRoot if known.
LayoutRect physicalBoundingBox(const DeprecatedPaintLayer* ancestorLayer, const LayoutPoint* offsetFromRoot = 0) const;
- LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const DeprecatedPaintLayer* ancestorLayer, const LayoutPoint& offsetFromRoot) const;
+ LayoutRect physicalBoundingBoxIncludingReflectionAndStackingChildren(const LayoutPoint& offsetFromRoot) const;
pdr. 2015/09/03 06:16:59 Lets pull the physicalBoundingBoxIncludingReflecti
trchen 2015/09/04 06:10:14 Good point! Done.
LayoutRect fragmentsBoundingBox(const DeprecatedPaintLayer* ancestorLayer) const;
LayoutRect boundingBoxForCompositingOverlapTest() const;

Powered by Google App Engine
This is Rietveld 408576698