Title: [284121] trunk/Source/WebCore
Revision
284121
Author
[email protected]
Date
2021-10-13 12:20:58 -0700 (Wed, 13 Oct 2021)

Log Message

Skip fallbackFontsForRunWithIterator for empty runs
https://bugs.webkit.org/show_bug.cgi?id=231542

Patch by Gabriel Nava Marino <[email protected]> on 2021-10-13
Reviewed by Alan Bujtas.

* layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::fallbackFontsForRun):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (284120 => 284121)


--- trunk/Source/WebCore/ChangeLog	2021-10-13 19:13:15 UTC (rev 284120)
+++ trunk/Source/WebCore/ChangeLog	2021-10-13 19:20:58 UTC (rev 284121)
@@ -1,3 +1,13 @@
+2021-10-13  Gabriel Nava Marino  <[email protected]>
+
+        Skip fallbackFontsForRunWithIterator for empty runs
+        https://bugs.webkit.org/show_bug.cgi?id=231542
+
+        Reviewed by Alan Bujtas.
+
+        * layout/formattingContexts/inline/text/TextUtil.cpp:
+        (WebCore::Layout::TextUtil::fallbackFontsForRun):
+
 2021-10-13  Tim Nguyen  <[email protected]>
 
         Remove unused ElementTraversal.h include from HTMLDialogElement.cpp

Modified: trunk/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp (284120 => 284121)


--- trunk/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp	2021-10-13 19:13:15 UTC (rev 284120)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp	2021-10-13 19:20:58 UTC (rev 284121)
@@ -120,6 +120,9 @@
     TextUtil::FallbackFontList fallbackFonts;
 
     auto collectFallbackFonts = [&](const auto& textRun) {
+        if (textRun.text().isEmpty())
+            return;
+
         if (textRun.is8Bit()) {
             auto textIterator = Latin1TextIterator { textRun.data8(0), 0, textRun.length(), textRun.length() };
             fallbackFontsForRunWithIterator(fallbackFonts, style.fontCascade(), textRun, textIterator);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to