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

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: stripped localPaintingInfo cleanup and fixed-pos workarounds 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 6e2d0a5ffcccb55359ba015658bb685d08319a7a..b2271f56112bd974c76dba04ab93a0873895fca2 100644
--- a/Source/core/paint/DeprecatedPaintLayer.h
+++ b/Source/core/paint/DeprecatedPaintLayer.h
@@ -152,7 +152,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 : locationExcludingOverflowScroll(); }
+ // 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 locationExcludingOverflowScroll() 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; }
@@ -237,7 +245,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,

Powered by Google App Engine
This is Rietveld 408576698