OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 bool isFirstLineStyle() const { return m_bitfields.firstLine(); } | 175 bool isFirstLineStyle() const { return m_bitfields.firstLine(); } |
176 const ComputedStyle& lineStyleRef() const { | 176 const ComputedStyle& lineStyleRef() const { |
177 return getLineLayoutItem().styleRef(isFirstLineStyle()); | 177 return getLineLayoutItem().styleRef(isFirstLineStyle()); |
178 } | 178 } |
179 | 179 |
180 void remove(MarkLineBoxes = MarkLineBoxesDirty); | 180 void remove(MarkLineBoxes = MarkLineBoxesDirty); |
181 | 181 |
182 InlineBox* nextOnLine() const { return m_next; } | 182 InlineBox* nextOnLine() const { return m_next; } |
183 InlineBox* prevOnLine() const { return m_prev; } | 183 InlineBox* prevOnLine() const { return m_prev; } |
184 void setNextOnLine(InlineBox* next) { | 184 void setNextOnLine(InlineBox* next) { |
185 ASSERT(m_parent || !next); | 185 DCHECK(m_parent || !next); |
186 m_next = next; | 186 m_next = next; |
187 } | 187 } |
188 void setPrevOnLine(InlineBox* prev) { | 188 void setPrevOnLine(InlineBox* prev) { |
189 ASSERT(m_parent || !prev); | 189 DCHECK(m_parent || !prev); |
190 m_prev = prev; | 190 m_prev = prev; |
191 } | 191 } |
192 | 192 |
193 virtual bool isLeaf() const { return true; } | 193 virtual bool isLeaf() const { return true; } |
194 | 194 |
195 InlineBox* nextLeafChild() const; | 195 InlineBox* nextLeafChild() const; |
196 InlineBox* prevLeafChild() const; | 196 InlineBox* prevLeafChild() const; |
197 | 197 |
198 // Helper functions for editing and hit-testing code. | 198 // Helper functions for editing and hit-testing code. |
199 // FIXME: These two functions should be moved to RenderedPosition once the | 199 // FIXME: These two functions should be moved to RenderedPosition once the |
200 // code to convert between Position and inline box, offset pair is moved to | 200 // code to convert between Position and inline box, offset pair is moved to |
201 // RenderedPosition. | 201 // RenderedPosition. |
202 InlineBox* nextLeafChildIgnoringLineBreak() const; | 202 InlineBox* nextLeafChildIgnoringLineBreak() const; |
203 InlineBox* prevLeafChildIgnoringLineBreak() const; | 203 InlineBox* prevLeafChildIgnoringLineBreak() const; |
204 | 204 |
205 LineLayoutItem getLineLayoutItem() const { return m_lineLayoutItem; } | 205 LineLayoutItem getLineLayoutItem() const { return m_lineLayoutItem; } |
206 | 206 |
207 InlineFlowBox* parent() const { | 207 InlineFlowBox* parent() const { |
208 ASSERT(!m_hasBadParent); | 208 #if DCHECK_IS_ON() |
| 209 DCHECK(!m_hasBadParent); |
| 210 #endif |
209 return m_parent; | 211 return m_parent; |
210 } | 212 } |
| 213 |
211 void setParent(InlineFlowBox* par) { m_parent = par; } | 214 void setParent(InlineFlowBox* par) { m_parent = par; } |
212 | 215 |
213 const RootInlineBox& root() const; | 216 const RootInlineBox& root() const; |
214 RootInlineBox& root(); | 217 RootInlineBox& root(); |
215 | 218 |
216 // x() is the location of the box in the containing block's "physical | 219 // x() is the location of the box in the containing block's "physical |
217 // coordinates with flipped block-flow direction". | 220 // coordinates with flipped block-flow direction". |
218 // See ../README.md#Coordinate-Spaces for the definition. | 221 // See ../README.md#Coordinate-Spaces for the definition. |
219 void setX(LayoutUnit x) { m_location.setX(x); } | 222 void setX(LayoutUnit x) { m_location.setX(x); } |
220 LayoutUnit x() const { return m_location.x(); } | 223 LayoutUnit x() const { return m_location.x(); } |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 | 549 |
547 } // namespace blink | 550 } // namespace blink |
548 | 551 |
549 #ifndef NDEBUG | 552 #ifndef NDEBUG |
550 // Outside the WebCore namespace for ease of invocation from gdb. | 553 // Outside the WebCore namespace for ease of invocation from gdb. |
551 void showTree(const blink::InlineBox*); | 554 void showTree(const blink::InlineBox*); |
552 void showLineTree(const blink::InlineBox*); | 555 void showLineTree(const blink::InlineBox*); |
553 #endif | 556 #endif |
554 | 557 |
555 #endif // InlineBox_h | 558 #endif // InlineBox_h |
OLD | NEW |