Index: Source/core/paint/DeprecatedPaintLayer.h |
diff --git a/Source/core/paint/DeprecatedPaintLayer.h b/Source/core/paint/DeprecatedPaintLayer.h |
index 032cdf2cdc32e74828f97b9bcf3e0f9a023b7217..63445a6946ab917261374263d3efeb7273452f29 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(); } |
+ // 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; |
jbroman
2015/09/09 19:58:30
nit: "locationExcludingOverflowScroll", please? I
trchen
2015/09/15 04:48:40
Done.
|
// 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, |