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

Unified Diff: Source/core/rendering/RenderObject.h

Issue 898783003: Move rendering/RenderLayer* to layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months 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
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index 2338e8266e8a72c059078893967acebacacb394d..55256c39e68cc6a940b0c901fb114a45eeafc3d5 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -66,8 +66,8 @@ class RenderBoxModelObject;
class RenderBlock;
class RenderFlowThread;
class RenderGeometryMap;
-class RenderLayer;
-class RenderLayerModelObject;
+class Layer;
+class LayoutLayerModelObject;
class RenderMultiColumnSpannerPlaceholder;
class RenderView;
class TransformState;
@@ -119,7 +119,7 @@ struct AnnotatedRegionValue {
bool draggable;
};
-typedef WTF::HashMap<const RenderLayer*, Vector<LayoutRect> > LayerHitTestRects;
+typedef WTF::HashMap<const Layer*, Vector<LayoutRect>> LayerHitTestRects;
#ifndef NDEBUG
const int showTreeCharacterOffset = 39;
@@ -129,8 +129,8 @@ const int showTreeCharacterOffset = 39;
class RenderObject : public ImageResourceClient {
friend class RenderBlock;
friend class RenderBlockFlow;
- friend class RenderLayerReflectionInfo; // For setParent
- friend class RenderLayerScrollableArea; // For setParent.
+ friend class LayerReflectionInfo; // For setParent
+ friend class LayerScrollableArea; // For setParent.
friend class RenderObjectChildList;
WTF_MAKE_NONCOPYABLE(RenderObject);
public:
@@ -178,11 +178,11 @@ public:
// The following six functions are used when the render tree hierarchy changes to make sure layers get
// properly added and removed. Since containership can be implemented by any subclass, and since a hierarchy
// can contain a mixture of boxes and other object types, these functions need to be in the base class.
- RenderLayer* enclosingLayer() const;
- void addLayers(RenderLayer* parentLayer);
- void removeLayers(RenderLayer* parentLayer);
- void moveLayers(RenderLayer* oldParent, RenderLayer* newParent);
- RenderLayer* findNextLayer(RenderLayer* parentLayer, RenderObject* startPoint, bool checkParent = true);
+ Layer* enclosingLayer() const;
+ void addLayers(Layer* parentLayer);
+ void removeLayers(Layer* parentLayer);
+ void moveLayers(Layer* oldParent, Layer* newParent);
+ Layer* findNextLayer(Layer* parentLayer, RenderObject* startPoint, bool checkParent = true);
// Scrolling is a RenderBox concept, however some code just cares about recursively scrolling our enclosing ScrollableArea(s).
bool scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX = ScrollAlignment::alignCenterIfNeeded, const ScrollAlignment& alignY = ScrollAlignment::alignCenterIfNeeded);
@@ -382,7 +382,7 @@ public:
virtual bool isImage() const { return false; }
virtual bool isInlineBlockOrInlineTable() const { return false; }
- virtual bool isLayerModelObject() const { return false; }
+ virtual bool isLayoutLayerModelObject() const { return false; }
virtual bool isRenderBlock() const { return false; }
virtual bool isRenderBlockFlow() const { return false; }
virtual bool isRenderFlowThread() const { return false; }
@@ -638,8 +638,8 @@ public:
// Returns the object containing this one. Can be different from parent for positioned elements.
// If paintInvalidationContainer and paintInvalidationContainerSkipped are not null, on return *paintInvalidationContainerSkipped
// is true if the renderer returned is an ancestor of paintInvalidationContainer.
- RenderObject* container(const RenderLayerModelObject* paintInvalidationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const;
- RenderBlock* containerForFixedPosition(const RenderLayerModelObject* paintInvalidationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const;
+ RenderObject* container(const LayoutLayerModelObject* paintInvalidationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const;
+ RenderBlock* containerForFixedPosition(const LayoutLayerModelObject* paintInvalidationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const;
virtual RenderObject* hoverAncestor() const { return parent(); }
@@ -763,11 +763,11 @@ public:
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 RenderLayerModelObject* paintInvalidatinoContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) const;
- FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0, const PaintInvalidationState* = 0) const;
+ FloatQuad localToContainerQuad(const FloatQuad&, const LayoutLayerModelObject* paintInvalidatinoContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) const;
+ FloatPoint localToContainerPoint(const FloatPoint&, const LayoutLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0, const PaintInvalidationState* = 0) const;
// Convert a local point into the coordinate system of backing coordinates. Also returns the backing layer if needed.
- FloatPoint localToInvalidationBackingPoint(const LayoutPoint&, RenderLayer** backingLayer = nullptr);
+ FloatPoint localToInvalidationBackingPoint(const LayoutPoint&, Layer** backingLayer = nullptr);
// Return the offset from the container() renderer (excluding transforms). In multi-column layout,
// different offsets apply at different points, so return the offset that applies to the given point.
@@ -830,11 +830,11 @@ public:
void getTextDecorations(unsigned decorations, AppliedTextDecoration& underline, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool quirksMode = false, bool firstlineStyle = false);
- // Return the RenderLayerModelObject in the container chain which is responsible for painting this object, or 0
+ // Return the LayoutLayerModelObject in the container chain which is responsible for painting this object, or 0
// if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation'
// methods.
- const RenderLayerModelObject* containerForPaintInvalidation() const;
- const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(const RenderLayerModelObject* paintInvalidationContainer) const;
+ const LayoutLayerModelObject* containerForPaintInvalidation() const;
+ const LayoutLayerModelObject* adjustCompositedContainerForSpecialAncestors(const LayoutLayerModelObject* paintInvalidationContainer) const;
bool isPaintInvalidationContainer() const;
LayoutRect computePaintInvalidationRect()
@@ -843,22 +843,22 @@ public:
}
// Returns the paint invalidation rect for this RenderObject in the coordinate space of the paint backing (typically a GraphicsLayer) for |paintInvalidationContainer|.
- LayoutRect computePaintInvalidationRect(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const;
+ LayoutRect computePaintInvalidationRect(const LayoutLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const;
// Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the rendering backing of |paintInvalidationContainer|
- LayoutRect boundsRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const;
+ LayoutRect boundsRectForPaintInvalidation(const LayoutLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) 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.
// If |paintInvalidationContainer| is 0, invalidate paints via the view.
// FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/363699.
- void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvalidationContainer, const LayoutRect&, PaintInvalidationReason) const;
+ void invalidatePaintUsingContainer(const LayoutLayerModelObject* paintInvalidationContainer, const LayoutRect&, PaintInvalidationReason) const;
// Invalidate the paint of a specific subrectangle within a given object. The rect |r| is in the object's coordinate space.
void invalidatePaintRectangle(const LayoutRect&) const;
- void invalidateSelectionIfNeeded(const RenderLayerModelObject&, PaintInvalidationReason);
+ void invalidateSelectionIfNeeded(const LayoutLayerModelObject&, PaintInvalidationReason);
// Walk the tree after layout issuing paint invalidations for renderers that have changed or moved, updating bounds that have changed, and clearing paint invalidation state.
virtual void invalidateTreeIfNeeded(const PaintInvalidationState&);
@@ -871,12 +871,12 @@ 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 RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const;
- virtual LayoutRect rectWithOutlineForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalidationState* = 0) const;
+ virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const;
+ virtual LayoutRect rectWithOutlineForPaintInvalidation(const LayoutLayerModelObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalidationState* = 0) const;
// Given a rect in the object's coordinate space, compute a rect suitable for invalidating paints of
// that rect in the coordinate space of paintInvalidationContainer.
- virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const;
+ virtual void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject* paintInvalidationContainer, 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.
@@ -908,7 +908,7 @@ public:
// 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 RenderLayerModelObject* /*paintInvalidationContainer*/) const { return LayoutRect(); }
+ virtual LayoutRect selectionRectForPaintInvalidation(const LayoutLayerModelObject* /*paintInvalidationContainer*/) const { return LayoutRect(); }
virtual bool canBeSelectionLeaf() const { return false; }
bool hasSelectedChildren() const { return selectionState() != SelectionNone; }
@@ -976,12 +976,12 @@ 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 RenderLayerModelObject* paintInvalidationContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const;
+ virtual void mapLocalToContainer(const LayoutLayerModelObject* paintInvalidationContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const;
virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const;
// Pushes state onto RenderGeometryMap about how to map coordinates from this renderer to its container, or ancestorToStopAt (whichever is encountered first).
// Returns the renderer which was mapped to (container or ancestorToStopAt).
- virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const;
+ virtual const RenderObject* pushMappingToContainer(const LayoutLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const;
bool shouldUseTransformFromContainer(const RenderObject* container) const;
void getTransformFromContainer(const RenderObject* container, const LayoutSize& offsetInContainer, TransformationMatrix&) const;
@@ -1153,24 +1153,24 @@ protected:
void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_node = document; }
// Add hit-test rects for the render tree rooted at this node to the provided collection on a
- // per-RenderLayer basis.
+ // per-Layer basis.
// currentLayer must be the enclosing layer, and layerOffset is the current offset within
// this layer. Subclass implementations will add any offset for this renderer within it's
// container, so callers should provide only the offset of the container within it's layer.
// containerRect is a rect that has already been added for the currentLayer which is likely to
// be a container for child elements. Any rect wholly contained by containerRect can be
// skipped.
- virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const;
+ virtual void addLayerHitTestRects(LayerHitTestRects&, const Layer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const;
// Add hit-test rects for this renderer only to the provided list. layerOffset is the offset
// of this renderer within the current layer that should be used for each result.
virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const { };
- virtual PaintInvalidationReason paintInvalidationReason(const RenderLayerModelObject& paintInvalidationContainer,
+ virtual PaintInvalidationReason paintInvalidationReason(const LayoutLayerModelObject& paintInvalidationContainer,
const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositionFromPaintInvalidationBacking,
const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositionFromPaintInvalidationBacking) const;
- virtual void incrementallyInvalidatePaint(const RenderLayerModelObject& paintInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds, const LayoutPoint& positionFromPaintInvalidationBacking);
- void fullyInvalidatePaint(const RenderLayerModelObject& paintInvalidationContainer, PaintInvalidationReason, const LayoutRect& oldBounds, const LayoutRect& newBounds);
+ virtual void incrementallyInvalidatePaint(const LayoutLayerModelObject& paintInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds, const LayoutPoint& positionFromPaintInvalidationBacking);
+ void fullyInvalidatePaint(const LayoutLayerModelObject& paintInvalidationContainer, PaintInvalidationReason, const LayoutRect& oldBounds, const LayoutRect& newBounds);
#if ENABLE(ASSERT)
virtual bool paintInvalidationStateIsDirty() const
@@ -1180,7 +1180,7 @@ protected:
#endif
virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState);
- virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidationState&, const RenderLayerModelObject& paintInvalidationContainer);
+ virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidationState&, const LayoutLayerModelObject& paintInvalidationContainer);
// When this object is invalidated for paint, this method is called to invalidate any DisplayItemClients
// owned by this object, including the object itself, RenderText/RenderInline line boxes, scrollbars, etc.,
@@ -1198,12 +1198,12 @@ private:
}
void clearLayoutDidGetCalledSinceLastFrame() { m_bitfields.setLayoutDidGetCalledSinceLastFrame(false); }
- void invalidatePaintIncludingNonCompositingDescendantsInternal(const RenderLayerModelObject* repaintContainer);
+ void invalidatePaintIncludingNonCompositingDescendantsInternal(const LayoutLayerModelObject* repaintContainer);
LayoutRect previousSelectionRectForPaintInvalidation() const;
void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&);
- const RenderLayerModelObject* enclosingCompositedContainer() const;
+ const LayoutLayerModelObject* enclosingCompositedContainer() const;
RenderFlowThread* locateFlowThreadContainingBlock() const;
void removeFromRenderFlowThread();
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698