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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 , m_logicalWidth(logicalWidth) | 56 , m_logicalWidth(logicalWidth) |
57 , m_bitfields(firstLine, constructed, dirty, extracted, isHorizontal) | 57 , m_bitfields(firstLine, constructed, dirty, extracted, isHorizontal) |
58 #ifndef NDEBUG | 58 #ifndef NDEBUG |
59 , m_hasBadParent(false) | 59 , m_hasBadParent(false) |
60 #endif | 60 #endif |
61 { | 61 { |
62 } | 62 } |
63 | 63 |
64 virtual ~InlineBox(); | 64 virtual ~InlineBox(); |
65 | 65 |
66 virtual void destroy(RenderArena*); | 66 virtual void destroy() { delete this; } |
67 | 67 |
68 virtual void deleteLine(RenderArena*); | 68 virtual void deleteLine(); |
69 virtual void extractLine(); | 69 virtual void extractLine(); |
70 virtual void attachLine(); | 70 virtual void attachLine(); |
71 | 71 |
72 virtual bool isLineBreak() const { return false; } | 72 virtual bool isLineBreak() const { return false; } |
73 | 73 |
74 virtual void adjustPosition(float dx, float dy); | 74 virtual void adjustPosition(float dx, float dy); |
75 void adjustLogicalPosition(float deltaLogicalLeft, float deltaLogicalTop) | 75 void adjustLogicalPosition(float deltaLogicalLeft, float deltaLogicalTop) |
76 { | 76 { |
77 if (isHorizontal()) | 77 if (isHorizontal()) |
78 adjustPosition(deltaLogicalLeft, deltaLogicalTop); | 78 adjustPosition(deltaLogicalLeft, deltaLogicalTop); |
(...skipping 11 matching lines...) Expand all Loading... |
90 { | 90 { |
91 if (isHorizontal()) | 91 if (isHorizontal()) |
92 adjustPosition(0, delta); | 92 adjustPosition(0, delta); |
93 else | 93 else |
94 adjustPosition(delta, 0); | 94 adjustPosition(delta, 0); |
95 } | 95 } |
96 | 96 |
97 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
tUnit lineBottom); | 97 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
tUnit lineBottom); |
98 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom); | 98 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
lineTop, LayoutUnit lineBottom); |
99 | 99 |
100 // Overloaded new operator. | 100 // InlineBoxes are allocated out of the rendering partition. |
101 void* operator new(size_t, RenderArena*); | 101 void* operator new(size_t); |
102 | 102 void operator delete(void*); |
103 // Overridden to prevent the normal delete from being called. | |
104 void operator delete(void*, size_t); | |
105 | |
106 private: | |
107 // The normal operator new is disallowed. | |
108 void* operator new(size_t) throw(); | |
109 | 103 |
110 public: | 104 public: |
111 #ifndef NDEBUG | 105 #ifndef NDEBUG |
112 void showTreeForThis() const; | 106 void showTreeForThis() const; |
113 void showLineTreeForThis() const; | 107 void showLineTreeForThis() const; |
114 | 108 |
115 virtual void showBox(int = 0) const; | 109 virtual void showBox(int = 0) const; |
116 virtual void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, cons
t InlineBox* = 0, const char* = 0, const RenderObject* = 0, int = 0) const; | 110 virtual void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, cons
t InlineBox* = 0, const char* = 0, const RenderObject* = 0, int = 0) const; |
117 virtual const char* boxName() const; | 111 virtual const char* boxName() const; |
118 #endif | 112 #endif |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 429 |
436 } // namespace WebCore | 430 } // namespace WebCore |
437 | 431 |
438 #ifndef NDEBUG | 432 #ifndef NDEBUG |
439 // Outside the WebCore namespace for ease of invocation from gdb. | 433 // Outside the WebCore namespace for ease of invocation from gdb. |
440 void showTree(const WebCore::InlineBox*); | 434 void showTree(const WebCore::InlineBox*); |
441 void showLineTree(const WebCore::InlineBox*); | 435 void showLineTree(const WebCore::InlineBox*); |
442 #endif | 436 #endif |
443 | 437 |
444 #endif // InlineBox_h | 438 #endif // InlineBox_h |
OLD | NEW |