Title: [283872] trunk
Revision
283872
Author
[email protected]
Date
2021-10-09 21:41:40 -0700 (Sat, 09 Oct 2021)

Log Message

Ideographic space behaves as breaking space
https://bugs.webkit.org/show_bug.cgi?id=231480

Reviewed by Antti Koivisto.

Source/WebCore:

We should be able to break at U+3000.
See https://drafts.csswg.org/css-text-3/#word-break-property and https://www.unicode.org/reports/tr14/tr14-47.html

* layout/formattingContexts/inline/InlineTextItem.cpp:
(WebCore::Layout::moveToNextNonWhitespacePosition):
* rendering/BreakLines.h:
(WebCore::isBreakableSpace):

LayoutTests:

* TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (283871 => 283872)


--- trunk/LayoutTests/ChangeLog	2021-10-09 22:01:37 UTC (rev 283871)
+++ trunk/LayoutTests/ChangeLog	2021-10-10 04:41:40 UTC (rev 283872)
@@ -1,3 +1,12 @@
+2021-10-09  Alan Bujtas  <[email protected]>
+
+        Ideographic space behaves as breaking space
+        https://bugs.webkit.org/show_bug.cgi?id=231480
+
+        Reviewed by Antti Koivisto.
+
+        * TestExpectations:
+
 2021-10-09  Simon Fraser  <[email protected]>
 
         Run smooth scroll animations on the scrolling thread

Modified: trunk/LayoutTests/TestExpectations (283871 => 283872)


--- trunk/LayoutTests/TestExpectations	2021-10-09 22:01:37 UTC (rev 283871)
+++ trunk/LayoutTests/TestExpectations	2021-10-10 04:41:40 UTC (rev 283872)
@@ -2619,7 +2619,6 @@
 webkit.org/b/195275 imported/w3c/web-platform-tests/css/css-text/white-space/line-edge-white-space-collapse-002.html [ ImageOnlyFailure ]
 webkit.org/b/195275 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-020.html [ ImageOnlyFailure ]
 webkit.org/b/195275 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-keep-all-006.html [ ImageOnlyFailure ]
-webkit.org/b/195275 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-keep-all-005.html [ ImageOnlyFailure ]
 webkit.org/b/195275 imported/w3c/web-platform-tests/css/css-text/writing-system/writing-system-segment-break-001.html [ ImageOnlyFailure ]
 webkit.org/b/195275 imported/w3c/web-platform-tests/css/css-text/writing-system/writing-system-line-break-002.html [ ImageOnlyFailure ]
 webkit.org/b/195275 imported/w3c/web-platform-tests/css/css-text/writing-system/writing-system-text-transform-001.html [ ImageOnlyFailure ]
@@ -4483,8 +4482,6 @@
 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/word-boundary/word-boundary-128.html [ ImageOnlyFailure ]
 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/word-boundary/word-boundary-129.html [ ImageOnlyFailure ]
 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-inline-008.html [ ImageOnlyFailure ]
-webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-keep-all-007.html [ ImageOnlyFailure ]
-webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-keep-all-008.html [ ImageOnlyFailure ]
 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-min-content-003.html [ ImageOnlyFailure ]
 webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/word-break/word-break-min-content-006.html [ ImageOnlyFailure ]
 

Modified: trunk/Source/WebCore/ChangeLog (283871 => 283872)


--- trunk/Source/WebCore/ChangeLog	2021-10-09 22:01:37 UTC (rev 283871)
+++ trunk/Source/WebCore/ChangeLog	2021-10-10 04:41:40 UTC (rev 283872)
@@ -1,3 +1,18 @@
+2021-10-09  Alan Bujtas  <[email protected]>
+
+        Ideographic space behaves as breaking space
+        https://bugs.webkit.org/show_bug.cgi?id=231480
+
+        Reviewed by Antti Koivisto.
+
+        We should be able to break at U+3000.
+        See https://drafts.csswg.org/css-text-3/#word-break-property and https://www.unicode.org/reports/tr14/tr14-47.html
+
+        * layout/formattingContexts/inline/InlineTextItem.cpp:
+        (WebCore::Layout::moveToNextNonWhitespacePosition):
+        * rendering/BreakLines.h:
+        (WebCore::isBreakableSpace):
+
 2021-10-09  Simon Fraser  <[email protected]>
 
         Run smooth scroll animations on the scrolling thread

Modified: trunk/Source/WebCore/rendering/BreakLines.h (283871 => 283872)


--- trunk/Source/WebCore/rendering/BreakLines.h	2021-10-09 22:01:37 UTC (rev 283871)
+++ trunk/Source/WebCore/rendering/BreakLines.h	2021-10-10 04:41:40 UTC (rev 283872)
@@ -132,9 +132,12 @@
 template<typename CharacterType, NonBreakingSpaceBehavior nonBreakingSpaceBehavior>
 inline unsigned nextBreakablePositionKeepingAllWords(const CharacterType* string, unsigned length, unsigned startPosition)
 {
+    // FIXME: Use ICU instead.
     for (unsigned i = startPosition; i < length; i++) {
         if (isBreakableSpace<nonBreakingSpaceBehavior>(string[i]))
             return i;
+        if (string[i] == ideographicSpace)
+            return i + 1;
     }
     return length;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to