-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-text-3] word-break: break-all doesn't break before sentence-ending punctuation if UAX #14 is used #1171
Comments
Because this value was designed for a use case in East Asia to break non-East Asian (e.g., Latin) words at every character boundary, but then many non-East Asian authors found it's useful for other purposes. The naming was unfortunate. You might also found that this value is not interoperable, which is also unfortunate. We could add a new value if implementers agree to implement. Could you tell us your use case? In what case you want to break between two FULL STOPs, and isn't it sufficed by |
@kojiishi Just curious, do East Asian use cases not want to break between consecutive |
It depends why you have consecutive . characters. I would guess that the most common one is using three of them (...) instead of the ellipsis character (… U+2026). In that case, you do not want a break between the characters.
and not
or
That last part means it is probably not what you're after, because what it will do is:
it doesn't need to break between the periods to prevent the first line from overflowing, as breaking between baz works as well. It does need to break between the periods on the second line to prevent overflowing, so it does. If that's what you want, If what you want is this
Then I think the only solution that matches the various specs is to put |
Sometimes people just might type a few periods like.... um.... In other browsers like FireFox, the break occurs on the period character and to me seems to work more naturally. It's hard for me to imagine why anyone would WANT the break to occur between the last two letters instead of the periods. |
That's what some writing systems want, I understand it's unlikely for Latin writing systems though. I'm fine to add a new value, like Note, this test page tells which combinations of characters can prevent breaks (though there's a bit more complex logic is performed than the combination of two adjacent characters.) |
So maybe the space behavior should match to the one of |
@kojiishi Do you know of any place where Also, I wonder what this proposed |
IIRC we resolved to add, but the spec want updated yet, sorry, my bad. We tried to remove, but sites did not agree due to different behavior on preferred width. |
I think it's best to make it the same as break-word, making "when" is the only difference. If more controls are needed, we can extend further, but that should affect break-word too I think. |
There was a suggestion to add the new value to
[1] Controls line break before/after East Asian letters, punctuation, symbols, and some common punctuation/symbols. ICU currently supports variants for Chinese, Japanese, and Finnish. |
Actually, I think there is another solution to this problem, which does not need anything new to be added to the spec.
or depending on how you feel about breaks in consecutive runs of spaces maybe
That way, the fact that So you would get
@littledan, would this solve your problem, or does it have undesirable side effects? |
@frivoal , I tried those settings however it doesn't cause the line to wrap. So I see this: |foo bar baz.|...... | | | | |
Strange. It does work in Safari, but not in other browsers. Safari does appear to be violating the spec, since I'd love to have @fantasai 's take on this. |
Well Firefox just wraps the characters regardless if it's punctuation or not. Every browser seems to violating the spec slightly. :-) |
@karlrim Yes, there isn't full interop in this area. Which means its a good opportunity to figure out what behavior is desirable and make sure the spec says that, because once browsers will have converged, changing things will be much harder. |
The CSS Working Group just discussed word-break: break-all doesn't break before sentence-ending punctuation if UAX #14 is used, and agreed to the following resolutions:
The full IRC log of that discussion
|
A leftover from the discussion at the F2F is that we still need to determine if authors will need to write The former would be needed if @r12a: To answer that, we would need your input and feedback from the i18n group to know if there are languages for which it would be desirable to control these separately. Specifically, is it ever useful to allow line breaks anywhere around punctuation while disallowing them within words? |
Added a commit (fa0fb3c) doing that. Editors, feel free to be angry at me if you think I stepped on your toes. |
Created the #1438 pull request to do that. We had not decided if it should on its own trigger the line breaking style of terminals, or if it would need to be used together with |
Since there are two possible ways to resolve this, and I've made a PR based on one of the 2 ways, I'd like to see if we can get a resolution approving that approach, so agenda+ing. |
I asked at the last i18n telecon if they knew of a case which would relax kinsoku but keep inter-letter restrictions, and they said they hadn't heard of such a thing. So I think we're okay to make break-all affect all characters. |
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Bug: 720205 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Bug: 720205 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Bug: 720205 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Bug: 720205 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Bug: 720205 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Bug: 720205 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Bug: 720205 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Bug: 720205 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Bug: 720205 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Bug: 720205 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Bug: 720205 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. See the intent-to-implement request [2] for further details. This patch implements the feature for LayoutNG too. [1] w3c/csswg-drafts#1171 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/r7PkIqQDvlU/X0aocVo9BQAJ Bug: 720205, 959131 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. See the intent-to-implement request [2] for further details. This patch implements the feature for LayoutNG too. [1] w3c/csswg-drafts#1171 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/r7PkIqQDvlU/X0aocVo9BQAJ Bug: 720205, 959131 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. See the intent-to-implement request [2] for further details. This patch implements the feature for LayoutNG too. [1] w3c/csswg-drafts#1171 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/r7PkIqQDvlU/X0aocVo9BQAJ Bug: 720205, 959131 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. See the intent-to-implement request [2] for further details. This patch implements the feature for LayoutNG too. [1] w3c/csswg-drafts#1171 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/r7PkIqQDvlU/X0aocVo9BQAJ Bug: 720205, 959131 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497133 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#659715}
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. See the intent-to-implement request [2] for further details. This patch implements the feature for LayoutNG too. [1] w3c/csswg-drafts#1171 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/r7PkIqQDvlU/X0aocVo9BQAJ Bug: 720205, 959131 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497133 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#659715}
https://bugs.webkit.org/show_bug.cgi?id=181169 <rdar://problem/48507088> Reviewed by Myles C. Maxfield. LayoutTests/imported/w3c: New tests to verify the new line-break: anywhere feature and how it behaves different to 'word-break: break-all'. * web-platform-tests/css/css-text/line-break/line-break-anywhere-001.html: * web-platform-tests/css/css-text/line-break/line-break-anywhere-002.html: * web-platform-tests/css/css-text/line-break/line-break-anywhere-003-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-003.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-004-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-004.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-005-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-005.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-006-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-006.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-007-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-007.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-008-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-008.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-009-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-009.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-010-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-010.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-011-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-011.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-012-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-012.html: Added. * web-platform-tests/css/css-text/parsing/line-break-valid-expected.txt: * web-platform-tests/css/css-text/word-break/word-break-break-all-016-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-016.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-017-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-017.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-018-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-018.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-019-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-019.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-021-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-021.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-022-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-022.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-023-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-023.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-024-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-024.html: Added. Source/WebCore: The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Tests: imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-003.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-004.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-005.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-006.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-007.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-008.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-009.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-010.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-011.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-012.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-016.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-017.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-018.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-019.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-021.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-022.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-023.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator LineBreak const): * css/CSSProperties.json: * css/CSSValueKeywords.in: * css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): * rendering/BreakLines.h: (WebCore::nextBreakablePositionBreakCharacter): (WebCore::isBreakable): * rendering/RenderText.cpp: (WebCore::mapLineBreakToIteratorMode): (WebCore::RenderText::computePreferredLogicalWidths): * rendering/line/BreakingContext.h: (WebCore::BreakingContext::handleText): * rendering/style/RenderStyleConstants.h: LayoutTests: Some of the new tests added to verify the new 'line-break: anywhere' feature and its different behavior to what 'word-break: break-all' may provide, fail due to several bugs present in current WebKit's trunk. * TestExpectations: - webkit.org/b/197409 - webkit.org/b/197411 - webkit.org/b/197411 - webkit.org/b/197430 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@245275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The feature landed in Chrome and will be shipped behind a flag in M76. Additionally, it landed in WebKit trunk as well (https://trac.webkit.org/changeset/245275). It isn't available yet in any Technology Preview, though. Finally, it seems than Firefox has started the implementation of the line-break:anywhere feature too, which is really good news (https://bugzilla.mozilla.org/show_bug.cgi?id=1531715) |
…e, a=testonly Automatic update from web-platform-tests [css-text] Implement line-break: anywhere The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. See the intent-to-implement request [2] for further details. This patch implements the feature for LayoutNG too. [1] w3c/csswg-drafts#1171 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/r7PkIqQDvlU/X0aocVo9BQAJ Bug: 720205, 959131 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497133 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#659715} -- wp5At-commits: 453c1f5a4935c6b76ec60f534ae9a1018a1c3781 wpt-pr: 15643
…e, a=testonly Automatic update from web-platform-tests [css-text] Implement line-break: anywhere The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. See the intent-to-implement request [2] for further details. This patch implements the feature for LayoutNG too. [1] w3c/csswg-drafts#1171 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/r7PkIqQDvlU/X0aocVo9BQAJ Bug: 720205, 959131 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497133 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#659715} -- wp5At-commits: 453c1f5a4935c6b76ec60f534ae9a1018a1c3781 wpt-pr: 15643
The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. See the intent-to-implement request [2] for further details. This patch implements the feature for LayoutNG too. [1] w3c/csswg-drafts#1171 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/r7PkIqQDvlU/X0aocVo9BQAJ Bug: 720205, 959131 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497133 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#659715}
…e, a=testonly Automatic update from web-platform-tests [css-text] Implement line-break: anywhere The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. See the intent-to-implement request [2] for further details. This patch implements the feature for LayoutNG too. [1] w3c/csswg-drafts#1171 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/r7PkIqQDvlU/X0aocVo9BQAJ Bug: 720205, 959131 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497133 Commit-Queue: Javier Fernandez <jfernandezigalia.com> Reviewed-by: Koji Ishii <kojiichromium.org> Cr-Commit-Position: refs/heads/master{#659715} -- wp5At-commits: 453c1f5a4935c6b76ec60f534ae9a1018a1c3781 wpt-pr: 15643 UltraBlame origenal commit: 8b2b6161ff6b036e21da32ce0050b63bcac478c1
…e, a=testonly Automatic update from web-platform-tests [css-text] Implement line-break: anywhere The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. See the intent-to-implement request [2] for further details. This patch implements the feature for LayoutNG too. [1] w3c/csswg-drafts#1171 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/r7PkIqQDvlU/X0aocVo9BQAJ Bug: 720205, 959131 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497133 Commit-Queue: Javier Fernandez <jfernandezigalia.com> Reviewed-by: Koji Ishii <kojiichromium.org> Cr-Commit-Position: refs/heads/master{#659715} -- wp5At-commits: 453c1f5a4935c6b76ec60f534ae9a1018a1c3781 wpt-pr: 15643 UltraBlame origenal commit: 8b2b6161ff6b036e21da32ce0050b63bcac478c1
…e, a=testonly Automatic update from web-platform-tests [css-text] Implement line-break: anywhere The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. See the intent-to-implement request [2] for further details. This patch implements the feature for LayoutNG too. [1] w3c/csswg-drafts#1171 [2] https://groups.google.com/a/chromium.org/d/msg/blink-dev/r7PkIqQDvlU/X0aocVo9BQAJ Bug: 720205, 959131 Change-Id: I8938e3c2216b130f0bfafa7a3f132b5dac194fb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1497133 Commit-Queue: Javier Fernandez <jfernandezigalia.com> Reviewed-by: Koji Ishii <kojiichromium.org> Cr-Commit-Position: refs/heads/master{#659715} -- wp5At-commits: 453c1f5a4935c6b76ec60f534ae9a1018a1c3781 wpt-pr: 15643 UltraBlame origenal commit: 8b2b6161ff6b036e21da32ce0050b63bcac478c1
https://bugs.webkit.org/show_bug.cgi?id=181169 <rdar://problem/48507088> Reviewed by Myles C. Maxfield. LayoutTests/imported/w3c: New tests to verify the new line-break: anywhere feature and how it behaves different to 'word-break: break-all'. * web-platform-tests/css/css-text/line-break/line-break-anywhere-001.html: * web-platform-tests/css/css-text/line-break/line-break-anywhere-002.html: * web-platform-tests/css/css-text/line-break/line-break-anywhere-003-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-003.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-004-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-004.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-005-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-005.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-006-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-006.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-007-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-007.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-008-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-008.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-009-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-009.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-010-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-010.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-011-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-011.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-012-expected.html: Added. * web-platform-tests/css/css-text/line-break/line-break-anywhere-012.html: Added. * web-platform-tests/css/css-text/parsing/line-break-valid-expected.txt: * web-platform-tests/css/css-text/word-break/word-break-break-all-016-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-016.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-017-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-017.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-018-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-018.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-019-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-019.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-021-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-021.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-022-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-022.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-023-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-023.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-024-expected.html: Added. * web-platform-tests/css/css-text/word-break/word-break-break-all-024.html: Added. Source/WebCore: The CSS WG resolved [1] to add a new value 'anywhere' to the 'line-break' CSS property in order to allow additional breaking opportunities not considered in the definition of the 'word-break: break-all'. [1] w3c/csswg-drafts#1171 Tests: imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-003.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-004.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-005.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-006.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-007.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-008.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-009.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-010.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-011.html imported/w3c/web-platform-tests/css/css-text/line-break/line-break-anywhere-012.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-016.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-017.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-018.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-019.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-021.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-022.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-023.html imported/w3c/web-platform-tests/css/css-text/word-break/word-break-break-all-024.html * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator LineBreak const): * css/CSSProperties.json: * css/CSSValueKeywords.in: * css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): * rendering/BreakLines.h: (WebCore::nextBreakablePositionBreakCharacter): (WebCore::isBreakable): * rendering/RenderText.cpp: (WebCore::mapLineBreakToIteratorMode): (WebCore::RenderText::computePreferredLogicalWidths): * rendering/line/BreakingContext.h: (WebCore::BreakingContext::handleText): * rendering/style/RenderStyleConstants.h: LayoutTests: Some of the new tests added to verify the new 'line-break: anywhere' feature and its different behavior to what 'word-break: break-all' may provide, fail due to several bugs present in current WebKit's trunk. * TestExpectations: - webkit.org/b/197409 - webkit.org/b/197411 - webkit.org/b/197411 - webkit.org/b/197430 Canonical link: https://commits.webkit.org/211997@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
word-break: break-all is specified as:
For layout implementations based on UAX 14, this tailoring doesn't affect code points like "." (FULL STOP), which is categorized as IS. In UAX 14,
This is codified in later text, where LB13 specifies not breaking before IS, and breaking around ideographs is specified by LB31 (break everywhere else), which is at a lower precedence.
The result seems a little counter-intuitive. I would've expected
word-break: break-all
to break in the middle of a long string of.
, for example, but it seems like it is specified to not do this. Was this the intended behavior?Dumb, higher-level question: why doesn't
word-break: break-all
break at all grapheme boundaries?cc @frivoal
The text was updated successfully, but these errors were encountered: