| 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_bitfields(firstLine, constructed, dirty, extracted, isHorizontal) | 59 : m_next(next) |
| 60 , m_next(next) | |
| 61 , m_prev(prev) | 60 , m_prev(prev) |
| 62 , m_parent(parent) | 61 , m_parent(parent) |
| 63 , m_lineLayoutItem(item) | 62 , m_lineLayoutItem(item) |
| 64 , m_topLeft(topLeft) | 63 , m_topLeft(topLeft) |
| 65 , m_logicalWidth(logicalWidth) | 64 , 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 | |
| 402 InlineBox* m_next; // The next element on the same line as us. | 400 InlineBox* m_next; // The next element on the same line as us. |
| 403 InlineBox* m_prev; // The previous element on the same line as us. | 401 InlineBox* m_prev; // The previous element on the same line as us. |
| 404 | 402 |
| 405 InlineFlowBox* m_parent; // The box that contains us. | 403 InlineFlowBox* m_parent; // The box that contains us. |
| 406 LineLayoutItem m_lineLayoutItem; | 404 LineLayoutItem m_lineLayoutItem; |
| 407 | 405 |
| 408 protected: | 406 protected: |
| 409 // For RootInlineBox | 407 // For RootInlineBox |
| 410 bool endsWithBreak() const { return m_bitfields.endsWithBreak(); } | 408 bool endsWithBreak() const { return m_bitfields.endsWithBreak(); } |
| 411 void setEndsWithBreak(bool endsWithBreak) { m_bitfields.setEndsWithBreak(end
sWithBreak); } | 409 void setEndsWithBreak(bool endsWithBreak) { m_bitfields.setEndsWithBreak(end
sWithBreak); } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 422 signed expansion() { return m_bitfields.expansion(); } | 420 signed expansion() { return m_bitfields.expansion(); } |
| 423 void setExpansion(signed expansion) { m_bitfields.setExpansion(expansion); } | 421 void setExpansion(signed expansion) { m_bitfields.setExpansion(expansion); } |
| 424 | 422 |
| 425 // For InlineFlowBox and InlineTextBox | 423 // For InlineFlowBox and InlineTextBox |
| 426 bool extracted() const { return m_bitfields.extracted(); } | 424 bool extracted() const { return m_bitfields.extracted(); } |
| 427 | 425 |
| 428 LayoutPoint m_topLeft; | 426 LayoutPoint m_topLeft; |
| 429 LayoutUnit m_logicalWidth; | 427 LayoutUnit m_logicalWidth; |
| 430 | 428 |
| 431 private: | 429 private: |
| 430 InlineBoxBitfields m_bitfields; |
| 431 |
| 432 DISPLAY_ITEM_CACHE_STATUS_IMPLEMENTATION |
| 433 |
| 432 #if ENABLE(ASSERT) | 434 #if ENABLE(ASSERT) |
| 433 bool m_hasBadParent; | 435 bool m_hasBadParent; |
| 434 #endif | 436 #endif |
| 435 }; | 437 }; |
| 436 | 438 |
| 437 #if !ENABLE(ASSERT) | 439 #if !ENABLE(ASSERT) |
| 438 inline InlineBox::~InlineBox() | 440 inline InlineBox::~InlineBox() |
| 439 { | 441 { |
| 440 } | 442 } |
| 441 #endif | 443 #endif |
| (...skipping 13 matching lines...) Expand all Loading... |
| 455 | 457 |
| 456 } // namespace blink | 458 } // namespace blink |
| 457 | 459 |
| 458 #ifndef NDEBUG | 460 #ifndef NDEBUG |
| 459 // Outside the WebCore namespace for ease of invocation from gdb. | 461 // Outside the WebCore namespace for ease of invocation from gdb. |
| 460 void showTree(const blink::InlineBox*); | 462 void showTree(const blink::InlineBox*); |
| 461 void showLineTree(const blink::InlineBox*); | 463 void showLineTree(const blink::InlineBox*); |
| 462 #endif | 464 #endif |
| 463 | 465 |
| 464 #endif // InlineBox_h | 466 #endif // InlineBox_h |
| OLD | NEW |