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 22 matching lines...) Expand all Loading... |
33 class RootInlineBox; | 33 class RootInlineBox; |
34 | 34 |
35 enum MarkLineBoxes { MarkLineBoxesDirty, DontMarkLineBoxes }; | 35 enum MarkLineBoxes { MarkLineBoxesDirty, DontMarkLineBoxes }; |
36 | 36 |
37 // InlineBox represents a rectangle that occurs on a line. It corresponds to | 37 // InlineBox represents a rectangle that occurs on a line. It corresponds to |
38 // some LayoutObject (i.e., it represents a portion of that LayoutObject). | 38 // some LayoutObject (i.e., it represents a portion of that LayoutObject). |
39 class InlineBox { | 39 class InlineBox { |
40 WTF_MAKE_NONCOPYABLE(InlineBox); | 40 WTF_MAKE_NONCOPYABLE(InlineBox); |
41 public: | 41 public: |
42 InlineBox(LayoutObject& obj) | 42 InlineBox(LayoutObject& obj) |
43 : m_next(0) | 43 : m_next(nullptr) |
44 , m_prev(0) | 44 , m_prev(nullptr) |
45 , m_parent(0) | 45 , m_parent(nullptr) |
46 , m_layoutObject(obj) | 46 , m_layoutObject(obj) |
47 , m_logicalWidth() | 47 , m_logicalWidth() |
48 #if ENABLE(ASSERT) | 48 #if ENABLE(ASSERT) |
49 , m_hasBadParent(false) | 49 , m_hasBadParent(false) |
50 #endif | 50 #endif |
51 { | 51 { |
52 } | 52 } |
53 | 53 |
54 InlineBox(LayoutObject& obj, LayoutPoint topLeft, LayoutUnit logicalWidth, b
ool firstLine, bool constructed, | 54 InlineBox(LayoutObject& obj, LayoutPoint topLeft, LayoutUnit logicalWidth, b
ool firstLine, bool constructed, |
55 bool dirty, bool extracted, bool isHorizontal, InlineBox* next, InlineBo
x* prev, InlineFlowBox* parent) | 55 bool dirty, bool extracted, bool isHorizontal, InlineBox* next, InlineBo
x* prev, InlineFlowBox* parent) |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 // InlineBoxes are allocated out of the rendering partition. | 105 // InlineBoxes are allocated out of the rendering partition. |
106 void* operator new(size_t); | 106 void* operator new(size_t); |
107 void operator delete(void*); | 107 void operator delete(void*); |
108 | 108 |
109 #ifndef NDEBUG | 109 #ifndef NDEBUG |
110 void showTreeForThis() const; | 110 void showTreeForThis() const; |
111 void showLineTreeForThis() const; | 111 void showLineTreeForThis() const; |
112 | 112 |
113 virtual void showBox(int = 0) const; | 113 virtual void showBox(int = 0) const; |
114 virtual void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, cons
t InlineBox* = 0, const char* = 0, const LayoutObject* = 0, int = 0) const; | 114 virtual void showLineTreeAndMark(const InlineBox* = nullptr, const char* = n
ullptr, const InlineBox* = nullptr, const char* = nullptr, const LayoutObject* =
nullptr, int = 0) const; |
115 #endif | 115 #endif |
116 | 116 |
117 virtual const char* boxName() const; | 117 virtual const char* boxName() const; |
118 virtual String debugName() const; | 118 virtual String debugName() const; |
119 | 119 |
120 bool isText() const { return m_bitfields.isText(); } | 120 bool isText() const { return m_bitfields.isText(); } |
121 void setIsText(bool isText) { m_bitfields.setIsText(isText); } | 121 void setIsText(bool isText) { m_bitfields.setIsText(isText); } |
122 | 122 |
123 virtual bool isInlineFlowBox() const { return false; } | 123 virtual bool isInlineFlowBox() const { return false; } |
124 virtual bool isInlineTextBox() const { return false; } | 124 virtual bool isInlineTextBox() const { return false; } |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 | 450 |
451 } // namespace blink | 451 } // namespace blink |
452 | 452 |
453 #ifndef NDEBUG | 453 #ifndef NDEBUG |
454 // Outside the WebCore namespace for ease of invocation from gdb. | 454 // Outside the WebCore namespace for ease of invocation from gdb. |
455 void showTree(const blink::InlineBox*); | 455 void showTree(const blink::InlineBox*); |
456 void showLineTree(const blink::InlineBox*); | 456 void showLineTree(const blink::InlineBox*); |
457 #endif | 457 #endif |
458 | 458 |
459 #endif // InlineBox_h | 459 #endif // InlineBox_h |
OLD | NEW |