Chromium Code Reviews| Index: Source/core/layout/line/InlineBox.h |
| diff --git a/Source/core/layout/line/InlineBox.h b/Source/core/layout/line/InlineBox.h |
| index 5662c9de8f0fce34b5e9d4d0eddfa196930ba5d3..996f7126555e69f62be693f8c3d1c2f29d54a7c6 100644 |
| --- a/Source/core/layout/line/InlineBox.h |
| +++ b/Source/core/layout/line/InlineBox.h |
| @@ -76,28 +76,12 @@ public: |
| virtual bool isLineBreak() const { return false; } |
| - virtual void adjustPosition(LayoutUnit dx, LayoutUnit dy); |
| - void adjustLogicalPosition(LayoutUnit deltaLogicalLeft, LayoutUnit deltaLogicalTop) |
| - { |
| - if (isHorizontal()) |
| - adjustPosition(deltaLogicalLeft, deltaLogicalTop); |
| - else |
| - adjustPosition(deltaLogicalTop, deltaLogicalLeft); |
| - } |
| - void adjustLineDirectionPosition(LayoutUnit delta) |
| - { |
| - if (isHorizontal()) |
| - adjustPosition(delta, 0); |
| - else |
| - adjustPosition(0, delta); |
| - } |
| - void adjustBlockDirectionPosition(LayoutUnit delta) |
| - { |
| - if (isHorizontal()) |
| - adjustPosition(0, delta); |
| - else |
| - adjustPosition(delta, 0); |
| - } |
| + // These methods are called when the caller move the position of InlineBox without full layout of it. |
| + // The implementation should keep all states (e.g. position of children, overflow, etc.) consistent after the move. |
| + virtual void move(const LayoutSize& delta); |
| + void moveInLogicalDirection(const LayoutSize& deltaInLogicalDirection) { move(isHorizontal() ? deltaInLogicalDirection : deltaInLogicalDirection.transposedSize()); } |
| + void moveInLineDirection(LayoutUnit delta) { moveInLogicalDirection(LayoutSize(delta, 0)); } |
|
Xianzhu
2015/06/16 20:43:23
Changed 0 to LayoutUnit().
|
| + void moveInBlockDirection(LayoutUnit delta) { moveInLogicalDirection(LayoutSize(0, delta)); } |
| virtual void paint(const PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom); |
| virtual bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom); |