Title: [282051] trunk/Source/WebCore
Revision
282051
Author
[email protected]
Date
2021-09-05 16:47:34 -0700 (Sun, 05 Sep 2021)

Log Message

Let content with newlineCharacter be measured by FontCascade::widthForSimpleText
https://bugs.webkit.org/show_bug.cgi?id=229849
<rdar://problem/82708348>

Reviewed by Simon Fraser.

Apparently r281978 did not address it properly.

* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::characterCanUseSimplifiedTextMeasuring):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (282050 => 282051)


--- trunk/Source/WebCore/ChangeLog	2021-09-05 19:17:14 UTC (rev 282050)
+++ trunk/Source/WebCore/ChangeLog	2021-09-05 23:47:34 UTC (rev 282051)
@@ -1,3 +1,16 @@
+2021-09-05  Alan Bujtas  <[email protected]>
+
+        Let content with newlineCharacter be measured by FontCascade::widthForSimpleText
+        https://bugs.webkit.org/show_bug.cgi?id=229849
+        <rdar://problem/82708348>
+
+        Reviewed by Simon Fraser.
+
+        Apparently r281978 did not address it properly.
+
+        * platform/graphics/WidthIterator.cpp:
+        (WebCore::WidthIterator::characterCanUseSimplifiedTextMeasuring):
+
 2021-09-05  Antti Koivisto  <[email protected]>
 
         [LFC][Integration] Skip inline boxes in iterator

Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.cpp (282050 => 282051)


--- trunk/Source/WebCore/platform/graphics/WidthIterator.cpp	2021-09-05 19:17:14 UTC (rev 282050)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.cpp	2021-09-05 23:47:34 UTC (rev 282051)
@@ -522,6 +522,12 @@
     // This function needs to be kept in sync with applyCSSVisibilityRules().
 
     switch (character) {
+    case newlineCharacter:
+    case carriageReturn:
+    case zeroWidthNoBreakSpace:
+    case zeroWidthNonJoiner:
+    case zeroWidthJoiner:
+        return true;
     case tabCharacter:
         if (!whitespaceIsCollapsed)
             return false;
@@ -536,13 +542,10 @@
     case rightToLeftOverride:
     case leftToRightIsolate:
     case rightToLeftIsolate:
-    case zeroWidthNonJoiner:
-    case zeroWidthJoiner:
     case popDirectionalFormatting:
     case popDirectionalIsolate:
     case firstStrongIsolate:
     case objectReplacementCharacter:
-    case zeroWidthNoBreakSpace:
         return false;
         break;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to