-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CSS] Invalid @Property rule should be ignored at parse-time
https://bugs.webkit.org/show_bug.cgi?id=263007 rdar://116803886 Reviewed by Antti Koivisto and Tim Nguyen. This patch moves most of the validity checks from rule-registration-time (during rule set building) to parse-time, thus preventing invalid @Property rules to appear in the CSSOM. * LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-cssom-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-cssom.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/at-property.html: * Source/WebCore/css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::consumePropertyRule): * Source/WebCore/style/CustomPropertyRegistry.cpp: (WebCore::Style::CustomPropertyRegistry::registerFromStylesheet): Canonical link: https://commits.webkit.org/269466@main
- Loading branch information
Showing
6 changed files
with
226 additions
and
122 deletions.
There are no files selected for viewing
47 changes: 12 additions & 35 deletions
47
...orted/w3c/web-platform-tests/css/css-properties-values-api/at-property-cssom-expected.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,41 @@ | ||
|
||
PASS Rule for --no-descriptors is invalid | ||
PASS Rule for --no-syntax is invalid | ||
PASS Rule for --no-inherits is invalid | ||
PASS Rule for --no-initial-color-value is invalid | ||
PASS Rule for --syntax-only is invalid | ||
PASS Rule for --inherits-only is invalid | ||
PASS Rule for --initial-value-only is invalid | ||
PASS Rule for --valid has expected cssText | ||
PASS Rule for --valid-reverse has expected cssText | ||
PASS Rule for --valid-universal has expected cssText | ||
PASS Rule for --valid-whitespace has expected cssText | ||
PASS Rule for --vALId has expected cssText | ||
PASS Rule for --no-descriptors has expected cssText | ||
PASS Rule for --no-syntax has expected cssText | ||
PASS Rule for --no-inherits has expected cssText | ||
PASS Rule for --no-initial-value has expected cssText | ||
PASS Rule for --syntax-only has expected cssText | ||
PASS Rule for --inherits-only has expected cssText | ||
PASS Rule for --initial-value-only has expected cssText | ||
PASS Rule for --no-initial-universal-value has expected cssText | ||
PASS Rule for --tab tab has expected cssText | ||
PASS CSSRule.type returns 0 | ||
PASS Rule for --valid returns expected value for CSSPropertyRule.name | ||
PASS Rule for --valid-reverse returns expected value for CSSPropertyRule.name | ||
PASS Rule for --valid-universal returns expected value for CSSPropertyRule.name | ||
PASS Rule for --valid-whitespace returns expected value for CSSPropertyRule.name | ||
PASS Rule for --vALId returns expected value for CSSPropertyRule.name | ||
PASS Rule for --no-descriptors returns expected value for CSSPropertyRule.name | ||
PASS Rule for --no-syntax returns expected value for CSSPropertyRule.name | ||
PASS Rule for --no-inherits returns expected value for CSSPropertyRule.name | ||
PASS Rule for --no-initial-value returns expected value for CSSPropertyRule.name | ||
PASS Rule for --syntax-only returns expected value for CSSPropertyRule.name | ||
PASS Rule for --inherits-only returns expected value for CSSPropertyRule.name | ||
PASS Rule for --initial-value-only returns expected value for CSSPropertyRule.name | ||
PASS Rule for --no-initial-universal-value returns expected value for CSSPropertyRule.name | ||
PASS Rule for --valid returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --valid-reverse returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --valid-universal returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --valid-whitespace returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --vALId returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --no-descriptors returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --no-syntax returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --no-inherits returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --no-initial-value returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --syntax-only returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --inherits-only returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --initial-value-only returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --no-initial-universal-value returns expected value for CSSPropertyRule.syntax | ||
PASS Rule for --valid returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --valid-reverse returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --valid-universal returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --valid-whitespace returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --vALId returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --no-descriptors returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --no-syntax returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --no-inherits returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --no-initial-value returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --syntax-only returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --inherits-only returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --initial-value-only returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --no-initial-universal-value returns expected value for CSSPropertyRule.inherits | ||
PASS Rule for --valid returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --valid-reverse returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --valid-universal returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --valid-whitespace returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --vALId returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --no-descriptors returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --no-syntax returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --no-inherits returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --no-initial-value returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --syntax-only returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --inherits-only returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --initial-value-only returns expected value for CSSPropertyRule.initialValue | ||
PASS Rule for --no-initial-universal-value returns expected value for CSSPropertyRule.initialValue | ||
|
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
Oops, something went wrong.