Skip to content

Commit bb2ece1

Browse files
committed
Unprefix -webkit-text-justify and add inter-character value
https://bugs.webkit.org/show_bug.cgi?id=229084 <rdar://82177456> Reviewed by Antti Koivisto. This is still disabled by default behind the cssTextJustifyEnabled setting. We don't keep support for the -webkit- prefix, since only Firefox ships text-justify (without the prefix) and it was never enabled in WebKit for macOS/iOS. distribute and inter-character are aliases, with distribute being the legacy one. The spec specifies it as parse-time, but we implement it compute-time (like Chrome). w3c/csswg-drafts#7322 is filed about potentially removing 'distribute' from the spec. * LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-expected.txt: Removed. * LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited-expected.txt: Removed. * LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html: Removed. * LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html: Removed. Removed parsing tests redundant with WPT. * LayoutTests/fast/css3-text/css3-text-justify/text-justify-none.html: * LayoutTests/fast/text/text-combine-crash.html: * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/resources/resource-files.json: * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-letter-allowed-properties-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-line-allowed-properties-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/inheritance-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-justify-computed-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-justify-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/letter-spacing/letter-spacing-bidi-003.xht: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-001.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-002.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-003.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-004.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-005.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-006.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/distribute-alias.tentative-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/distribute-alias.tentative.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-001-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-002-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-002.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-003-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-003.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-004-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-004.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-005-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-005.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-006-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-006.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-distribute-001-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-distribute-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-inter-character-001-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-inter-character-001-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-inter-character-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-inter-word-001-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-inter-word-001-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-inter-word-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-interpolation-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-interpolation.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-none-001-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-none-001-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-none-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-text/text-justify/w3c-import.log: * LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt: * LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: Import new WPT from 6aa9a39, remove prefixes automatically added by the importer, and rebaseline tests. * Source/WebCore/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * Source/WebCore/css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): * Source/WebCore/css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator TextJustify const): * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/StyleProperties.cpp: * Source/WebCore/css/parser/CSSParserContext.cpp: (WebCore::CSSParserContext::isPropertyRuntimeDisabled const): * Source/WebCore/css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): (WebCore::CSSParserFastPaths::isKeywordPropertyID): * Source/WebCore/rendering/LegacyLineLayout.cpp: (WebCore::LegacyLineLayout::textAlignmentForLine const): * Source/WebCore/rendering/style/RenderStyleConstants.h: * Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js: Canonical link: https://commits.webkit.org/251144@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295049 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 83891b0 commit bb2ece1

File tree

63 files changed

+905
-352
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+905
-352
lines changed

LayoutTests/TestExpectations

+10-2
Original file line numberDiff line numberDiff line change
@@ -2651,8 +2651,6 @@ webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/text-encoding/s
26512651
webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/text-indent/text-indent-tab-positions-001.html [ ImageOnlyFailure ]
26522652
webkit.org/b/240837 imported/w3c/web-platform-tests/css/css-text/text-indent/anonymous-flex-item-001.html [ ImageOnlyFailure ]
26532653
webkit.org/b/240837 imported/w3c/web-platform-tests/css/css-text/text-indent/anonymous-grid-item-001.html [ ImageOnlyFailure ]
2654-
webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-001.html [ ImageOnlyFailure ]
2655-
webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-006.html [ ImageOnlyFailure ]
26562654
webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/text-transform/text-transform-capitalize-018.html [ ImageOnlyFailure Pass ]
26572655
webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/text-transform/text-transform-capitalize-020.html [ ImageOnlyFailure Pass ]
26582656
webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/text-transform/text-transform-capitalize-026.html [ ImageOnlyFailure Pass ]
@@ -2915,6 +2913,16 @@ imported/w3c/web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.htt
29152913
webkit.org/b/76173 fast/css3-text/css3-text-align-last/text-align-last-with-text-align-justify.html [ ImageOnlyFailure ]
29162914
# text-justify
29172915
webkit.org/b/99945 fast/css3-text/css3-text-justify/text-justify-none.html [ ImageOnlyFailure ]
2916+
webkit.org/b/99945 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-001.html [ ImageOnlyFailure ]
2917+
webkit.org/b/99945 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-006.html [ ImageOnlyFailure ]
2918+
webkit.org/b/99945 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-002.html [ ImageOnlyFailure ]
2919+
webkit.org/b/99945 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-003.html [ ImageOnlyFailure ]
2920+
webkit.org/b/99945 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-004.html [ ImageOnlyFailure ]
2921+
webkit.org/b/99945 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-005.html [ ImageOnlyFailure ]
2922+
webkit.org/b/99945 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-and-trailing-spaces-006.html [ ImageOnlyFailure ]
2923+
webkit.org/b/99945 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-distribute-001.html [ ImageOnlyFailure ]
2924+
webkit.org/b/99945 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-inter-character-001.html [ ImageOnlyFailure ]
2925+
webkit.org/b/99945 imported/w3c/web-platform-tests/css/css-text/text-justify/text-justify-inter-word-001.html [ ImageOnlyFailure ]
29182926

29192927
# Link prefetch is disabled by default (needs ENABLE_LINK_PREFETCH)
29202928
webkit.org/b/3652 fast/dom/HTMLLinkElement/link-and-subresource-test.html [ Skip ]

LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-expected.txt

-127
This file was deleted.

LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited-expected.txt

-33
This file was deleted.

LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html

-46
This file was deleted.

LayoutTests/fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html

-83
This file was deleted.

LayoutTests/fast/css3-text/css3-text-justify/text-justify-none.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</div>
2121

2222
<p>text-align: justify, text-justify: none</p>
23-
<div class='test' style='-webkit-text-justify: none;'>
23+
<div class='test' style='text-justify: none;'>
2424
The Culture has achieved artificial intelligences where each Mind has thought processing capabilities many orders of magnitude beyond that of human beings, and data storage drives which, if written out on paper and stored...
2525
</div>
2626
</body>

LayoutTests/fast/text/text-combine-crash.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
function webtest_fn_4() {
101101
var head = document.getElementsByTagName("head")[0];
102102
var style = document.createElement("style");
103-
style.innerHTML="#test {-webkit-box-reflect:above -1073741824pt url(javascript:function(){location.reload()}()) 2147483519mm 0xffffffffpt 4611686018427387904% -4294967295cm round stretch;-webkit-line-break:loose;z-index:-32768;-webkit-text-justify:&#x0270;&#x02c8;;}";
103+
style.innerHTML="#test {-webkit-box-reflect:above -1073741824pt url(javascript:function(){location.reload()}()) 2147483519mm 0xffffffffpt 4611686018427387904% -4294967295cm round stretch;-webkit-line-break:loose;z-index:-32768;}";
104104
head.appendChild(style);
105105
}
106106
webtest_fn_4();

LayoutTests/imported/w3c/resources/resource-files.json

+3
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,9 @@
11751175
"web-platform-tests/css/css-text/text-justify/text-justify-003.html",
11761176
"web-platform-tests/css/css-text/text-justify/text-justify-004.html",
11771177
"web-platform-tests/css/css-text/text-justify/text-justify-005.html",
1178+
"web-platform-tests/css/css-text/text-justify/text-justify-inter-character-001-ref.html",
1179+
"web-platform-tests/css/css-text/text-justify/text-justify-inter-word-001-ref.html",
1180+
"web-platform-tests/css/css-text/text-justify/text-justify-none-001-ref.html",
11781181
"web-platform-tests/css/css-text/word-break/word-break-001.html",
11791182
"web-platform-tests/css/css-text/word-break/word-break-002.html",
11801183
"web-platform-tests/css/css-text/word-break/word-break-003.html",

LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ PASS text-emphasis-color
301301
PASS text-emphasis-position
302302
PASS text-emphasis-style
303303
PASS text-indent
304+
PASS text-justify
304305
PASS text-orientation
305306
PASS text-overflow
306307
PASS text-rendering
@@ -387,7 +388,6 @@ PASS -webkit-rtl-ordering
387388
PASS -webkit-ruby-position
388389
PASS -webkit-text-combine
389390
PASS -webkit-text-fill-color
390-
PASS -webkit-text-justify
391391
PASS -webkit-text-security
392392
PASS -webkit-text-size-adjust
393393
PASS -webkit-text-stroke-color

LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt

+1
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ PASS text-emphasis-color
297297
PASS text-emphasis-position
298298
PASS text-emphasis-style
299299
PASS text-indent
300+
PASS text-justify
300301
PASS text-orientation
301302
PASS text-overflow
302303
PASS text-rendering

LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-letter-allowed-properties-expected.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ PASS margin should be applied to first-letter pseudo elements.
2525
PASS padding should be applied to first-letter pseudo elements.
2626
PASS opacity should be applied to first-letter pseudo elements.
2727
FAIL textDecoration should be applied to first-letter pseudo elements. assert_equals: expected "overline wavy rgb(10, 20, 30)" but got "none"
28-
FAIL textJustify should be applied to first-letter pseudo elements. assert_equals: expected (string) "inter-word" but got (undefined) undefined
28+
PASS textJustify should be applied to first-letter pseudo elements.
2929
PASS textShadow should be applied to first-letter pseudo elements.
3030
PASS textTransform should be applied to first-letter pseudo elements.
3131
PASS textUnderlinePosition should be applied to first-letter pseudo elements.

LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/first-line-allowed-properties-expected.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ PASS fontVariationSettings should be applied to first-line pseudo elements.
2222
PASS letterSpacing should be applied to first-line pseudo elements.
2323
PASS opacity should be applied to first-line pseudo elements.
2424
FAIL textDecoration should be applied to first-line pseudo elements. assert_equals: expected "overline wavy rgb(10, 20, 30)" but got "none"
25-
FAIL textJustify should be applied to first-line pseudo elements. assert_equals: expected (string) "none" but got (undefined) undefined
25+
PASS textJustify should be applied to first-line pseudo elements.
2626
PASS textShadow should be applied to first-line pseudo elements.
2727
PASS textTransform should be applied to first-line pseudo elements.
2828
PASS textUnderlinePosition should be applied to first-line pseudo elements.

LayoutTests/imported/w3c/web-platform-tests/css/css-text/inheritance-expected.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ PASS Property text-align-last has initial value auto
1717
PASS Property text-align-last inherits
1818
PASS Property text-indent has initial value 0px
1919
PASS Property text-indent inherits
20-
FAIL Property text-justify has initial value auto assert_true: text-justify doesn't seem to be supported in the computed style expected true got false
21-
FAIL Property text-justify inherits assert_true: text-justify doesn't seem to be supported in the computed style expected true got false
20+
PASS Property text-justify has initial value auto
21+
PASS Property text-justify inherits
2222
PASS Property text-transform has initial value none
2323
PASS Property text-transform inherits
2424
PASS Property white-space has initial value normal

0 commit comments

Comments
 (0)