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 5d2fd35f639e3007a10990c36d67e509ba720b84..dc527bc752cd3d4f5a61dde991cf74fea5dc2684 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h |
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h |
@@ -95,6 +95,10 @@ enum MapCoordinatesMode { |
UseTransforms = 1 << 1, |
ApplyContainerFlip = 1 << 2, |
TraverseDocumentBoundaries = 1 << 3, |
+ // Disable view clipping and scroll offset adjustment, used when map a rect from a LayoutView's |
+ // viewRect space (e.g. viewRect() itself or frame scrollbars). |
+ // TODO(wangxianzhu): Remove this when root-layer-scrolls launches. |
+ DontApplyFrameScrollOffsetAndClip = 1 << 4, |
trchen
2016/03/25 01:08:49
Just had an offline discussion with Xianzhu. I sug
Xianzhu
2016/03/25 16:35:55
Thanks for the input. Renamed to InputIsInFrameCoo
|
}; |
typedef unsigned MapCoordinatesFlags; |
@@ -323,7 +327,7 @@ public: |
layoutObject->assertLaidOut(); |
} |
- void assertClearedPaintInvalidationState() const |
+ void assertClearedPaintInvalidationFlags() const |
{ |
#ifndef NDEBUG |
if (paintInvalidationStateIsDirty()) { |
@@ -333,10 +337,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 +995,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 +1107,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,12 +1133,15 @@ 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 *not* |
// applied for |ancestor| itself. The output rect is suitable for purposes such as paint invalidation. |
- virtual void mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect&, const PaintInvalidationState*) const; |
+ virtual void mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect&) 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. |
@@ -1168,8 +1164,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; |
@@ -1245,7 +1241,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. |
@@ -1362,8 +1358,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; |