| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 virtual ~InlineBox(); | 69 virtual ~InlineBox(); |
| 70 | 70 |
| 71 virtual void destroy(); | 71 virtual void destroy(); |
| 72 | 72 |
| 73 virtual void deleteLine(); | 73 virtual void deleteLine(); |
| 74 virtual void extractLine(); | 74 virtual void extractLine(); |
| 75 virtual void attachLine(); | 75 virtual void attachLine(); |
| 76 | 76 |
| 77 virtual bool isLineBreak() const { return false; } | 77 virtual bool isLineBreak() const { return false; } |
| 78 | 78 |
| 79 virtual void adjustPosition(LayoutUnit dx, LayoutUnit dy); | 79 // These methods are called when the caller wants to move the position of In
lineBox without full layout of it. |
| 80 void adjustLogicalPosition(LayoutUnit deltaLogicalLeft, LayoutUnit deltaLogi
calTop) | 80 // The implementation should update the position of the whole subtree (e.g.
position of descendants and overflow etc. |
| 81 { | 81 // should also be moved accordingly). |
| 82 if (isHorizontal()) | 82 virtual void move(const LayoutSize& delta); |
| 83 adjustPosition(deltaLogicalLeft, deltaLogicalTop); | 83 void moveInLogicalDirection(const LayoutSize& deltaInLogicalDirection) { mov
e(isHorizontal() ? deltaInLogicalDirection : deltaInLogicalDirection.transposedS
ize()); } |
| 84 else | 84 void moveInInlineDirection(LayoutUnit delta) { moveInLogicalDirection(Layout
Size(delta, LayoutUnit())); } |
| 85 adjustPosition(deltaLogicalTop, deltaLogicalLeft); | 85 void moveInBlockDirection(LayoutUnit delta) { moveInLogicalDirection(LayoutS
ize(LayoutUnit(), delta)); } |
| 86 } | |
| 87 void adjustLineDirectionPosition(LayoutUnit delta) | |
| 88 { | |
| 89 if (isHorizontal()) | |
| 90 adjustPosition(delta, 0); | |
| 91 else | |
| 92 adjustPosition(0, delta); | |
| 93 } | |
| 94 void adjustBlockDirectionPosition(LayoutUnit delta) | |
| 95 { | |
| 96 if (isHorizontal()) | |
| 97 adjustPosition(0, delta); | |
| 98 else | |
| 99 adjustPosition(delta, 0); | |
| 100 } | |
| 101 | 86 |
| 102 virtual void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop,
LayoutUnit lineBottom); | 87 virtual void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop,
LayoutUnit lineBottom); |
| 103 virtual bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInCo
ntainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit li
neBottom); | 88 virtual bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInCo
ntainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit li
neBottom); |
| 104 | 89 |
| 105 // InlineBoxes are allocated out of the rendering partition. | 90 // InlineBoxes are allocated out of the rendering partition. |
| 106 void* operator new(size_t); | 91 void* operator new(size_t); |
| 107 void operator delete(void*); | 92 void operator delete(void*); |
| 108 | 93 |
| 109 #ifndef NDEBUG | 94 #ifndef NDEBUG |
| 110 void showTreeForThis() const; | 95 void showTreeForThis() const; |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 435 |
| 451 } // namespace blink | 436 } // namespace blink |
| 452 | 437 |
| 453 #ifndef NDEBUG | 438 #ifndef NDEBUG |
| 454 // Outside the WebCore namespace for ease of invocation from gdb. | 439 // Outside the WebCore namespace for ease of invocation from gdb. |
| 455 void showTree(const blink::InlineBox*); | 440 void showTree(const blink::InlineBox*); |
| 456 void showLineTree(const blink::InlineBox*); | 441 void showLineTree(const blink::InlineBox*); |
| 457 #endif | 442 #endif |
| 458 | 443 |
| 459 #endif // InlineBox_h | 444 #endif // InlineBox_h |
| OLD | NEW |