Index: third_party/WebKit/Source/core/layout/LayoutObject.h |
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h |
index 9478663edcbf5e65713cc1e1ee9934fde431f183..8da311d5d49b3d339b2e5682c7452cf5c40e765b 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h |
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h |
@@ -95,6 +95,12 @@ enum MapCoordinatesMode { |
UseTransforms = 1 << 1, |
ApplyContainerFlip = 1 << 2, |
TraverseDocumentBoundaries = 1 << 3, |
+ |
+ // Applies to LayoutView::mapLocalToAncestor() and LayoutView::mapToVisibleRectInAncestorSpace() |
+ // only, to indicate the input point or rect is in frame coordinates instead of frame contents |
+ // coordinates. This disables view clipping and scroll offset adjustment. |
+ // TODO(wangxianzhu): Remove this when root-layer-scrolls launches. |
+ InputIsInFrameCoordinates = 1 << 4, |
}; |
typedef unsigned MapCoordinatesFlags; |
@@ -323,7 +329,7 @@ public: |
layoutObject->assertLaidOut(); |
} |
- void assertClearedPaintInvalidationState() const |
+ void assertClearedPaintInvalidationFlags() const |
{ |
#ifndef NDEBUG |
if (paintInvalidationStateIsDirty()) { |
@@ -333,10 +339,10 @@ public: |
#endif |
} |
- void assertSubtreeClearedPaintInvalidationState() const |
+ void assertSubtreeClearedPaintInvalidationFlags() const |
{ |
for (const LayoutObject* layoutObject = this; layoutObject; layoutObject = layoutObject->nextInPreOrder()) |
- layoutObject->assertClearedPaintInvalidationState(); |
+ layoutObject->assertClearedPaintInvalidationFlags(); |
} |
#endif |
@@ -991,7 +997,7 @@ public: |
// If TraverseDocumentBoundaries is specified, the result will be in the space of the local root frame. |
// Otherwise, the result will be in the space of the containing frame. |
FloatQuad localToAncestorQuad(const FloatQuad&, const LayoutBoxModelObject* ancestor, MapCoordinatesFlags = 0, bool* wasFixed = nullptr) const; |
- FloatPoint localToAncestorPoint(const FloatPoint&, const LayoutBoxModelObject* ancestor, MapCoordinatesFlags = 0, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const; |
+ FloatPoint localToAncestorPoint(const FloatPoint&, const LayoutBoxModelObject* ancestor, MapCoordinatesFlags = 0, bool* wasFixed = nullptr) const; |
void localToAncestorRects(Vector<LayoutRect>&, const LayoutBoxModelObject* ancestor, const LayoutPoint& preOffset, const LayoutPoint& postOffset) const; |
// Return the transformation matrix to map points from local to the coordinate system of a container, taking transforms into account. |
@@ -1103,17 +1109,6 @@ public: |
bool isPaintInvalidationContainer() const; |
- LayoutRect computePaintInvalidationRect() |
- { |
- return computePaintInvalidationRect(containerForPaintInvalidation()); |
- } |
- |
- // Returns the paint invalidation rect for this LayoutObject in the coordinate space of the paint backing (typically a GraphicsLayer) for |paintInvalidationContainer|. |
- LayoutRect computePaintInvalidationRect(const LayoutBoxModelObject& paintInvalidationContainer, const PaintInvalidationState* = nullptr) const; |
- |
- // Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the layoutObject backing of |paintInvalidationContainer| |
- LayoutRect boundsRectForPaintInvalidation(const LayoutBoxModelObject& paintInvalidationContainer, const PaintInvalidationState* = nullptr) const; |
- |
// Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space |
// of the GraphicsLayer backing of |paintInvalidationContainer|. Note that this coordinaten space is not the same |
// as the local coordinate space of |paintInvalidationContainer| in the presence of layer squashing. |
@@ -1140,7 +1135,10 @@ public: |
// Returns the rect that should have paint invalidated whenever this object changes. The rect is in the view's |
// coordinate space. This method deals with outlines and overflow. |
virtual LayoutRect absoluteClippedOverflowRect() const; |
- virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const; |
+ |
+ // Returns the rect that should have paint invalidated whenever this object changes. The rect is in the object's |
+ // local coordinate space. |
+ virtual LayoutRect localOverflowRectForPaintInvalidation() const; |
// Given a rect in the object's coordinate space, compute a rect in the coordinate space of |ancestor|. If |
// intermediate containers have clipping or scrolling of any kind, it is applied; but overflow clipping is |
@@ -1151,7 +1149,7 @@ public: |
// to the return value of this method. Otherwise, clipping operations will use LayoutRect::intersect, |
// and the return value will be true only if the clipped rect has non-zero area. |
// See the documentation for LayoutRect::inclusiveIntersect for more information. |
- virtual bool mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect&, const PaintInvalidationState*, VisibleRectFlags = DefaultVisibleRectFlags) const; |
+ virtual bool mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect&, VisibleRectFlags = DefaultVisibleRectFlags) const; |
// Return the offset to the column in which the specified point (in flow-thread coordinates) |
// lives. This is used to convert a flow-thread point to a visual point. |
@@ -1174,8 +1172,8 @@ public: |
bool canUpdateSelectionOnRootLineBoxes() const; |
// A single rectangle that encompasses all of the selected objects within this object. Used to determine the tightest |
- // possible bounding box for the selection. The rect returned is in the coordinate space of the paint invalidation container's backing. |
- virtual LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObject* /* paintInvalidationContainer */) const { return LayoutRect(); } |
+ // possible bounding box for the selection. The rect returned is in the object's local coordinate space. |
+ virtual LayoutRect localSelectionRect() const { return LayoutRect(); } |
// View coordinates means the coordinate space of |view()|. |
LayoutRect selectionRectInViewCoordinates() const; |
@@ -1251,7 +1249,7 @@ public: |
// Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use |
// localToAbsolute/absoluteToLocal methods instead. |
- virtual void mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const; |
+ virtual void mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr) const; |
// If the LayoutBoxModelObject ancestor is non-null, the input quad is in the space of the ancestor. |
// Otherwise: |
// If TraverseDocumentBoundaries is specified, the input quad is in the space of the local root frame. |
@@ -1368,8 +1366,6 @@ public: |
return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation(); |
} |
- virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !hasTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWritingMode(); } |
- |
virtual LayoutRect viewRect() const; |
void invalidateDisplayItemClient(const DisplayItemClient&) const; |