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

Unified Diff: Source/core/layout/line/InlineTextBox.cpp

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/line/InlineTextBox.h ('k') | Source/core/layout/line/RootInlineBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/InlineTextBox.cpp
diff --git a/Source/core/layout/line/InlineTextBox.cpp b/Source/core/layout/line/InlineTextBox.cpp
index 06c8d28ab853af70f60a9f5c727cd6360a63a6d7..a57571c4d00d022d8494ff50ec2932f9bedf557e 100644
--- a/Source/core/layout/line/InlineTextBox.cpp
+++ b/Source/core/layout/line/InlineTextBox.cpp
@@ -95,7 +95,18 @@ void InlineTextBox::setLogicalOverflowRect(const LayoutRect& rect)
ASSERT(!knownToHaveNoOverflow());
if (!gTextBoxesWithOverflow)
gTextBoxesWithOverflow = new InlineTextBoxOverflowMap;
- gTextBoxesWithOverflow->add(this, rect);
+ gTextBoxesWithOverflow->set(this, rect);
+}
+
+void InlineTextBox::move(const LayoutSize& delta)
+{
+ InlineBox::move(delta);
+
+ if (!knownToHaveNoOverflow()) {
+ LayoutRect logicalOverflowRect = this->logicalOverflowRect();
+ logicalOverflowRect.move(isHorizontal() ? delta : delta.transposedSize());
+ setLogicalOverflowRect(logicalOverflowRect);
+ }
}
int InlineTextBox::baselinePosition(FontBaseline baselineType) const
« no previous file with comments | « Source/core/layout/line/InlineTextBox.h ('k') | Source/core/layout/line/RootInlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698