Title: [216438] trunk/Source/WebCore
- Revision
- 216438
- Author
- za...@apple.com
- Date
- 2017-05-08 11:19:31 -0700 (Mon, 08 May 2017)
Log Message
Bail out of simple line layout when hyphen needs a fallback font.
https://bugs.webkit.org/show_bug.cgi?id=171811
Reviewed by Antti Koivisto.
With hyphen: auto is set, we don't know if the hypen string is going to be used, until
after we started laying out the content and figured that the text overflows the line.
However it's too late to bail out of simple line layout at this point, so let's just
pre-check if the hyphen string needs a fallback font.
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForStyle):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (216437 => 216438)
--- trunk/Source/WebCore/ChangeLog 2017-05-08 18:13:52 UTC (rev 216437)
+++ trunk/Source/WebCore/ChangeLog 2017-05-08 18:19:31 UTC (rev 216438)
@@ -1,3 +1,18 @@
+2017-05-08 Zalan Bujtas <za...@apple.com>
+
+ Bail out of simple line layout when hyphen needs a fallback font.
+ https://bugs.webkit.org/show_bug.cgi?id=171811
+
+ Reviewed by Antti Koivisto.
+
+ With hyphen: auto is set, we don't know if the hypen string is going to be used, until
+ after we started laying out the content and figured that the text overflows the line.
+ However it's too late to bail out of simple line layout at this point, so let's just
+ pre-check if the hyphen string needs a fallback font.
+
+ * rendering/SimpleLineLayout.cpp:
+ (WebCore::SimpleLineLayout::canUseForStyle):
+
2017-05-08 Youenn Fablet <you...@apple.com>
TURNS gathering is not working properly
Modified: trunk/Source/WebCore/rendering/SimpleLineLayout.cpp (216437 => 216438)
--- trunk/Source/WebCore/rendering/SimpleLineLayout.cpp 2017-05-08 18:13:52 UTC (rev 216437)
+++ trunk/Source/WebCore/rendering/SimpleLineLayout.cpp 2017-05-08 18:19:31 UTC (rev 216438)
@@ -241,6 +241,11 @@
if (style.trailingWord() != TrailingWord::Auto)
SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonAutoTrailingWord, reasons, includeReasons);
#endif
+ if (style.hyphens() == HyphensAuto) {
+ auto textReasons = canUseForText(style.hyphenString(), style.fontCascade(), std::nullopt, false, includeReasons);
+ if (textReasons != NoReason)
+ SET_REASON_AND_RETURN_IF_NEEDED(textReasons, reasons, includeReasons);
+ }
return reasons;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes