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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutText.cpp

Issue 2621563002: Merge 2924: Fix 'hyphens: auto' to work only when line wrapping is allowed (Closed)
Patch Set: Created 3 years, 11 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: third_party/WebKit/Source/core/layout/LayoutText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp
index 23ccbf0b5b6e46b4a8a9c87e885174e19b14f83d..540fe25c2a7f397e0280c7fb0a4c77bacf439d78 100644
--- a/third_party/WebKit/Source/core/layout/LayoutText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
@@ -1073,7 +1073,8 @@ void LayoutText::computePreferredLogicalWidths(
bool keepAll =
styleToUse.wordBreak() == KeepAllWordBreak && styleToUse.autoWrap();
- Hyphenation* hyphenation = styleToUse.getHyphenation();
+ Hyphenation* hyphenation =
+ styleToUse.autoWrap() ? styleToUse.getHyphenation() : nullptr;
bool disableSoftHyphen = styleToUse.getHyphens() == HyphensNone;
float maxWordWidth = 0;
if (!hyphenation)

Powered by Google App Engine
This is Rietveld 408576698