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

Unified Diff: Source/core/layout/LayoutBlockFlowLine.cpp

Issue 1207803002: Fix the adjustment to include overflow of negative spacing (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutBlockFlowLine.cpp
diff --git a/Source/core/layout/LayoutBlockFlowLine.cpp b/Source/core/layout/LayoutBlockFlowLine.cpp
index 7f0e96a21f2313bcb6cf67b49091cfccecf0bb9e..e60b0f88213ecdcff7b9087edf5f23086d79e009 100644
--- a/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -435,7 +435,10 @@ static inline void setLogicalWidthForTextRun(RootInlineBox* lineBox, BidiRun* ru
// Negative word-spacing and/or letter-spacing may cause some glyphs to overflow the left boundary and result
// negative measured width. Reset measured width to 0 and adjust glyph bounds accordingly to cover the overflow.
if (measuredWidth < 0) {
- glyphBounds.move(measuredWidth, 0);
+ if (measuredWidth < glyphBounds.x()) {
+ glyphBounds.expand(glyphBounds.x() - measuredWidth, 0);
+ glyphBounds.setX(measuredWidth);
+ }
measuredWidth = 0;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698