| 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 // Invalidate display item clients in the whole sub inline box tree. | 302 // Invalidate display item clients in the whole sub inline box tree. |
| 304 void invalidateDisplayItemClientsRecursively(); | 303 void invalidateDisplayItemClientsRecursively(); |
| 305 | 304 |
| 306 #define ADD_BOOLEAN_BITFIELD(name, Name) \ | 305 #define ADD_BOOLEAN_BITFIELD(name, Name) \ |
| 307 private:\ | 306 private:\ |
| 308 unsigned m_##name : 1;\ | 307 unsigned m_##name : 1;\ |
| 309 public:\ | 308 public:\ |
| 310 bool name() const { return m_##name; }\ | 309 bool name() const { return m_##name; }\ |
| 311 void set##Name(bool name) { m_##name = name; }\ | 310 void set##Name(bool name) { m_##name = name; }\ |
| 312 | 311 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 | 451 |
| 453 } // namespace blink | 452 } // namespace blink |
| 454 | 453 |
| 455 #ifndef NDEBUG | 454 #ifndef NDEBUG |
| 456 // Outside the WebCore namespace for ease of invocation from gdb. | 455 // Outside the WebCore namespace for ease of invocation from gdb. |
| 457 void showTree(const blink::InlineBox*); | 456 void showTree(const blink::InlineBox*); |
| 458 void showLineTree(const blink::InlineBox*); | 457 void showLineTree(const blink::InlineBox*); |
| 459 #endif | 458 #endif |
| 460 | 459 |
| 461 #endif // InlineBox_h | 460 #endif // InlineBox_h |
| OLD | NEW |