Title: [211668] trunk/Source/WebCore
Revision
211668
Author
za...@apple.com
Date
2017-02-03 22:03:29 -0800 (Fri, 03 Feb 2017)

Log Message

Simple line layout: Remove redundant codepath check.
https://bugs.webkit.org/show_bug.cgi?id=167827
<rdar://problem/30361850>

Reviewed by Myles C. Maxfield.

FontCascade::codePath() iterates through the entire text. It's rather wasteful to do twice.

No change in functionality.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::printReason):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (211667 => 211668)


--- trunk/Source/WebCore/ChangeLog	2017-02-04 05:53:39 UTC (rev 211667)
+++ trunk/Source/WebCore/ChangeLog	2017-02-04 06:03:29 UTC (rev 211668)
@@ -1,3 +1,19 @@
+2017-02-03  Zalan Bujtas  <za...@apple.com>
+
+        Simple line layout: Remove redundant codepath check.
+        https://bugs.webkit.org/show_bug.cgi?id=167827
+        <rdar://problem/30361850>
+
+        Reviewed by Myles C. Maxfield.
+
+        FontCascade::codePath() iterates through the entire text. It's rather wasteful to do twice.
+
+        No change in functionality.
+
+        * rendering/SimpleLineLayout.cpp:
+        (WebCore::SimpleLineLayout::canUseForFontAndText):
+        (WebCore::SimpleLineLayout::printReason):
+
 2017-02-03  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         REGRESSION(r204858): Synthetic bold text in vertical writing mode is rotated away from original text

Modified: trunk/Source/WebCore/rendering/SimpleLineLayout.cpp (211667 => 211668)


--- trunk/Source/WebCore/rendering/SimpleLineLayout.cpp	2017-02-04 05:53:39 UTC (rev 211667)
+++ trunk/Source/WebCore/rendering/SimpleLineLayout.cpp	2017-02-04 06:03:29 UTC (rev 211668)
@@ -106,7 +106,7 @@
     FlowTextIsRenderQuote                 = 1LLU  << 40,
     FlowTextIsTextFragment                = 1LLU  << 41,
     FlowTextIsSVGInlineText               = 1LLU  << 42,
-    FlowFontIsNotSimple                   = 1LLU  << 43,
+    FlowHasComplexFontCodePath            = 1LLU  << 43,
     FeatureIsDisabled                     = 1LLU  << 44,
     FlowHasNoParent                       = 1LLU  << 45,
     FlowHasNoChild                        = 1LLU  << 46,
@@ -209,8 +209,8 @@
             SET_REASON_AND_RETURN_IF_NEEDED(FlowTextIsTextFragment, reasons, includeReasons);
         if (textRenderer.isSVGInlineText())
             SET_REASON_AND_RETURN_IF_NEEDED(FlowTextIsSVGInlineText, reasons, includeReasons);
-        if (style.fontCascade().codePath(TextRun(textRenderer.text())) != FontCascade::Simple)
-            SET_REASON_AND_RETURN_IF_NEEDED(FlowFontIsNotSimple, reasons, includeReasons);
+        if (!textRenderer.canUseSimpleFontCodePath())
+            SET_REASON_AND_RETURN_IF_NEEDED(FlowHasComplexFontCodePath, reasons, includeReasons);
 
         auto textReasons = canUseForText(textRenderer, fontCascade, lineHeightConstraint, flowIsJustified, includeReasons);
         if (textReasons != NoReason)
@@ -1051,8 +1051,8 @@
     case FlowTextIsSVGInlineText:
         stream << "unsupported SVGInlineText";
         break;
-    case FlowFontIsNotSimple:
-        stream << "complext font";
+    case FlowHasComplexFontCodePath:
+        stream << "text with complex font codepath";
         break;
     case FlowHasTextShadow:
         stream << "text-shadow";
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to