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

Unified Diff: Source/core/rendering/RenderText.cpp

Issue 721433002: Take text path into account when stripping spaces (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 1 month 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 | « LayoutTests/fast/text/international/complex-text-leading-space-wrapping-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderText.cpp
diff --git a/Source/core/rendering/RenderText.cpp b/Source/core/rendering/RenderText.cpp
index 28033a2a08ccdbc3d7878af570620a5ee8ab5ab3..7947194bcaae2c281aaa329eba3f39e48a243801 100644
--- a/Source/core/rendering/RenderText.cpp
+++ b/Source/core/rendering/RenderText.cpp
@@ -808,7 +808,9 @@ void RenderText::trimmedPrefWidths(float leadWidth,
const Font& font = style()->font(); // FIXME: This ignores first-line.
if (stripFrontSpaces) {
const UChar spaceChar = space;
- float spaceWidth = font.width(constructTextRun(this, font, &spaceChar, 1, style(), direction));
+ TextRun run = constructTextRun(this, font, &spaceChar, 1, style(), direction);
+ run.setUseComplexCodePath(!canUseSimpleFontCodePath());
+ float spaceWidth = font.width(run);
maxWidth -= spaceWidth;
} else {
maxWidth += font.fontDescription().wordSpacing();
« no previous file with comments | « LayoutTests/fast/text/international/complex-text-leading-space-wrapping-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698