Changeset 293521 in webkit
- Timestamp:
- Apr 27, 2022 11:56:04 AM (3 months ago)
- Location:
- trunk
- Files:
-
- 24 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (modified) (1 diff)
-
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-text/overflow-wrap/word-wrap-alias-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt (modified) (1 diff)
-
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt (modified) (1 diff)
-
LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt (modified) (1 diff)
-
LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt (modified) (1 diff)
-
LayoutTests/svg/css/getComputedStyle-basic-expected.txt (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/animation/CSSPropertyAnimation.cpp (modified) (1 diff)
-
Source/WebCore/css/CSSComputedStyleDeclaration.cpp (modified) (1 diff)
-
Source/WebCore/css/CSSProperties.json (modified) (2 diffs)
-
Source/WebCore/css/parser/CSSParserFastPaths.cpp (modified) (2 diffs)
-
Source/WebCore/editing/Editor.cpp (modified) (1 diff)
-
Source/WebCore/html/HTMLElement.cpp (modified) (1 diff)
-
Source/WebCore/html/HTMLTextAreaElement.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r293517 r293521 1 2022-04-27 Tim Nguyen <ntim@apple.com> 2 3 [css-text] Make word-wrap CSS property an alias of overflow-wrap 4 https://bugs.webkit.org/show_bug.cgi?id=166782 5 6 Reviewed by Antti Koivisto. 7 8 This follows the spec, and fixes cascade issues when applying both properties (see bug 239579). 9 10 Relevant WPT expectations updated to pass. 11 12 * fast/css/getComputedStyle/computed-style-expected.txt: 13 * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 14 * platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: 15 * platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: 16 * platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: 17 * platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: 18 * platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt: 19 * platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: 20 * platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: 21 * svg/css/getComputedStyle-basic-expected.txt: 22 1 23 2022-04-27 Truitt Savell <tsavell@apple.com> 2 24 -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
r293089 r293521 204 204 word-break: normal; 205 205 word-spacing: 0px; 206 word-wrap: normal;207 206 writing-mode: horizontal-tb; 208 207 z-index: auto; -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r293089 r293521 203 203 word-break: normal 204 204 word-spacing: 0px 205 word-wrap: normal206 205 writing-mode: horizontal-tb 207 206 z-index: auto -
trunk/LayoutTests/imported/w3c/ChangeLog
r293511 r293521 1 2022-04-27 Tim Nguyen <ntim@apple.com> 2 3 [css-text] Make word-wrap CSS property an alias of overflow-wrap 4 https://bugs.webkit.org/show_bug.cgi?id=166782 5 6 Reviewed by Antti Koivisto. 7 8 This follows the spec, and fixes cascade issues when applying both properties (see bug 239579). 9 10 Relevant WPT expectations updated to pass. 11 12 * web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: 13 * web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt: 14 * web-platform-tests/css/css-text/overflow-wrap/word-wrap-alias-expected.txt: 15 * web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: 16 1 17 2022-04-27 Ziran Sun <zsun@igalia.com> 2 18 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
r293090 r293521 333 333 PASS word-break 334 334 PASS word-spacing 335 PASS word-wrap336 335 PASS writing-mode 337 336 PASS x -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
r293485 r293521 217 217 PASS outline-style 218 218 PASS outline-width 219 FAIL overflow-wrap assert_not_equals: Should get a different computed value. got disallowed value "normal" 219 PASS overflow-wrap 220 220 PASS overflow-x 221 221 PASS overflow-y … … 328 328 PASS word-break 329 329 PASS word-spacing 330 PASS word-wrap331 330 PASS writing-mode 332 331 PASS x -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-text/overflow-wrap/word-wrap-alias-expected.txt
r242550 r293521 1 1 2 FAIL word-wrap should be defined as an alias of overflow-wrap assert_equals: Only overflow-wrap should appear when serializing the declaration. expected "overflow-wrap: break-word;" but got "word-wrap: break-word; overflow-wrap: break-word;" 2 PASS word-wrap should be defined as an alias of overflow-wrap 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
r293090 r293521 1 1 2 2 PASS getComputedStyle returns no style for detached element 3 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 4004 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 4005 FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 4006 FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 4003 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 399 4 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 399 5 FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 399 6 FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 399 7 7 PASS getComputedStyle returns no style for shadow tree outside of flattened tree 8 8 -
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
r293090 r293521 333 333 PASS word-break 334 334 PASS word-spacing 335 PASS word-wrap336 335 PASS writing-mode 337 336 PASS x -
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
r293090 r293521 1 1 2 2 PASS getComputedStyle returns no style for detached element 3 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 39 84 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 39 85 FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 39 86 FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 39 83 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 397 4 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 397 5 FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 397 6 FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 397 7 7 PASS getComputedStyle returns no style for shadow tree outside of flattened tree 8 8 -
trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
r293090 r293521 301 301 PASS word-break 302 302 PASS word-spacing 303 PASS word-wrap304 303 PASS writing-mode 305 304 PASS x -
trunk/LayoutTests/platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
r293090 r293521 1 1 2 2 PASS getComputedStyle returns no style for detached element 3 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 40 24 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 40 25 FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 40 26 FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 40 23 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 401 4 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 401 5 FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 401 6 FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 401 7 7 PASS getComputedStyle returns no style for shadow tree outside of flattened tree 8 8 -
trunk/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt
r293485 r293521 217 217 PASS outline-style 218 218 PASS outline-width 219 FAIL overflow-wrap assert_not_equals: Should get a different computed value. got disallowed value "normal" 219 PASS overflow-wrap 220 220 PASS overflow-x 221 221 PASS overflow-y … … 327 327 PASS word-break 328 328 PASS word-spacing 329 PASS word-wrap330 329 PASS writing-mode 331 330 PASS x -
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
r293090 r293521 333 333 PASS word-break 334 334 PASS word-spacing 335 PASS word-wrap336 335 PASS writing-mode 337 336 PASS x -
trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt
r293090 r293521 1 1 2 2 PASS getComputedStyle returns no style for detached element 3 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 39 74 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 39 75 FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 39 76 FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 39 73 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 396 4 FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 396 5 FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 396 6 FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 396 7 7 PASS getComputedStyle returns no style for shadow tree outside of flattened tree 8 8 -
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
r293089 r293521 405 405 rect: style.getPropertyValue(word-spacing) : 0px 406 406 rect: style.getPropertyCSSValue(word-spacing) : [object CSSPrimitiveValue] 407 rect: style.getPropertyValue(word-wrap) : normal408 rect: style.getPropertyCSSValue(word-wrap) : [object CSSPrimitiveValue]409 407 rect: style.getPropertyValue(writing-mode) : horizontal-tb 410 408 rect: style.getPropertyCSSValue(writing-mode) : [object CSSPrimitiveValue] … … 919 917 g: style.getPropertyValue(word-spacing) : 0px 920 918 g: style.getPropertyCSSValue(word-spacing) : [object CSSPrimitiveValue] 921 g: style.getPropertyValue(word-wrap) : normal922 g: style.getPropertyCSSValue(word-wrap) : [object CSSPrimitiveValue]923 919 g: style.getPropertyValue(writing-mode) : horizontal-tb 924 920 g: style.getPropertyCSSValue(writing-mode) : [object CSSPrimitiveValue] -
trunk/Source/WebCore/ChangeLog
r293516 r293521 1 2022-04-27 Tim Nguyen <ntim@apple.com> 2 3 [css-text] Make word-wrap CSS property an alias of overflow-wrap 4 https://bugs.webkit.org/show_bug.cgi?id=166782 5 6 Reviewed by Antti Koivisto. 7 8 This follows the spec, and fixes cascade issues when applying both properties (see bug 239579). 9 10 Relevant WPT expectations updated to pass. 11 12 * animation/CSSPropertyAnimation.cpp: 13 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): 14 * css/CSSComputedStyleDeclaration.cpp: 15 (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): 16 * css/CSSProperties.json: 17 * css/parser/CSSParserFastPaths.cpp: 18 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 19 (WebCore::CSSParserFastPaths::isKeywordPropertyID): 20 * editing/Editor.cpp: 21 (WebCore::Editor::applyEditingStyleToBodyElement const): 22 * html/HTMLElement.cpp: 23 (WebCore::HTMLElement::collectPresentationalHintsForAttribute): 24 * html/HTMLTextAreaElement.cpp: 25 (WebCore::HTMLTextAreaElement::collectPresentationalHintsForAttribute): 26 1 27 2022-04-27 Youenn Fablet <youenn@apple.com> 2 28 -
trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp
r293493 r293521 3588 3588 case CSSPropertyUnicodeRange: 3589 3589 case CSSPropertyWillChange: 3590 case CSSPropertyWordWrap:3591 3590 #if ENABLE(APPLE_PAY) 3592 3591 case CSSPropertyApplePayButtonStyle: -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r293493 r293521 3674 3674 case CSSPropertyWordSpacing: 3675 3675 return zoomAdjustedPixelValue(style.fontCascade().wordSpacing(), style); 3676 case CSSPropertyWordWrap:3677 return cssValuePool.createValue(style.overflowWrap());3678 3676 case CSSPropertyLineBreak: 3679 3677 return cssValuePool.createValue(style.lineBreak()); -
trunk/Source/WebCore/css/CSSProperties.json
r293511 r293521 3817 3817 }, 3818 3818 "overflow-wrap": { 3819 "codegen-properties": { 3820 "aliases": [ 3821 "word-wrap" 3822 ] 3823 }, 3824 "inherited": true, 3819 3825 "values": [ 3820 3826 "normal", 3821 "break-word" 3827 "break-word", 3828 "anywhere" 3822 3829 ], 3823 3830 "specification": { … … 5085 5092 "category": "css-22", 5086 5093 "url": "https://www.w3.org/TR/CSS22/text.html#propdef-word-spacing" 5087 }5088 },5089 "word-wrap": {5090 "inherited": true,5091 "values": [5092 "normal",5093 "break-word"5094 ],5095 "codegen-properties": {5096 "name-for-methods": "OverflowWrap"5097 },5098 "status": {5099 "status": "obsolete",5100 "comment": "Replaced by overflow-wrap"5101 },5102 "specification": {5103 "category": "css-text",5104 "url": "https://www.w3.org/TR/css-text-3/#overflow-wrap"5105 5094 } 5106 5095 }, -
trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp
r293484 r293521 674 674 // return valueID == CSSValueNone || valueID == CSSValueAuto; 675 675 case CSSPropertyOverflowWrap: // normal | break-word | anywhere 676 case CSSPropertyWordWrap:677 676 return valueID == CSSValueNormal || valueID == CSSValueBreakWord || valueID == CSSValueAnywhere; 678 677 case CSSPropertyOverflowX: // visible | hidden | scroll | auto | overlay (overlay is a synonym for auto) … … 994 993 case CSSPropertyWhiteSpace: 995 994 case CSSPropertyWordBreak: 996 case CSSPropertyWordWrap:997 995 998 996 // SVG CSS properties from SVG 1.1, Appendix N: Property Index. -
trunk/Source/WebCore/editing/Editor.cpp
r293326 r293521 3496 3496 if (!body) 3497 3497 return; 3498 body->setInlineStyleProperty(CSSProperty WordWrap, CSSValueBreakWord);3498 body->setInlineStyleProperty(CSSPropertyOverflowWrap, CSSValueBreakWord); 3499 3499 body->setInlineStyleProperty(CSSPropertyWebkitNbspMode, CSSValueSpace); 3500 3500 body->setInlineStyleProperty(CSSPropertyLineBreak, CSSValueAfterWhiteSpace); -
trunk/Source/WebCore/html/HTMLElement.cpp
r293491 r293521 201 201 FALLTHROUGH; 202 202 case ContentEditableType::True: 203 addPropertyToPresentationalHintStyle(style, CSSProperty WordWrap, CSSValueBreakWord);203 addPropertyToPresentationalHintStyle(style, CSSPropertyOverflowWrap, CSSValueBreakWord); 204 204 addPropertyToPresentationalHintStyle(style, CSSPropertyWebkitNbspMode, CSSValueSpace); 205 205 addPropertyToPresentationalHintStyle(style, CSSPropertyLineBreak, CSSValueAfterWhiteSpace); -
trunk/Source/WebCore/html/HTMLTextAreaElement.cpp
r293484 r293521 158 158 if (shouldWrapText()) { 159 159 addPropertyToPresentationalHintStyle(style, CSSPropertyWhiteSpace, CSSValuePreWrap); 160 addPropertyToPresentationalHintStyle(style, CSSProperty WordWrap, CSSValueBreakWord);160 addPropertyToPresentationalHintStyle(style, CSSPropertyOverflowWrap, CSSValueBreakWord); 161 161 } else { 162 162 addPropertyToPresentationalHintStyle(style, CSSPropertyWhiteSpace, CSSValuePre); 163 addPropertyToPresentationalHintStyle(style, CSSProperty WordWrap, CSSValueNormal);163 addPropertyToPresentationalHintStyle(style, CSSPropertyOverflowWrap, CSSValueNormal); 164 164 } 165 165 } else
Note: See TracChangeset
for help on using the changeset viewer.