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

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: 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
« no previous file with comments | « Source/core/layout/LayoutListItem.cpp ('k') | Source/core/layout/line/InlineBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..db1fecfb863d13b96b2088e99612dd08db267f8d 100644
--- a/Source/core/layout/line/InlineBox.h
+++ b/Source/core/layout/line/InlineBox.h
@@ -76,28 +76,13 @@ 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 wants to move the position of InlineBox without full layout of it.
+ // The implementation should update the position of the whole subtree (e.g. position of descendants and overflow etc.
+ // should also be moved accordingly).
+ virtual void move(const LayoutSize& delta);
+ void moveInLogicalDirection(const LayoutSize& deltaInLogicalDirection) { move(isHorizontal() ? deltaInLogicalDirection : deltaInLogicalDirection.transposedSize()); }
+ void moveInInlineDirection(LayoutUnit delta) { moveInLogicalDirection(LayoutSize(delta, LayoutUnit())); }
+ void moveInBlockDirection(LayoutUnit delta) { moveInLogicalDirection(LayoutSize(LayoutUnit(), 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);
« no previous file with comments | « Source/core/layout/LayoutListItem.cpp ('k') | Source/core/layout/line/InlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698