OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All r
ights 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 , m_lineLayoutItem(obj) | 49 , m_lineLayoutItem(obj) |
50 , m_logicalWidth() | 50 , m_logicalWidth() |
51 #if ENABLE(ASSERT) | 51 #if ENABLE(ASSERT) |
52 , m_hasBadParent(false) | 52 , m_hasBadParent(false) |
53 #endif | 53 #endif |
54 { | 54 { |
55 } | 55 } |
56 | 56 |
57 InlineBox(LineLayoutItem item, LayoutPoint topLeft, LayoutUnit logicalWidth,
bool firstLine, bool constructed, | 57 InlineBox(LineLayoutItem item, LayoutPoint topLeft, LayoutUnit logicalWidth,
bool firstLine, bool constructed, |
58 bool dirty, bool extracted, bool isHorizontal, InlineBox* next, InlineBo
x* prev, InlineFlowBox* parent) | 58 bool dirty, bool extracted, bool isHorizontal, InlineBox* next, InlineBo
x* prev, InlineFlowBox* parent) |
59 : m_next(next) | 59 : m_bitfields(firstLine, constructed, dirty, extracted, isHorizontal) |
| 60 , m_next(next) |
60 , m_prev(prev) | 61 , m_prev(prev) |
61 , m_parent(parent) | 62 , m_parent(parent) |
62 , m_lineLayoutItem(item) | 63 , m_lineLayoutItem(item) |
63 , m_topLeft(topLeft) | 64 , m_topLeft(topLeft) |
64 , m_logicalWidth(logicalWidth) | 65 , m_logicalWidth(logicalWidth) |
65 , m_bitfields(firstLine, constructed, dirty, extracted, isHorizontal) | |
66 #if ENABLE(ASSERT) | 66 #if ENABLE(ASSERT) |
67 , m_hasBadParent(false) | 67 , m_hasBadParent(false) |
68 #endif | 68 #endif |
69 { | 69 { |
70 } | 70 } |
71 | 71 |
72 virtual ~InlineBox(); | 72 virtual ~InlineBox(); |
73 | 73 |
74 virtual void destroy(); | 74 virtual void destroy(); |
75 | 75 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 }; | 390 }; |
391 #undef ADD_BOOLEAN_BITFIELD | 391 #undef ADD_BOOLEAN_BITFIELD |
392 | 392 |
393 private: | 393 private: |
394 // Converts the given (top-left) position from the logical space of the Inli
neBox to the physical space of the | 394 // Converts the given (top-left) position from the logical space of the Inli
neBox to the physical space of the |
395 // containing block. The size indicates the size of the box whose point is b
eing flipped. | 395 // containing block. The size indicates the size of the box whose point is b
eing flipped. |
396 LayoutPoint logicalPositionToPhysicalPoint(const LayoutPoint&, const LayoutS
ize&) const; | 396 LayoutPoint logicalPositionToPhysicalPoint(const LayoutPoint&, const LayoutS
ize&) const; |
397 | 397 |
398 void setLineLayoutItemShouldDoFullPaintInvalidationIfNeeded(); | 398 void setLineLayoutItemShouldDoFullPaintInvalidationIfNeeded(); |
399 | 399 |
| 400 InlineBoxBitfields m_bitfields; |
| 401 |
400 InlineBox* m_next; // The next element on the same line as us. | 402 InlineBox* m_next; // The next element on the same line as us. |
401 InlineBox* m_prev; // The previous element on the same line as us. | 403 InlineBox* m_prev; // The previous element on the same line as us. |
402 | 404 |
403 InlineFlowBox* m_parent; // The box that contains us. | 405 InlineFlowBox* m_parent; // The box that contains us. |
404 LineLayoutItem m_lineLayoutItem; | 406 LineLayoutItem m_lineLayoutItem; |
405 | 407 |
406 protected: | 408 protected: |
407 // For RootInlineBox | 409 // For RootInlineBox |
408 bool endsWithBreak() const { return m_bitfields.endsWithBreak(); } | 410 bool endsWithBreak() const { return m_bitfields.endsWithBreak(); } |
409 void setEndsWithBreak(bool endsWithBreak) { m_bitfields.setEndsWithBreak(end
sWithBreak); } | 411 void setEndsWithBreak(bool endsWithBreak) { m_bitfields.setEndsWithBreak(end
sWithBreak); } |
(...skipping 10 matching lines...) Expand all Loading... |
420 signed expansion() { return m_bitfields.expansion(); } | 422 signed expansion() { return m_bitfields.expansion(); } |
421 void setExpansion(signed expansion) { m_bitfields.setExpansion(expansion); } | 423 void setExpansion(signed expansion) { m_bitfields.setExpansion(expansion); } |
422 | 424 |
423 // For InlineFlowBox and InlineTextBox | 425 // For InlineFlowBox and InlineTextBox |
424 bool extracted() const { return m_bitfields.extracted(); } | 426 bool extracted() const { return m_bitfields.extracted(); } |
425 | 427 |
426 LayoutPoint m_topLeft; | 428 LayoutPoint m_topLeft; |
427 LayoutUnit m_logicalWidth; | 429 LayoutUnit m_logicalWidth; |
428 | 430 |
429 private: | 431 private: |
430 InlineBoxBitfields m_bitfields; | |
431 | |
432 DISPLAY_ITEM_CACHE_STATUS_IMPLEMENTATION | |
433 | |
434 #if ENABLE(ASSERT) | 432 #if ENABLE(ASSERT) |
435 bool m_hasBadParent; | 433 bool m_hasBadParent; |
436 #endif | 434 #endif |
437 }; | 435 }; |
438 | 436 |
439 #if !ENABLE(ASSERT) | 437 #if !ENABLE(ASSERT) |
440 inline InlineBox::~InlineBox() | 438 inline InlineBox::~InlineBox() |
441 { | 439 { |
442 } | 440 } |
443 #endif | 441 #endif |
(...skipping 13 matching lines...) Expand all Loading... |
457 | 455 |
458 } // namespace blink | 456 } // namespace blink |
459 | 457 |
460 #ifndef NDEBUG | 458 #ifndef NDEBUG |
461 // Outside the WebCore namespace for ease of invocation from gdb. | 459 // Outside the WebCore namespace for ease of invocation from gdb. |
462 void showTree(const blink::InlineBox*); | 460 void showTree(const blink::InlineBox*); |
463 void showLineTree(const blink::InlineBox*); | 461 void showLineTree(const blink::InlineBox*); |
464 #endif | 462 #endif |
465 | 463 |
466 #endif // InlineBox_h | 464 #endif // InlineBox_h |
OLD | NEW |