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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 1537133002: Renaming: distinguish ancestor, container and paintInvalidationContainer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SelectionInvalidation
Patch Set: Created 5 years 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: 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 9dc0b5094de889a7125c21973688d48edbafdbe6..c6d38abfe033d2b30be4aa25f2b328063490d934 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -775,13 +775,12 @@ public:
// It is also used for correctly sizing absolutely positioned elements
// (point 3 above).
//
- // If |paintInvalidationContainer| and |paintInvalidationContainerSkipped|
- // are not null, on return *paintInvalidationContainerSkipped is true if
- // the layoutObject returned is an ancestor of |paintInvalidationContainer|.
- LayoutObject* container(const LayoutBoxModelObject* paintInvalidationContainer = nullptr, bool* paintInvalidationContainerSkipped = nullptr) const;
+ // If |ancestor| and |ancestorSkipped| are not null, on return *ancestorSkipped
+ // is true if the layoutObject returned is an ancestor of |ancestor|.
+ LayoutObject* container(const LayoutBoxModelObject* ancestor = nullptr, bool* ancestorSkipped = nullptr) const;
LayoutObject* containerCrossingFrameBoundaries() const;
// Finds the container as if this object is fixed-position.
- LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* paintInvalidationContainer = nullptr, bool* paintInvalidationContainerSkipped = nullptr) const;
+ LayoutBlock* containerForFixedPosition(const LayoutBoxModelObject* ancestor = nullptr, bool* ancestorSkipped = nullptr) const;
// Finds the containing block as if this object is absolute-position.
LayoutBlock* containingBlockForAbsolutePosition() const;
@@ -941,15 +940,15 @@ public:
// Convert a local quad to absolute coordinates, taking transforms into account.
FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mode = 0, bool* wasFixed = nullptr) const
{
- return localToContainerQuad(quad, 0, mode, wasFixed);
+ return localToAncestorQuad(quad, nullptr, mode, wasFixed);
}
// Convert an absolute quad to local coordinates.
FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0) const;
// Convert a local quad into the coordinate system of container, taking transforms into account.
- FloatQuad localToContainerQuad(const FloatQuad&, const LayoutBoxModelObject* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = nullptr) const;
- FloatPoint localToContainerPoint(const FloatPoint&, const LayoutBoxModelObject* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const;
- void localToContainerRects(Vector<LayoutRect>&, const LayoutBoxModelObject* paintInvalidationContainer, const LayoutPoint& preOffset, const LayoutPoint& postOffset) const;
+ 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;
+ void localToAncestorRects(Vector<LayoutRect>&, const LayoutBoxModelObject* ancestor, const LayoutPoint& preOffset, const LayoutPoint& postOffset) const;
// Convert a local point into the coordinate system of backing coordinates. Also returns the backing layer if needed.
FloatPoint localToInvalidationBackingPoint(const LayoutPoint&, PaintLayer** backingLayer = nullptr);
@@ -1088,7 +1087,7 @@ public:
// rect in the coordinate space of paintInvalidationContainer. If intermediate containers have clipping or
// scrolling of any kind, it is applied; but overflow clipping is *not* applied for paintInvalidationContainer
// itself.
- virtual void mapToVisibleRectInContainerSpace(const LayoutBoxModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const;
+ virtual void mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect&, const PaintInvalidationState*) 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.
@@ -1191,7 +1190,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 mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const;
+ virtual void mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const;
virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const;
// Pushes state onto LayoutGeometryMap about how to map coordinates from this layoutObject to its container, or ancestorToStopAt (whichever is encountered first).
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutListMarker.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698