Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
CSS revert should serialize as "revert", not "Revert"
https://bugs.webkit.org/show_bug.cgi?id=216187 Reviewed by Anders Carlsson. LayoutTests/imported/w3c: * web-platform-tests/css/css-color-adjust/parsing/color-scheme-valid-expected.txt: Expect one additional test to pass instead of fail. * web-platform-tests/css/css-values/unset-value-storage-expected.txt: Expect pass instead of fail. * web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt: Ditto. Source/WebCore: Tests: imported/w3c/web-platform-tests/css/css-values/unset-value-storage.html imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block.html * css/CSSRevertValue.cpp: (WebCore::CSSRevertValue::customCSSText const): Use lowercase "revert". * css/StyleProperties.cpp: (WebCore::isCSSWideValueKeyword): Added. Replaces isInitialOrInherit. (WebCore::StyleProperties::fontValue const): Use isCSSWideValueKeyword rather than isInitialOrInherit. (WebCore::StyleProperties::getLayeredShorthandValue const): Ditto. Also rearranged thee function a bit and shortened some excessively wordy code. (WebCore::StyleProperties::getShorthandValue const): Ditto. (WebCore::StyleProperties::borderPropertyValue const): Ditto. (WebCore::StyleProperties::asText const): Added code to properly handle the case where both background-position/repeat-x and -y are the same CSS-wide value keyword as well as cases involving "initial". The general case above handles these properly, but background-position/repeat have their own code, which needed to repeat some of the same logic. (WebCore::StyleProperties::PropertyReference::cssText const): Use makeString instead of StringBuilder. * dom/StyledElement.cpp: (WebCore::StyledElement::styleAttributeChanged): Removed incorrect code that detached the CSS object model style wrapper from the element when the style attribute was removed. This was incorrect behavior; it should stay attached. This fix happens to be tested by the same file as the "revert"/"Revert" fix and I wanted the whole file to pass, not just one more test. * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::addBlockStyle): Rewrote for simplicity, but also so this works properly when inlineStyle is non-null but empty. This case arises in one test now because of the change to StyledElement above. LayoutTests: * editing/spelling/spelling-dots-position-expected.html: Remove some unneeded style text. Caught my eye because it uses "background-position: initial". * fast/css/background-position-serialize-expected.txt: Updated for a progression. We now correctly omit "background-position: initial initial; background-repeat: initial initial;". * platform/gtk/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt: Removed. * platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt: Removed. * platform/wpe/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt: Removed. These were only needed because the failure strings depended on the exact set of attributes. But the test passes now. Canonical link: https://commits.webkit.org/229029@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
172 additions
and 192 deletions.
- +19 −0 LayoutTests/ChangeLog
- +2 −2 LayoutTests/editing/spelling/spelling-dots-position-expected.html
- +1 −1 LayoutTests/fast/css/background-position-serialize-expected.txt
- +13 −0 LayoutTests/imported/w3c/ChangeLog
- +1 −1 ...ests/imported/w3c/web-platform-tests/css/css-color-adjust/parsing/color-scheme-valid-expected.txt
- +1 −1 LayoutTests/imported/w3c/web-platform-tests/css/css-values/unset-value-storage-expected.txt
- +2 −2 LayoutTests/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt
- +0 −9 ...sts/platform/gtk/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt
- +0 −9 ...platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt
- +0 −9 ...sts/platform/wpe/imported/w3c/web-platform-tests/css/cssom/css-style-attr-decl-block-expected.txt
- +41 −0 Source/WebCore/ChangeLog
- +1 −1 Source/WebCore/css/CSSRevertValue.cpp
- +77 −138 Source/WebCore/css/StyleProperties.cpp
- +3 −7 Source/WebCore/dom/StyledElement.cpp
- +11 −12 Source/WebCore/editing/ApplyStyleCommand.cpp
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,3 +1,3 @@ | ||
|
||
PASS Storage of "unset" value | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -32,7 +32,7 @@ namespace WebCore { | ||
|
||
String CSSRevertValue::customCSSText() const | ||
{ | ||
return "revert"_s; | ||
} | ||
|
||
} // namespace WebCore |
Oops, something went wrong.