| 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 21 matching lines...) Expand all Loading... |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class HitTestRequest; | 34 class HitTestRequest; |
| 35 class HitTestResult; | 35 class HitTestResult; |
| 36 class RootInlineBox; | 36 class RootInlineBox; |
| 37 | 37 |
| 38 enum MarkLineBoxes { MarkLineBoxesDirty, DontMarkLineBoxes }; | 38 enum MarkLineBoxes { MarkLineBoxesDirty, DontMarkLineBoxes }; |
| 39 | 39 |
| 40 // InlineBox represents a rectangle that occurs on a line. It corresponds to | 40 // InlineBox represents a rectangle that occurs on a line. It corresponds to |
| 41 // some LayoutObject (i.e., it represents a portion of that LayoutObject). | 41 // some LayoutObject (i.e., it represents a portion of that LayoutObject). |
| 42 class InlineBox { | 42 class InlineBox : public DisplayItemClient { |
| 43 WTF_MAKE_NONCOPYABLE(InlineBox); | 43 WTF_MAKE_NONCOPYABLE(InlineBox); |
| 44 public: | 44 public: |
| 45 InlineBox(LayoutObject& obj) | 45 InlineBox(LayoutObject& obj) |
| 46 : m_next(nullptr) | 46 : m_next(nullptr) |
| 47 , m_prev(nullptr) | 47 , m_prev(nullptr) |
| 48 , m_parent(nullptr) | 48 , m_parent(nullptr) |
| 49 , m_layoutObject(obj) | 49 , m_layoutObject(obj) |
| 50 , m_logicalWidth() | 50 , m_logicalWidth() |
| 51 #if ENABLE(ASSERT) | 51 #if ENABLE(ASSERT) |
| 52 , m_hasBadParent(false) | 52 , m_hasBadParent(false) |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 #ifndef NDEBUG | 97 #ifndef NDEBUG |
| 98 void showTreeForThis() const; | 98 void showTreeForThis() const; |
| 99 void showLineTreeForThis() const; | 99 void showLineTreeForThis() const; |
| 100 | 100 |
| 101 virtual void showBox(int = 0) const; | 101 virtual void showBox(int = 0) const; |
| 102 virtual void showLineTreeAndMark(const InlineBox* = nullptr, const char* = n
ullptr, const InlineBox* = nullptr, const char* = nullptr, const LayoutObject* =
nullptr, int = 0) const; | 102 virtual void showLineTreeAndMark(const InlineBox* = nullptr, const char* = n
ullptr, const InlineBox* = nullptr, const char* = nullptr, const LayoutObject* =
nullptr, int = 0) const; |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 virtual const char* boxName() const; | 105 virtual const char* boxName() const; |
| 106 virtual String debugName() const; | 106 String debugName() const override; |
| 107 | 107 |
| 108 bool isText() const { return m_bitfields.isText(); } | 108 bool isText() const { return m_bitfields.isText(); } |
| 109 void setIsText(bool isText) { m_bitfields.setIsText(isText); } | 109 void setIsText(bool isText) { m_bitfields.setIsText(isText); } |
| 110 | 110 |
| 111 virtual bool isInlineFlowBox() const { return false; } | 111 virtual bool isInlineFlowBox() const { return false; } |
| 112 virtual bool isInlineTextBox() const { return false; } | 112 virtual bool isInlineTextBox() const { return false; } |
| 113 virtual bool isRootInlineBox() const { return false; } | 113 virtual bool isRootInlineBox() const { return false; } |
| 114 | 114 |
| 115 virtual bool isSVGInlineTextBox() const { return false; } | 115 virtual bool isSVGInlineTextBox() const { return false; } |
| 116 virtual bool isSVGInlineFlowBox() const { return false; } | 116 virtual bool isSVGInlineFlowBox() const { return false; } |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 FloatPoint flipForWritingMode(const FloatPoint&) const; | 292 FloatPoint flipForWritingMode(const FloatPoint&) const; |
| 293 void flipForWritingMode(LayoutRect&) const; | 293 void flipForWritingMode(LayoutRect&) const; |
| 294 LayoutPoint flipForWritingMode(const LayoutPoint&) const; | 294 LayoutPoint flipForWritingMode(const LayoutPoint&) const; |
| 295 | 295 |
| 296 bool knownToHaveNoOverflow() const { return m_bitfields.knownToHaveNoOverflo
w(); } | 296 bool knownToHaveNoOverflow() const { return m_bitfields.knownToHaveNoOverflo
w(); } |
| 297 void clearKnownToHaveNoOverflow(); | 297 void clearKnownToHaveNoOverflow(); |
| 298 | 298 |
| 299 bool dirOverride() const { return m_bitfields.dirOverride(); } | 299 bool dirOverride() const { return m_bitfields.dirOverride(); } |
| 300 void setDirOverride(bool dirOverride) { m_bitfields.setDirOverride(dirOverri
de); } | 300 void setDirOverride(bool dirOverride) { m_bitfields.setDirOverride(dirOverri
de); } |
| 301 | 301 |
| 302 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi
s); } | |
| 303 | |
| 304 #define ADD_BOOLEAN_BITFIELD(name, Name) \ | 302 #define ADD_BOOLEAN_BITFIELD(name, Name) \ |
| 305 private:\ | 303 private:\ |
| 306 unsigned m_##name : 1;\ | 304 unsigned m_##name : 1;\ |
| 307 public:\ | 305 public:\ |
| 308 bool name() const { return m_##name; }\ | 306 bool name() const { return m_##name; }\ |
| 309 void set##Name(bool name) { m_##name = name; }\ | 307 void set##Name(bool name) { m_##name = name; }\ |
| 310 | 308 |
| 311 class InlineBoxBitfields { | 309 class InlineBoxBitfields { |
| 312 DISALLOW_NEW(); | 310 DISALLOW_NEW(); |
| 313 public: | 311 public: |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 448 |
| 451 } // namespace blink | 449 } // namespace blink |
| 452 | 450 |
| 453 #ifndef NDEBUG | 451 #ifndef NDEBUG |
| 454 // Outside the WebCore namespace for ease of invocation from gdb. | 452 // Outside the WebCore namespace for ease of invocation from gdb. |
| 455 void showTree(const blink::InlineBox*); | 453 void showTree(const blink::InlineBox*); |
| 456 void showLineTree(const blink::InlineBox*); | 454 void showLineTree(const blink::InlineBox*); |
| 457 #endif | 455 #endif |
| 458 | 456 |
| 459 #endif // InlineBox_h | 457 #endif // InlineBox_h |
| OLD | NEW |