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

Side by Side Diff: Source/core/rendering/RenderInline.h

Issue 14383002: Apply FINAL to the RenderObject hierarchy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase, add OVERRIDEs. Created 7 years, 8 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/RenderImage.h ('k') | Source/core/rendering/RenderLayerModelObject.h » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 26 matching lines...) Expand all
37 37
38 static RenderInline* createAnonymous(Document*); 38 static RenderInline* createAnonymous(Document*);
39 39
40 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); } 40 RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); }
41 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); r eturn children()->lastChild(); } 41 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); r eturn children()->lastChild(); }
42 42
43 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) ; 43 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) ;
44 44
45 Element* node() const { return toElement(RenderBoxModelObject::node()); } 45 Element* node() const { return toElement(RenderBoxModelObject::node()); }
46 46
47 virtual LayoutUnit marginLeft() const; 47 virtual LayoutUnit marginLeft() const OVERRIDE FINAL;
48 virtual LayoutUnit marginRight() const; 48 virtual LayoutUnit marginRight() const OVERRIDE FINAL;
49 virtual LayoutUnit marginTop() const; 49 virtual LayoutUnit marginTop() const OVERRIDE FINAL;
50 virtual LayoutUnit marginBottom() const; 50 virtual LayoutUnit marginBottom() const OVERRIDE FINAL;
51 virtual LayoutUnit marginBefore(const RenderStyle* otherStyle = 0) const; 51 virtual LayoutUnit marginBefore(const RenderStyle* otherStyle = 0) const OVE RRIDE FINAL;
52 virtual LayoutUnit marginAfter(const RenderStyle* otherStyle = 0) const; 52 virtual LayoutUnit marginAfter(const RenderStyle* otherStyle = 0) const OVER RIDE FINAL;
53 virtual LayoutUnit marginStart(const RenderStyle* otherStyle = 0) const; 53 virtual LayoutUnit marginStart(const RenderStyle* otherStyle = 0) const OVER RIDE FINAL;
54 virtual LayoutUnit marginEnd(const RenderStyle* otherStyle = 0) const; 54 virtual LayoutUnit marginEnd(const RenderStyle* otherStyle = 0) const OVERRI DE FINAL;
55 55
56 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const; 56 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const OVERRIDE FINAL;
57 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const; 57 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const;
58 58
59 virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&, bo ol* offsetDependsOnPoint = 0) const; 59 virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&, bo ol* offsetDependsOnPoint = 0) const OVERRIDE FINAL;
60 60
61 IntRect linesBoundingBox() const; 61 IntRect linesBoundingBox() const;
62 LayoutRect linesVisualOverflowBoundingBox() const; 62 LayoutRect linesVisualOverflowBoundingBox() const;
63 63
64 InlineFlowBox* createAndAppendInlineFlowBox(); 64 InlineFlowBox* createAndAppendInlineFlowBox();
65 65
66 void dirtyLineBoxes(bool fullLayout); 66 void dirtyLineBoxes(bool fullLayout);
67 void deleteLineBoxTree(); 67 void deleteLineBoxTree();
68 68
69 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } 69 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; }
70 const RenderLineBoxList* lineBoxes() const { return &m_lineBoxes; } 70 const RenderLineBoxList* lineBoxes() const { return &m_lineBoxes; }
71 71
72 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } 72 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); }
73 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } 73 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); }
74 InlineBox* firstLineBoxIncludingCulling() const { return alwaysCreateLineBox es() ? firstLineBox() : culledInlineFirstLineBox(); } 74 InlineBox* firstLineBoxIncludingCulling() const { return alwaysCreateLineBox es() ? firstLineBox() : culledInlineFirstLineBox(); }
75 InlineBox* lastLineBoxIncludingCulling() const { return alwaysCreateLineBoxe s() ? lastLineBox() : culledInlineLastLineBox(); } 75 InlineBox* lastLineBoxIncludingCulling() const { return alwaysCreateLineBoxe s() ? lastLineBox() : culledInlineLastLineBox(); }
76 76
77 virtual RenderBoxModelObject* virtualContinuation() const { return continuat ion(); } 77 virtual RenderBoxModelObject* virtualContinuation() const OVERRIDE FINAL { r eturn continuation(); }
78 RenderInline* inlineElementContinuation() const; 78 RenderInline* inlineElementContinuation() const;
79 79
80 virtual void updateDragState(bool dragOn); 80 virtual void updateDragState(bool dragOn) OVERRIDE FINAL;
81 81
82 LayoutSize offsetForInFlowPositionedInline(const RenderBox* child) const; 82 LayoutSize offsetForInFlowPositionedInline(const RenderBox* child) const;
83 83
84 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE; 84 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE FINAL;
85 void paintOutline(PaintInfo&, const LayoutPoint&); 85 void paintOutline(PaintInfo&, const LayoutPoint&);
86 86
87 using RenderBoxModelObject::continuation; 87 using RenderBoxModelObject::continuation;
88 using RenderBoxModelObject::setContinuation; 88 using RenderBoxModelObject::setContinuation;
89 89
90 bool alwaysCreateLineBoxes() const { return m_alwaysCreateLineBoxes; } 90 bool alwaysCreateLineBoxes() const { return m_alwaysCreateLineBoxes; }
91 void setAlwaysCreateLineBoxes() { m_alwaysCreateLineBoxes = true; } 91 void setAlwaysCreateLineBoxes() { m_alwaysCreateLineBoxes = true; }
92 void updateAlwaysCreateLineBoxes(bool fullLayout); 92 void updateAlwaysCreateLineBoxes(bool fullLayout);
93 93
94 virtual LayoutRect localCaretRect(InlineBox*, int, LayoutUnit* extraWidthToE ndOfLine) OVERRIDE; 94 virtual LayoutRect localCaretRect(InlineBox*, int, LayoutUnit* extraWidthToE ndOfLine) OVERRIDE FINAL;
95 95
96 bool hitTestCulledInline(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset); 96 bool hitTestCulledInline(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset);
97 97
98 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; 98 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE FINAL;
99 99
100 protected: 100 protected:
101 virtual void willBeDestroyed(); 101 virtual void willBeDestroyed();
102 102
103 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE; 103 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE;
104 104
105 private: 105 private:
106 virtual RenderObjectChildList* virtualChildren() { return children(); } 106 virtual RenderObjectChildList* virtualChildren() OVERRIDE FINAL { return chi ldren(); }
107 virtual const RenderObjectChildList* virtualChildren() const { return childr en(); } 107 virtual const RenderObjectChildList* virtualChildren() const OVERRIDE FINAL { return children(); }
108 const RenderObjectChildList* children() const { return &m_children; } 108 const RenderObjectChildList* children() const { return &m_children; }
109 RenderObjectChildList* children() { return &m_children; } 109 RenderObjectChildList* children() { return &m_children; }
110 110
111 virtual const char* renderName() const; 111 virtual const char* renderName() const;
112 112
113 virtual bool isRenderInline() const { return true; } 113 virtual bool isRenderInline() const OVERRIDE FINAL { return true; }
114 114
115 LayoutRect culledInlineVisualOverflowBoundingBox() const; 115 LayoutRect culledInlineVisualOverflowBoundingBox() const;
116 InlineBox* culledInlineFirstLineBox() const; 116 InlineBox* culledInlineFirstLineBox() const;
117 InlineBox* culledInlineLastLineBox() const; 117 InlineBox* culledInlineLastLineBox() const;
118 118
119 template<typename GeneratorContext> 119 template<typename GeneratorContext>
120 void generateLineBoxRects(GeneratorContext& yield) const; 120 void generateLineBoxRects(GeneratorContext& yield) const;
121 template<typename GeneratorContext> 121 template<typename GeneratorContext>
122 void generateCulledLineBoxRects(GeneratorContext& yield, const RenderInline* container) const; 122 void generateCulledLineBoxRects(GeneratorContext& yield, const RenderInline* container) const;
123 123
124 void addChildToContinuation(RenderObject* newChild, RenderObject* beforeChil d); 124 void addChildToContinuation(RenderObject* newChild, RenderObject* beforeChil d);
125 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObje ct* beforeChild = 0); 125 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObje ct* beforeChild = 0) OVERRIDE FINAL;
126 126
127 void splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock, RenderBlock* middleBlock, 127 void splitInlines(RenderBlock* fromBlock, RenderBlock* toBlock, RenderBlock* middleBlock,
128 RenderObject* beforeChild, RenderBoxModelObject* oldCont); 128 RenderObject* beforeChild, RenderBoxModelObject* oldCont);
129 void splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox, 129 void splitFlow(RenderObject* beforeChild, RenderBlock* newBlockBox,
130 RenderObject* newChild, RenderBoxModelObject* oldCont); 130 RenderObject* newChild, RenderBoxModelObject* oldCont);
131 131
132 virtual void layout() { ASSERT_NOT_REACHED(); } // Do nothing for layout() 132 virtual void layout() OVERRIDE FINAL { ASSERT_NOT_REACHED(); } // Do nothing for layout()
133 133
134 virtual void paint(PaintInfo&, const LayoutPoint&); 134 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL;
135 135
136 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE; 136 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE FINAL;
137 137
138 virtual bool requiresLayer() const { return isInFlowPositioned() || createsG roup() || hasClipPath(); } 138 virtual bool requiresLayer() const { return isInFlowPositioned() || createsG roup() || hasClipPath(); }
139 139
140 virtual LayoutUnit offsetLeft() const; 140 virtual LayoutUnit offsetLeft() const OVERRIDE FINAL;
141 virtual LayoutUnit offsetTop() const; 141 virtual LayoutUnit offsetTop() const OVERRIDE FINAL;
142 virtual LayoutUnit offsetWidth() const { return linesBoundingBox().width(); } 142 virtual LayoutUnit offsetWidth() const OVERRIDE FINAL { return linesBounding Box().width(); }
143 virtual LayoutUnit offsetHeight() const { return linesBoundingBox().height() ; } 143 virtual LayoutUnit offsetHeight() const OVERRIDE FINAL { return linesBoundin gBox().height(); }
144 144
145 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec t* repaintContainer) const OVERRIDE; 145 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec t* repaintContainer) const OVERRIDE;
146 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* r epaintContainer, LayoutUnit outlineWidth) const OVERRIDE; 146 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* r epaintContainer, LayoutUnit outlineWidth) const OVERRIDE FINAL;
147 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintCont ainer, LayoutRect&, bool fixed) const OVERRIDE; 147 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintCont ainer, LayoutRect&, bool fixed) const OVERRIDE FINAL;
148 148
149 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE; 149 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE;
150 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE; 150 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect* ancestorToStopAt, RenderGeometryMap&) const OVERRIDE;
151 151
152 virtual VisiblePosition positionForPoint(const LayoutPoint&); 152 virtual VisiblePosition positionForPoint(const LayoutPoint&) OVERRIDE FINAL;
153 153
154 virtual LayoutRect frameRectForStickyPositioning() const OVERRIDE { return l inesBoundingBox(); } 154 virtual LayoutRect frameRectForStickyPositioning() const OVERRIDE FINAL { re turn linesBoundingBox(); }
155 155
156 virtual IntRect borderBoundingBox() const 156 virtual IntRect borderBoundingBox() const OVERRIDE FINAL
157 { 157 {
158 IntRect boundingBox = linesBoundingBox(); 158 IntRect boundingBox = linesBoundingBox();
159 return IntRect(0, 0, boundingBox.width(), boundingBox.height()); 159 return IntRect(0, 0, boundingBox.width(), boundingBox.height());
160 } 160 }
161 161
162 virtual InlineFlowBox* createInlineFlowBox(); // Subclassed by SVG and Ruby 162 virtual InlineFlowBox* createInlineFlowBox(); // Subclassed by SVG and Ruby
163 163
164 virtual void dirtyLinesFromChangedChild(RenderObject* child) { m_lineBoxes.d irtyLinesFromChangedChild(this, child); } 164 virtual void dirtyLinesFromChangedChild(RenderObject* child) OVERRIDE FINAL { m_lineBoxes.dirtyLinesFromChangedChild(this, child); }
165 165
166 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const; 166 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const OVERRIDE FINAL;
167 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const; 167 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const OVERRIDE FINAL;
168 168
169 virtual void childBecameNonInline(RenderObject* child); 169 virtual void childBecameNonInline(RenderObject* child) OVERRIDE FINAL;
170 170
171 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&); 171 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&) OVERRID E FINAL;
172 172
173 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0); 173 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE FINA L;
174 174
175 virtual void addAnnotatedRegions(Vector<AnnotatedRegionValue>&); 175 virtual void addAnnotatedRegions(Vector<AnnotatedRegionValue>&) OVERRIDE FIN AL;
176 176
177 virtual void updateFromStyle() OVERRIDE; 177 virtual void updateFromStyle() OVERRIDE FINAL;
178 178
179 RenderInline* clone() const; 179 RenderInline* clone() const;
180 180
181 void paintOutlineForLine(GraphicsContext*, const LayoutPoint&, const LayoutR ect& prevLine, const LayoutRect& thisLine, 181 void paintOutlineForLine(GraphicsContext*, const LayoutPoint&, const LayoutR ect& prevLine, const LayoutRect& thisLine,
182 const LayoutRect& nextLine, const Color); 182 const LayoutRect& nextLine, const Color);
183 RenderBoxModelObject* continuationBefore(RenderObject* beforeChild); 183 RenderBoxModelObject* continuationBefore(RenderObject* beforeChild);
184 184
185 RenderObjectChildList m_children; 185 RenderObjectChildList m_children;
186 RenderLineBoxList m_lineBoxes; // All of the line boxes created for this i nline flow. For example, <i>Hello<br>world.</i> will have two <i> line boxes. 186 RenderLineBoxList m_lineBoxes; // All of the line boxes created for this i nline flow. For example, <i>Hello<br>world.</i> will have two <i> line boxes.
187 187
(...skipping 11 matching lines...) Expand all
199 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderInline()); 199 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderInline());
200 return static_cast<const RenderInline*>(object); 200 return static_cast<const RenderInline*>(object);
201 } 201 }
202 202
203 // This will catch anyone doing an unnecessary cast. 203 // This will catch anyone doing an unnecessary cast.
204 void toRenderInline(const RenderInline*); 204 void toRenderInline(const RenderInline*);
205 205
206 } // namespace WebCore 206 } // namespace WebCore
207 207
208 #endif // RenderInline_h 208 #endif // RenderInline_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderImage.h ('k') | Source/core/rendering/RenderLayerModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698