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; |