OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // is an image, the line is still considered to be immune from the quirk
. | 67 // is an image, the line is still considered to be immune from the quirk
. |
68 m_hasTextChildren = obj.style()->display() == LIST_ITEM; | 68 m_hasTextChildren = obj.style()->display() == LIST_ITEM; |
69 m_hasTextDescendants = m_hasTextChildren; | 69 m_hasTextDescendants = m_hasTextChildren; |
70 } | 70 } |
71 | 71 |
72 #if ENABLE(ASSERT) | 72 #if ENABLE(ASSERT) |
73 virtual ~InlineFlowBox(); | 73 virtual ~InlineFlowBox(); |
74 #endif | 74 #endif |
75 | 75 |
76 #ifndef NDEBUG | 76 #ifndef NDEBUG |
77 virtual void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, cons
t InlineBox* = 0, const char* = 0, const RenderObject* = 0, int = 0) const OVERR
IDE; | 77 virtual void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, cons
t InlineBox* = 0, const char* = 0, const RenderObject* = 0, int = 0) const overr
ide; |
78 virtual const char* boxName() const OVERRIDE; | 78 virtual const char* boxName() const override; |
79 #endif | 79 #endif |
80 | 80 |
81 InlineFlowBox* prevLineBox() const { return m_prevLineBox; } | 81 InlineFlowBox* prevLineBox() const { return m_prevLineBox; } |
82 InlineFlowBox* nextLineBox() const { return m_nextLineBox; } | 82 InlineFlowBox* nextLineBox() const { return m_nextLineBox; } |
83 void setNextLineBox(InlineFlowBox* n) { m_nextLineBox = n; } | 83 void setNextLineBox(InlineFlowBox* n) { m_nextLineBox = n; } |
84 void setPreviousLineBox(InlineFlowBox* p) { m_prevLineBox = p; } | 84 void setPreviousLineBox(InlineFlowBox* p) { m_prevLineBox = p; } |
85 | 85 |
86 InlineBox* firstChild() const { checkConsistency(); return m_firstChild; } | 86 InlineBox* firstChild() const { checkConsistency(); return m_firstChild; } |
87 InlineBox* lastChild() const { checkConsistency(); return m_lastChild; } | 87 InlineBox* lastChild() const { checkConsistency(); return m_lastChild; } |
88 | 88 |
89 virtual bool isLeaf() const OVERRIDE FINAL { return false; } | 89 virtual bool isLeaf() const override final { return false; } |
90 | 90 |
91 InlineBox* firstLeafChild() const; | 91 InlineBox* firstLeafChild() const; |
92 InlineBox* lastLeafChild() const; | 92 InlineBox* lastLeafChild() const; |
93 | 93 |
94 typedef void (*CustomInlineBoxRangeReverse)(void* userData, Vector<InlineBox
*>::iterator first, Vector<InlineBox*>::iterator last); | 94 typedef void (*CustomInlineBoxRangeReverse)(void* userData, Vector<InlineBox
*>::iterator first, Vector<InlineBox*>::iterator last); |
95 void collectLeafBoxesInLogicalOrder(Vector<InlineBox*>&, CustomInlineBoxRang
eReverse customReverseImplementation = 0, void* userData = 0) const; | 95 void collectLeafBoxesInLogicalOrder(Vector<InlineBox*>&, CustomInlineBoxRang
eReverse customReverseImplementation = 0, void* userData = 0) const; |
96 | 96 |
97 virtual void setConstructed() OVERRIDE FINAL | 97 virtual void setConstructed() override final |
98 { | 98 { |
99 InlineBox::setConstructed(); | 99 InlineBox::setConstructed(); |
100 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()
) | 100 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()
) |
101 child->setConstructed(); | 101 child->setConstructed(); |
102 } | 102 } |
103 | 103 |
104 void addToLine(InlineBox* child); | 104 void addToLine(InlineBox* child); |
105 virtual void deleteLine() OVERRIDE FINAL; | 105 virtual void deleteLine() override final; |
106 virtual void extractLine() OVERRIDE FINAL; | 106 virtual void extractLine() override final; |
107 virtual void attachLine() OVERRIDE FINAL; | 107 virtual void attachLine() override final; |
108 virtual void adjustPosition(float dx, float dy) OVERRIDE; | 108 virtual void adjustPosition(float dx, float dy) override; |
109 | 109 |
110 virtual void extractLineBoxFromRenderObject(); | 110 virtual void extractLineBoxFromRenderObject(); |
111 virtual void attachLineBoxToRenderObject(); | 111 virtual void attachLineBoxToRenderObject(); |
112 virtual void removeLineBoxFromRenderObject(); | 112 virtual void removeLineBoxFromRenderObject(); |
113 | 113 |
114 virtual void clearTruncation() OVERRIDE; | 114 virtual void clearTruncation() override; |
115 | 115 |
116 IntRect roundedFrameRect() const; | 116 IntRect roundedFrameRect() const; |
117 | 117 |
118 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
tUnit lineBottom) OVERRIDE; | 118 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
tUnit lineBottom) override; |
119 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) OVERRIDE; | 119 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom) override; |
120 | 120 |
121 bool boxShadowCanBeAppliedToBackground(const FillLayer&) const; | 121 bool boxShadowCanBeAppliedToBackground(const FillLayer&) const; |
122 | 122 |
123 virtual RenderLineBoxList* rendererLineBoxes() const; | 123 virtual RenderLineBoxList* rendererLineBoxes() const; |
124 | 124 |
125 // logicalLeft = left in a horizontal line and top in a vertical line. | 125 // logicalLeft = left in a horizontal line and top in a vertical line. |
126 LayoutUnit marginBorderPaddingLogicalLeft() const { return marginLogicalLeft
() + borderLogicalLeft() + paddingLogicalLeft(); } | 126 LayoutUnit marginBorderPaddingLogicalLeft() const { return marginLogicalLeft
() + borderLogicalLeft() + paddingLogicalLeft(); } |
127 LayoutUnit marginBorderPaddingLogicalRight() const { return marginLogicalRig
ht() + borderLogicalRight() + paddingLogicalRight(); } | 127 LayoutUnit marginBorderPaddingLogicalRight() const { return marginLogicalRig
ht() + borderLogicalRight() + paddingLogicalRight(); } |
128 LayoutUnit marginLogicalLeft() const | 128 LayoutUnit marginLogicalLeft() const |
129 { | 129 { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 void flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lineBottom); | 194 void flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lineBottom); |
195 bool requiresIdeographicBaseline(const GlyphOverflowAndFallbackFontsMap&) co
nst; | 195 bool requiresIdeographicBaseline(const GlyphOverflowAndFallbackFontsMap&) co
nst; |
196 | 196 |
197 LayoutUnit computeOverAnnotationAdjustment(LayoutUnit allowedPosition) const
; | 197 LayoutUnit computeOverAnnotationAdjustment(LayoutUnit allowedPosition) const
; |
198 LayoutUnit computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) cons
t; | 198 LayoutUnit computeUnderAnnotationAdjustment(LayoutUnit allowedPosition) cons
t; |
199 | 199 |
200 void computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, GlyphOverflo
wAndFallbackFontsMap&); | 200 void computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, GlyphOverflo
wAndFallbackFontsMap&); |
201 | 201 |
202 void removeChild(InlineBox* child, MarkLineBoxes); | 202 void removeChild(InlineBox* child, MarkLineBoxes); |
203 | 203 |
204 virtual RenderObject::SelectionState selectionState() const OVERRIDE; | 204 virtual RenderObject::SelectionState selectionState() const override; |
205 | 205 |
206 virtual bool canAccommodateEllipsis(bool ltr, int blockEdge, int ellipsisWid
th) const OVERRIDE FINAL; | 206 virtual bool canAccommodateEllipsis(bool ltr, int blockEdge, int ellipsisWid
th) const override final; |
207 virtual float placeEllipsisBox(bool ltr, float blockLeftEdge, float blockRig
htEdge, float ellipsisWidth, float &truncatedWidth, bool&) OVERRIDE; | 207 virtual float placeEllipsisBox(bool ltr, float blockLeftEdge, float blockRig
htEdge, float ellipsisWidth, float &truncatedWidth, bool&) override; |
208 | 208 |
209 bool hasTextChildren() const { return m_hasTextChildren; } | 209 bool hasTextChildren() const { return m_hasTextChildren; } |
210 bool hasTextDescendants() const { return m_hasTextDescendants; } | 210 bool hasTextDescendants() const { return m_hasTextDescendants; } |
211 void setHasTextDescendants() { m_hasTextDescendants = true; } | 211 void setHasTextDescendants() { m_hasTextDescendants = true; } |
212 | 212 |
213 void checkConsistency() const; | 213 void checkConsistency() const; |
214 void setHasBadChildList(); | 214 void setHasBadChildList(); |
215 | 215 |
216 // Line visual and layout overflow are in the coordinate space of the block.
This means that they aren't purely physical directions. | 216 // Line visual and layout overflow are in the coordinate space of the block.
This means that they aren't purely physical directions. |
217 // For horizontal-tb and vertical-lr they will match physical directions, bu
t for horizontal-bt and vertical-rl, the top/bottom and left/right | 217 // For horizontal-tb and vertical-lr they will match physical directions, bu
t for horizontal-bt and vertical-rl, the top/bottom and left/right |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 void addOutlineVisualOverflow(LayoutRect& logicalVisualOverflow); | 294 void addOutlineVisualOverflow(LayoutRect& logicalVisualOverflow); |
295 void addTextBoxVisualOverflow(InlineTextBox*, GlyphOverflowAndFallbackFontsM
ap&, LayoutRect& logicalVisualOverflow); | 295 void addTextBoxVisualOverflow(InlineTextBox*, GlyphOverflowAndFallbackFontsM
ap&, LayoutRect& logicalVisualOverflow); |
296 void addReplacedChildOverflow(const InlineBox*, LayoutRect& logicalLayoutOve
rflow, LayoutRect& logicalVisualOverflow); | 296 void addReplacedChildOverflow(const InlineBox*, LayoutRect& logicalLayoutOve
rflow, LayoutRect& logicalVisualOverflow); |
297 | 297 |
298 void setLayoutOverflow(const LayoutRect&, const LayoutRect&); | 298 void setLayoutOverflow(const LayoutRect&, const LayoutRect&); |
299 void setVisualOverflow(const LayoutRect&, const LayoutRect&); | 299 void setVisualOverflow(const LayoutRect&, const LayoutRect&); |
300 | 300 |
301 protected: | 301 protected: |
302 OwnPtr<RenderOverflow> m_overflow; | 302 OwnPtr<RenderOverflow> m_overflow; |
303 | 303 |
304 virtual bool isInlineFlowBox() const OVERRIDE FINAL { return true; } | 304 virtual bool isInlineFlowBox() const override final { return true; } |
305 | 305 |
306 InlineBox* m_firstChild; | 306 InlineBox* m_firstChild; |
307 InlineBox* m_lastChild; | 307 InlineBox* m_lastChild; |
308 | 308 |
309 InlineFlowBox* m_prevLineBox; // The previous box that also uses our RenderO
bject | 309 InlineFlowBox* m_prevLineBox; // The previous box that also uses our RenderO
bject |
310 InlineFlowBox* m_nextLineBox; // The next box that also uses our RenderObjec
t | 310 InlineFlowBox* m_nextLineBox; // The next box that also uses our RenderObjec
t |
311 | 311 |
312 // Maximum logicalTop among all children of an InlineFlowBox. Used to | 312 // Maximum logicalTop among all children of an InlineFlowBox. Used to |
313 // calculate the offset for TextUnderlinePositionUnder. | 313 // calculate the offset for TextUnderlinePositionUnder. |
314 void computeMaxLogicalTop(float& maxLogicalTop) const; | 314 void computeMaxLogicalTop(float& maxLogicalTop) const; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 } | 358 } |
359 | 359 |
360 } // namespace blink | 360 } // namespace blink |
361 | 361 |
362 #ifndef NDEBUG | 362 #ifndef NDEBUG |
363 // Outside the WebCore namespace for ease of invocation from gdb. | 363 // Outside the WebCore namespace for ease of invocation from gdb. |
364 void showTree(const blink::InlineFlowBox*); | 364 void showTree(const blink::InlineFlowBox*); |
365 #endif | 365 #endif |
366 | 366 |
367 #endif // InlineFlowBox_h | 367 #endif // InlineFlowBox_h |
OLD | NEW |