Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1212)

Unified Diff: Source/core/layout/line/InlineBox.h

Issue 1183003003: Move overflow in InlineTextBox::adjustPosition() if it has glyph overflows (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698