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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 class HitTestLocation; 59 class HitTestLocation;
60 class HitTestResult; 60 class HitTestResult;
61 class InlineBox; 61 class InlineBox;
62 class Position; 62 class Position;
63 class PositionWithAffinity; 63 class PositionWithAffinity;
64 class PseudoStyleRequest; 64 class PseudoStyleRequest;
65 class RenderBoxModelObject; 65 class RenderBoxModelObject;
66 class RenderBlock; 66 class RenderBlock;
67 class RenderFlowThread; 67 class RenderFlowThread;
68 class RenderGeometryMap; 68 class RenderGeometryMap;
69 class RenderLayer; 69 class Layer;
70 class RenderLayerModelObject; 70 class LayoutLayerModelObject;
71 class RenderMultiColumnSpannerPlaceholder; 71 class RenderMultiColumnSpannerPlaceholder;
72 class RenderView; 72 class RenderView;
73 class TransformState; 73 class TransformState;
74 74
75 struct PaintInfo; 75 struct PaintInfo;
76 76
77 enum CursorDirective { 77 enum CursorDirective {
78 SetCursorBasedOnStyle, 78 SetCursorBasedOnStyle,
79 SetCursor, 79 SetCursor,
80 DoNotSetCursor 80 DoNotSetCursor
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 struct AnnotatedRegionValue { 112 struct AnnotatedRegionValue {
113 bool operator==(const AnnotatedRegionValue& o) const 113 bool operator==(const AnnotatedRegionValue& o) const
114 { 114 {
115 return draggable == o.draggable && bounds == o.bounds; 115 return draggable == o.draggable && bounds == o.bounds;
116 } 116 }
117 117
118 LayoutRect bounds; 118 LayoutRect bounds;
119 bool draggable; 119 bool draggable;
120 }; 120 };
121 121
122 typedef WTF::HashMap<const RenderLayer*, Vector<LayoutRect> > LayerHitTestRects; 122 typedef WTF::HashMap<const Layer*, Vector<LayoutRect>> LayerHitTestRects;
123 123
124 #ifndef NDEBUG 124 #ifndef NDEBUG
125 const int showTreeCharacterOffset = 39; 125 const int showTreeCharacterOffset = 39;
126 #endif 126 #endif
127 127
128 // Base class for all rendering tree objects. 128 // Base class for all rendering tree objects.
129 class RenderObject : public ImageResourceClient { 129 class RenderObject : public ImageResourceClient {
130 friend class RenderBlock; 130 friend class RenderBlock;
131 friend class RenderBlockFlow; 131 friend class RenderBlockFlow;
132 friend class RenderLayerReflectionInfo; // For setParent 132 friend class LayerReflectionInfo; // For setParent
133 friend class RenderLayerScrollableArea; // For setParent. 133 friend class LayerScrollableArea; // For setParent.
134 friend class RenderObjectChildList; 134 friend class RenderObjectChildList;
135 WTF_MAKE_NONCOPYABLE(RenderObject); 135 WTF_MAKE_NONCOPYABLE(RenderObject);
136 public: 136 public:
137 // Anonymous objects should pass the document as their node, and they will t hen automatically be 137 // Anonymous objects should pass the document as their node, and they will t hen automatically be
138 // marked as anonymous in the constructor. 138 // marked as anonymous in the constructor.
139 explicit RenderObject(Node*); 139 explicit RenderObject(Node*);
140 virtual ~RenderObject(); 140 virtual ~RenderObject();
141 141
142 virtual const char* renderName() const = 0; 142 virtual const char* renderName() const = 0;
143 143
(...skipping 27 matching lines...) Expand all
171 RenderObject* nextInPreOrderAfterChildren(const RenderObject* stayWithin) co nst; 171 RenderObject* nextInPreOrderAfterChildren(const RenderObject* stayWithin) co nst;
172 RenderObject* previousInPreOrder() const; 172 RenderObject* previousInPreOrder() const;
173 RenderObject* previousInPreOrder(const RenderObject* stayWithin) const; 173 RenderObject* previousInPreOrder(const RenderObject* stayWithin) const;
174 RenderObject* childAt(unsigned) const; 174 RenderObject* childAt(unsigned) const;
175 175
176 RenderObject* lastLeafChild() const; 176 RenderObject* lastLeafChild() const;
177 177
178 // The following six functions are used when the render tree hierarchy chang es to make sure layers get 178 // The following six functions are used when the render tree hierarchy chang es to make sure layers get
179 // properly added and removed. Since containership can be implemented by an y subclass, and since a hierarchy 179 // properly added and removed. Since containership can be implemented by an y subclass, and since a hierarchy
180 // can contain a mixture of boxes and other object types, these functions ne ed to be in the base class. 180 // can contain a mixture of boxes and other object types, these functions ne ed to be in the base class.
181 RenderLayer* enclosingLayer() const; 181 Layer* enclosingLayer() const;
182 void addLayers(RenderLayer* parentLayer); 182 void addLayers(Layer* parentLayer);
183 void removeLayers(RenderLayer* parentLayer); 183 void removeLayers(Layer* parentLayer);
184 void moveLayers(RenderLayer* oldParent, RenderLayer* newParent); 184 void moveLayers(Layer* oldParent, Layer* newParent);
185 RenderLayer* findNextLayer(RenderLayer* parentLayer, RenderObject* startPoin t, bool checkParent = true); 185 Layer* findNextLayer(Layer* parentLayer, RenderObject* startPoint, bool chec kParent = true);
186 186
187 // Scrolling is a RenderBox concept, however some code just cares about recu rsively scrolling our enclosing ScrollableArea(s). 187 // Scrolling is a RenderBox concept, however some code just cares about recu rsively scrolling our enclosing ScrollableArea(s).
188 bool scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX = ScrollAlignment::alignCenterIfNeeded, const ScrollAlignment& alignY = ScrollAlig nment::alignCenterIfNeeded); 188 bool scrollRectToVisible(const LayoutRect&, const ScrollAlignment& alignX = ScrollAlignment::alignCenterIfNeeded, const ScrollAlignment& alignY = ScrollAlig nment::alignCenterIfNeeded);
189 189
190 // Convenience function for getting to the nearest enclosing box of a Render Object. 190 // Convenience function for getting to the nearest enclosing box of a Render Object.
191 RenderBox* enclosingBox() const; 191 RenderBox* enclosingBox() const;
192 RenderBoxModelObject* enclosingBoxModelObject() const; 192 RenderBoxModelObject* enclosingBoxModelObject() const;
193 193
194 RenderBox* enclosingScrollableBox() const; 194 RenderBox* enclosingScrollableBox() const;
195 195
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 bool isTableSection() const { return isOfType(RenderObjectTableSection); } 375 bool isTableSection() const { return isOfType(RenderObjectTableSection); }
376 bool isTextArea() const { return isOfType(RenderObjectTextArea); } 376 bool isTextArea() const { return isOfType(RenderObjectTextArea); }
377 bool isTextControl() const { return isOfType(RenderObjectTextControl); } 377 bool isTextControl() const { return isOfType(RenderObjectTextControl); }
378 bool isTextField() const { return isOfType(RenderObjectTextField); } 378 bool isTextField() const { return isOfType(RenderObjectTextField); }
379 bool isVideo() const { return isOfType(RenderObjectVideo); } 379 bool isVideo() const { return isOfType(RenderObjectVideo); }
380 bool isWidget() const { return isOfType(RenderObjectWidget); } 380 bool isWidget() const { return isOfType(RenderObjectWidget); }
381 381
382 virtual bool isImage() const { return false; } 382 virtual bool isImage() const { return false; }
383 383
384 virtual bool isInlineBlockOrInlineTable() const { return false; } 384 virtual bool isInlineBlockOrInlineTable() const { return false; }
385 virtual bool isLayerModelObject() const { return false; } 385 virtual bool isLayoutLayerModelObject() const { return false; }
386 virtual bool isRenderBlock() const { return false; } 386 virtual bool isRenderBlock() const { return false; }
387 virtual bool isRenderBlockFlow() const { return false; } 387 virtual bool isRenderBlockFlow() const { return false; }
388 virtual bool isRenderFlowThread() const { return false; } 388 virtual bool isRenderFlowThread() const { return false; }
389 virtual bool isRenderInline() const { return false; } 389 virtual bool isRenderInline() const { return false; }
390 virtual bool isRenderPart() const { return false; } 390 virtual bool isRenderPart() const { return false; }
391 391
392 bool isDocumentElement() const { return document().documentElement() == m_no de; } 392 bool isDocumentElement() const { return document().documentElement() == m_no de; }
393 // isBody is called from RenderBox::styleWillChange and is thus quite hot. 393 // isBody is called from RenderBox::styleWillChange and is thus quite hot.
394 bool isBody() const { return node() && node()->hasTagName(HTMLNames::bodyTag ); } 394 bool isBody() const { return node() && node()->hasTagName(HTMLNames::bodyTag ); }
395 bool isHR() const; 395 bool isHR() const;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 631
632 Document& document() const { return m_node->document(); } 632 Document& document() const { return m_node->document(); }
633 LocalFrame* frame() const { return document().frame(); } 633 LocalFrame* frame() const { return document().frame(); }
634 634
635 virtual RenderMultiColumnSpannerPlaceholder* spannerPlaceholder() const { re turn 0; } 635 virtual RenderMultiColumnSpannerPlaceholder* spannerPlaceholder() const { re turn 0; }
636 bool isColumnSpanAll() const { return style()->columnSpan() == ColumnSpanAll && spannerPlaceholder(); } 636 bool isColumnSpanAll() const { return style()->columnSpan() == ColumnSpanAll && spannerPlaceholder(); }
637 637
638 // Returns the object containing this one. Can be different from parent for positioned elements. 638 // Returns the object containing this one. Can be different from parent for positioned elements.
639 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n ot null, on return *paintInvalidationContainerSkipped 639 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n ot null, on return *paintInvalidationContainerSkipped
640 // is true if the renderer returned is an ancestor of paintInvalidationConta iner. 640 // is true if the renderer returned is an ancestor of paintInvalidationConta iner.
641 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta iner = 0, bool* paintInvalidationContainerSkipped = 0) const; 641 RenderObject* container(const LayoutLayerModelObject* paintInvalidationConta iner = 0, bool* paintInvalidationContainerSkipped = 0) const;
642 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* paintIn validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; 642 RenderBlock* containerForFixedPosition(const LayoutLayerModelObject* paintIn validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const;
643 643
644 virtual RenderObject* hoverAncestor() const { return parent(); } 644 virtual RenderObject* hoverAncestor() const { return parent(); }
645 645
646 Element* offsetParent() const; 646 Element* offsetParent() const;
647 647
648 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0); 648 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec t* newRoot = 0, SubtreeLayoutScope* = 0);
649 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0); 649 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou tScope* = 0);
650 void setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior = MarkContaining BlockChain, SubtreeLayoutScope* = 0); 650 void setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior = MarkContaining BlockChain, SubtreeLayoutScope* = 0);
651 void clearNeedsLayout(); 651 void clearNeedsLayout();
652 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0); 652 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree LayoutScope* = 0);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 756
757 // Convert a local quad to absolute coordinates, taking transforms into acco unt. 757 // Convert a local quad to absolute coordinates, taking transforms into acco unt.
758 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod e = 0, bool* wasFixed = 0) const 758 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod e = 0, bool* wasFixed = 0) const
759 { 759 {
760 return localToContainerQuad(quad, 0, mode, wasFixed); 760 return localToContainerQuad(quad, 0, mode, wasFixed);
761 } 761 }
762 // Convert an absolute quad to local coordinates. 762 // Convert an absolute quad to local coordinates.
763 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0 ) const; 763 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0 ) const;
764 764
765 // Convert a local quad into the coordinate system of container, taking tran sforms into account. 765 // Convert a local quad into the coordinate system of container, taking tran sforms into account.
766 FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObjec t* paintInvalidatinoContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) cons t; 766 FloatQuad localToContainerQuad(const FloatQuad&, const LayoutLayerModelObjec t* paintInvalidatinoContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) cons t;
767 FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelOb ject* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0, c onst PaintInvalidationState* = 0) const; 767 FloatPoint localToContainerPoint(const FloatPoint&, const LayoutLayerModelOb ject* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0, c onst PaintInvalidationState* = 0) const;
768 768
769 // Convert a local point into the coordinate system of backing coordinates. Also returns the backing layer if needed. 769 // Convert a local point into the coordinate system of backing coordinates. Also returns the backing layer if needed.
770 FloatPoint localToInvalidationBackingPoint(const LayoutPoint&, RenderLayer** backingLayer = nullptr); 770 FloatPoint localToInvalidationBackingPoint(const LayoutPoint&, Layer** backi ngLayer = nullptr);
771 771
772 // Return the offset from the container() renderer (excluding transforms). I n multi-column layout, 772 // Return the offset from the container() renderer (excluding transforms). I n multi-column layout,
773 // different offsets apply at different points, so return the offset that ap plies to the given point. 773 // different offsets apply at different points, so return the offset that ap plies to the given point.
774 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin t&, bool* offsetDependsOnPoint = 0) const; 774 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin t&, bool* offsetDependsOnPoint = 0) const;
775 // Return the offset from an object up the container() chain. Asserts that n one of the intermediate objects have transforms. 775 // Return the offset from an object up the container() chain. Asserts that n one of the intermediate objects have transforms.
776 LayoutSize offsetFromAncestorContainer(const RenderObject*) const; 776 LayoutSize offsetFromAncestorContainer(const RenderObject*) const;
777 777
778 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { } 778 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { }
779 779
780 IntRect absoluteBoundingBoxRect() const; 780 IntRect absoluteBoundingBoxRect() const;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const; 823 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const;
824 824
825 struct AppliedTextDecoration { 825 struct AppliedTextDecoration {
826 Color color; 826 Color color;
827 TextDecorationStyle style; 827 TextDecorationStyle style;
828 AppliedTextDecoration() : color(Color::transparent), style(TextDecoratio nStyleSolid) { } 828 AppliedTextDecoration() : color(Color::transparent), style(TextDecoratio nStyleSolid) { }
829 }; 829 };
830 830
831 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false); 831 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false);
832 832
833 // Return the RenderLayerModelObject in the container chain which is respons ible for painting this object, or 0 833 // Return the LayoutLayerModelObject in the container chain which is respons ible for painting this object, or 0
834 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation' 834 // if painting is root-relative. This is the container that should be passed to the 'forPaintInvalidation'
835 // methods. 835 // methods.
836 const RenderLayerModelObject* containerForPaintInvalidation() const; 836 const LayoutLayerModelObject* containerForPaintInvalidation() const;
837 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c onst RenderLayerModelObject* paintInvalidationContainer) const; 837 const LayoutLayerModelObject* adjustCompositedContainerForSpecialAncestors(c onst LayoutLayerModelObject* paintInvalidationContainer) const;
838 bool isPaintInvalidationContainer() const; 838 bool isPaintInvalidationContainer() const;
839 839
840 LayoutRect computePaintInvalidationRect() 840 LayoutRect computePaintInvalidationRect()
841 { 841 {
842 return computePaintInvalidationRect(containerForPaintInvalidation()); 842 return computePaintInvalidationRect(containerForPaintInvalidation());
843 } 843 }
844 844
845 // Returns the paint invalidation rect for this RenderObject in the coordina te space of the paint backing (typically a GraphicsLayer) for |paintInvalidation Container|. 845 // Returns the paint invalidation rect for this RenderObject in the coordina te space of the paint backing (typically a GraphicsLayer) for |paintInvalidation Container|.
846 LayoutRect computePaintInvalidationRect(const RenderLayerModelObject* paintI nvalidationContainer, const PaintInvalidationState* = 0) const; 846 LayoutRect computePaintInvalidationRect(const LayoutLayerModelObject* paintI nvalidationContainer, const PaintInvalidationState* = 0) const;
847 847
848 // Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the rendering backing of |paintInvalidationContainer| 848 // Returns the rect bounds needed to invalidate the paint of this object, in the coordinate space of the rendering backing of |paintInvalidationContainer|
849 LayoutRect boundsRectForPaintInvalidation(const RenderLayerModelObject* pain tInvalidationContainer, const PaintInvalidationState* = 0) const; 849 LayoutRect boundsRectForPaintInvalidation(const LayoutLayerModelObject* pain tInvalidationContainer, const PaintInvalidationState* = 0) const;
850 850
851 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space 851 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space
852 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same 852 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same
853 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing. 853 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing.
854 // If |paintInvalidationContainer| is 0, invalidate paints via the view. 854 // If |paintInvalidationContainer| is 0, invalidate paints via the view.
855 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636 99. 855 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636 99.
856 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali dationContainer, const LayoutRect&, PaintInvalidationReason) const; 856 void invalidatePaintUsingContainer(const LayoutLayerModelObject* paintInvali dationContainer, const LayoutRect&, PaintInvalidationReason) const;
857 857
858 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space. 858 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space.
859 void invalidatePaintRectangle(const LayoutRect&) const; 859 void invalidatePaintRectangle(const LayoutRect&) const;
860 860
861 void invalidateSelectionIfNeeded(const RenderLayerModelObject&, PaintInvalid ationReason); 861 void invalidateSelectionIfNeeded(const LayoutLayerModelObject&, PaintInvalid ationReason);
862 862
863 // Walk the tree after layout issuing paint invalidations for renderers that have changed or moved, updating bounds that have changed, and clearing paint in validation state. 863 // Walk the tree after layout issuing paint invalidations for renderers that have changed or moved, updating bounds that have changed, and clearing paint in validation state.
864 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&); 864 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&);
865 865
866 virtual void invalidatePaintForOverflow(); 866 virtual void invalidatePaintForOverflow();
867 void invalidatePaintForOverflowIfNeeded(); 867 void invalidatePaintForOverflowIfNeeded();
868 868
869 void invalidatePaintIncludingNonCompositingDescendants(); 869 void invalidatePaintIncludingNonCompositingDescendants();
870 870
871 // Returns the rect that should have paint invalidated whenever this object changes. The rect is in the view's 871 // Returns the rect that should have paint invalidated whenever this object changes. The rect is in the view's
872 // coordinate space. This method deals with outlines and overflow. 872 // coordinate space. This method deals with outlines and overflow.
873 virtual LayoutRect absoluteClippedOverflowRect() const; 873 virtual LayoutRect absoluteClippedOverflowRect() const;
874 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons t; 874 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayer ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons t;
875 virtual LayoutRect rectWithOutlineForPaintInvalidation(const RenderLayerMode lObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalid ationState* = 0) const; 875 virtual LayoutRect rectWithOutlineForPaintInvalidation(const LayoutLayerMode lObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalid ationState* = 0) const;
876 876
877 // Given a rect in the object's coordinate space, compute a rect suitable fo r invalidating paints of 877 // Given a rect in the object's coordinate space, compute a rect suitable fo r invalidating paints of
878 // that rect in the coordinate space of paintInvalidationContainer. 878 // that rect in the coordinate space of paintInvalidationContainer.
879 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const; 879 virtual void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject* paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const;
880 880
881 // Return the offset to the column in which the specified point (in flow-thr ead coordinates) 881 // Return the offset to the column in which the specified point (in flow-thr ead coordinates)
882 // lives. This is used to convert a flow-thread point to a visual point. 882 // lives. This is used to convert a flow-thread point to a visual point.
883 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz e(); } 883 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz e(); }
884 884
885 virtual unsigned length() const { return 1; } 885 virtual unsigned length() const { return 1; }
886 886
887 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut OfFlowPositioned()); } 887 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut OfFlowPositioned()); }
888 888
889 bool isTransparent() const { return style()->hasOpacity(); } 889 bool isTransparent() const { return style()->hasOpacity(); }
(...skipping 11 matching lines...) Expand all
901 901
902 // The current selection state for an object. For blocks, the state refers to the state of the leaf 902 // The current selection state for an object. For blocks, the state refers to the state of the leaf
903 // descendants (as described above in the SelectionState enum declaration). 903 // descendants (as described above in the SelectionState enum declaration).
904 SelectionState selectionState() const { return m_bitfields.selectionState(); } 904 SelectionState selectionState() const { return m_bitfields.selectionState(); }
905 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect ionState(state); } 905 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect ionState(state); }
906 inline void setSelectionStateIfNeeded(SelectionState); 906 inline void setSelectionStateIfNeeded(SelectionState);
907 bool canUpdateSelectionOnRootLineBoxes() const; 907 bool canUpdateSelectionOnRootLineBoxes() const;
908 908
909 // A single rectangle that encompasses all of the selected objects within th is object. Used to determine the tightest 909 // A single rectangle that encompasses all of the selected objects within th is object. Used to determine the tightest
910 // possible bounding box for the selection. The rect returned is in the coor dinate space of the paint invalidation container's backing. 910 // possible bounding box for the selection. The rect returned is in the coor dinate space of the paint invalidation container's backing.
911 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* /*paintInvalidationContainer*/) const { return LayoutRect(); } 911 virtual LayoutRect selectionRectForPaintInvalidation(const LayoutLayerModelO bject* /*paintInvalidationContainer*/) const { return LayoutRect(); }
912 912
913 virtual bool canBeSelectionLeaf() const { return false; } 913 virtual bool canBeSelectionLeaf() const { return false; }
914 bool hasSelectedChildren() const { return selectionState() != SelectionNone; } 914 bool hasSelectedChildren() const { return selectionState() != SelectionNone; }
915 915
916 bool isSelectable() const; 916 bool isSelectable() const;
917 // Obtains the selection colors that should be used when painting a selectio n. 917 // Obtains the selection colors that should be used when painting a selectio n.
918 Color selectionBackgroundColor() const; 918 Color selectionBackgroundColor() const;
919 Color selectionForegroundColor() const; 919 Color selectionForegroundColor() const;
920 Color selectionEmphasisMarkColor() const; 920 Color selectionEmphasisMarkColor() const;
921 921
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 bool isInert() const; 969 bool isInert() const;
970 970
971 bool supportsTouchAction() const; 971 bool supportsTouchAction() const;
972 972
973 bool visibleToHitTestRequest(const HitTestRequest& request) const { return s tyle()->visibility() == VISIBLE && (request.ignorePointerEventsNone() || style() ->pointerEvents() != PE_NONE) && !isInert(); } 973 bool visibleToHitTestRequest(const HitTestRequest& request) const { return s tyle()->visibility() == VISIBLE && (request.ignorePointerEventsNone() || style() ->pointerEvents() != PE_NONE) && !isInert(); }
974 974
975 bool visibleToHitTesting() const { return style()->visibility() == VISIBLE & & style()->pointerEvents() != PE_NONE && !isInert(); } 975 bool visibleToHitTesting() const { return style()->visibility() == VISIBLE & & style()->pointerEvents() != PE_NONE && !isInert(); }
976 976
977 // Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use 977 // Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use
978 // localToAbsolute/absoluteToLocal methods instead. 978 // localToAbsolute/absoluteToLocal methods instead.
979 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const; 979 virtual void mapLocalToContainer(const LayoutLayerModelObject* paintInvalida tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0, const PaintInvalidationState* = 0) const;
980 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst; 980 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst;
981 981
982 // Pushes state onto RenderGeometryMap about how to map coordinates from thi s renderer to its container, or ancestorToStopAt (whichever is encountered first ). 982 // Pushes state onto RenderGeometryMap about how to map coordinates from thi s renderer to its container, or ancestorToStopAt (whichever is encountered first ).
983 // Returns the renderer which was mapped to (container or ancestorToStopAt). 983 // Returns the renderer which was mapped to (container or ancestorToStopAt).
984 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const; 984 virtual const RenderObject* pushMappingToContainer(const LayoutLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const;
985 985
986 bool shouldUseTransformFromContainer(const RenderObject* container) const; 986 bool shouldUseTransformFromContainer(const RenderObject* container) const;
987 void getTransformFromContainer(const RenderObject* container, const LayoutSi ze& offsetInContainer, TransformationMatrix&) const; 987 void getTransformFromContainer(const RenderObject* container, const LayoutSi ze& offsetInContainer, TransformationMatrix&) const;
988 988
989 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter () || style()->hasBlendMode(); } 989 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter () || style()->hasBlendMode(); }
990 990
991 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset) const { } 991 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset) const { }
992 992
993 // Compute a list of hit-test rectangles per layer rooted at this renderer. 993 // Compute a list of hit-test rectangles per layer rooted at this renderer.
994 virtual void computeLayerHitTestRects(LayerHitTestRects&) const; 994 virtual void computeLayerHitTestRects(LayerHitTestRects&) const;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 void clearLayoutRootIfNeeded() const; 1146 void clearLayoutRootIfNeeded() const;
1147 virtual void willBeDestroyed(); 1147 virtual void willBeDestroyed();
1148 void postDestroy(); 1148 void postDestroy();
1149 1149
1150 virtual void insertedIntoTree(); 1150 virtual void insertedIntoTree();
1151 virtual void willBeRemovedFromTree(); 1151 virtual void willBeRemovedFromTree();
1152 1152
1153 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_ node = document; } 1153 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_ node = document; }
1154 1154
1155 // Add hit-test rects for the render tree rooted at this node to the provide d collection on a 1155 // Add hit-test rects for the render tree rooted at this node to the provide d collection on a
1156 // per-RenderLayer basis. 1156 // per-Layer basis.
1157 // currentLayer must be the enclosing layer, and layerOffset is the current offset within 1157 // currentLayer must be the enclosing layer, and layerOffset is the current offset within
1158 // this layer. Subclass implementations will add any offset for this rendere r within it's 1158 // this layer. Subclass implementations will add any offset for this rendere r within it's
1159 // container, so callers should provide only the offset of the container wit hin it's layer. 1159 // container, so callers should provide only the offset of the container wit hin it's layer.
1160 // containerRect is a rect that has already been added for the currentLayer which is likely to 1160 // containerRect is a rect that has already been added for the currentLayer which is likely to
1161 // be a container for child elements. Any rect wholly contained by container Rect can be 1161 // be a container for child elements. Any rect wholly contained by container Rect can be
1162 // skipped. 1162 // skipped.
1163 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur rentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) cons t; 1163 virtual void addLayerHitTestRects(LayerHitTestRects&, const Layer* currentLa yer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const;
1164 1164
1165 // Add hit-test rects for this renderer only to the provided list. layerOffs et is the offset 1165 // Add hit-test rects for this renderer only to the provided list. layerOffs et is the offset
1166 // of this renderer within the current layer that should be used for each re sult. 1166 // of this renderer within the current layer that should be used for each re sult.
1167 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const { }; 1167 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const { };
1168 1168
1169 virtual PaintInvalidationReason paintInvalidationReason(const RenderLayerMod elObject& paintInvalidationContainer, 1169 virtual PaintInvalidationReason paintInvalidationReason(const LayoutLayerMod elObject& paintInvalidationContainer,
1170 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi onFromPaintInvalidationBacking, 1170 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi onFromPaintInvalidationBacking,
1171 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi onFromPaintInvalidationBacking) const; 1171 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi onFromPaintInvalidationBacking) const;
1172 virtual void incrementallyInvalidatePaint(const RenderLayerModelObject& pain tInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds , const LayoutPoint& positionFromPaintInvalidationBacking); 1172 virtual void incrementallyInvalidatePaint(const LayoutLayerModelObject& pain tInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds , const LayoutPoint& positionFromPaintInvalidationBacking);
1173 void fullyInvalidatePaint(const RenderLayerModelObject& paintInvalidationCon tainer, PaintInvalidationReason, const LayoutRect& oldBounds, const LayoutRect& newBounds); 1173 void fullyInvalidatePaint(const LayoutLayerModelObject& paintInvalidationCon tainer, PaintInvalidationReason, const LayoutRect& oldBounds, const LayoutRect& newBounds);
1174 1174
1175 #if ENABLE(ASSERT) 1175 #if ENABLE(ASSERT)
1176 virtual bool paintInvalidationStateIsDirty() const 1176 virtual bool paintInvalidationStateIsDirty() const
1177 { 1177 {
1178 return neededLayoutBecauseOfChildren() || shouldCheckForPaintInvalidatio nRegardlessOfPaintInvalidationState(); 1178 return neededLayoutBecauseOfChildren() || shouldCheckForPaintInvalidatio nRegardlessOfPaintInvalidationState();
1179 } 1179 }
1180 #endif 1180 #endif
1181 1181
1182 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState); 1182 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState& childPaintInvalidationState);
1183 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat ionState&, const RenderLayerModelObject& paintInvalidationContainer); 1183 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat ionState&, const LayoutLayerModelObject& paintInvalidationContainer);
1184 1184
1185 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients 1185 // When this object is invalidated for paint, this method is called to inval idate any DisplayItemClients
1186 // owned by this object, including the object itself, RenderText/RenderInlin e line boxes, scrollbars, etc., 1186 // owned by this object, including the object itself, RenderText/RenderInlin e line boxes, scrollbars, etc.,
1187 // not including children which will be invalidated normally during invalida teTreeIfNeeded(). 1187 // not including children which will be invalidated normally during invalida teTreeIfNeeded().
1188 virtual void invalidateDisplayItemClients(DisplayItemList*) const; 1188 virtual void invalidateDisplayItemClients(DisplayItemList*) const;
1189 1189
1190 private: 1190 private:
1191 void setLayoutDidGetCalledSinceLastFrame() 1191 void setLayoutDidGetCalledSinceLastFrame()
1192 { 1192 {
1193 m_bitfields.setLayoutDidGetCalledSinceLastFrame(true); 1193 m_bitfields.setLayoutDidGetCalledSinceLastFrame(true);
1194 1194
1195 // Make sure our parent is marked as needing invalidation. 1195 // Make sure our parent is marked as needing invalidation.
1196 // This would be unneeded if we allowed sub-tree invalidation (akin to s ub-tree layouts). 1196 // This would be unneeded if we allowed sub-tree invalidation (akin to s ub-tree layouts).
1197 markContainingBlockChainForPaintInvalidation(); 1197 markContainingBlockChainForPaintInvalidation();
1198 } 1198 }
1199 void clearLayoutDidGetCalledSinceLastFrame() { m_bitfields.setLayoutDidGetCa lledSinceLastFrame(false); } 1199 void clearLayoutDidGetCalledSinceLastFrame() { m_bitfields.setLayoutDidGetCa lledSinceLastFrame(false); }
1200 1200
1201 void invalidatePaintIncludingNonCompositingDescendantsInternal(const RenderL ayerModelObject* repaintContainer); 1201 void invalidatePaintIncludingNonCompositingDescendantsInternal(const LayoutL ayerModelObject* repaintContainer);
1202 1202
1203 LayoutRect previousSelectionRectForPaintInvalidation() const; 1203 LayoutRect previousSelectionRectForPaintInvalidation() const;
1204 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); 1204 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&);
1205 1205
1206 const RenderLayerModelObject* enclosingCompositedContainer() const; 1206 const LayoutLayerModelObject* enclosingCompositedContainer() const;
1207 1207
1208 RenderFlowThread* locateFlowThreadContainingBlock() const; 1208 RenderFlowThread* locateFlowThreadContainingBlock() const;
1209 void removeFromRenderFlowThread(); 1209 void removeFromRenderFlowThread();
1210 void removeFromRenderFlowThreadRecursive(RenderFlowThread*); 1210 void removeFromRenderFlowThreadRecursive(RenderFlowThread*);
1211 1211
1212 RenderStyle* cachedFirstLineStyle() const; 1212 RenderStyle* cachedFirstLineStyle() const;
1213 StyleDifference adjustStyleDifference(StyleDifference) const; 1213 StyleDifference adjustStyleDifference(StyleDifference) const;
1214 1214
1215 Color selectionColor(int colorProperty) const; 1215 Color selectionColor(int colorProperty) const;
1216 1216
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 void showTree(const blink::RenderObject*); 1612 void showTree(const blink::RenderObject*);
1613 void showLineTree(const blink::RenderObject*); 1613 void showLineTree(const blink::RenderObject*);
1614 void showRenderTree(const blink::RenderObject* object1); 1614 void showRenderTree(const blink::RenderObject* object1);
1615 // We don't make object2 an optional parameter so that showRenderTree 1615 // We don't make object2 an optional parameter so that showRenderTree
1616 // can be called from gdb easily. 1616 // can be called from gdb easily.
1617 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1617 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1618 1618
1619 #endif 1619 #endif
1620 1620
1621 #endif // RenderObject_h 1621 #endif // RenderObject_h
OLDNEW
« 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