Repository navigation
[@starting-style] Add parsing support - #23044
Conversation
|
EWS run on previous version of this PR (hash b901fcd) Details |
|
GTK/WPE baselines can probably be removed now that this is passing. |
There was a problem hiding this comment.
Nested group rules support mixing rules and declarations at the same level. It's unclear to me from the spec and the tests if it's possible to have them mixed here, or if we should have only rules or only declarations (and discard the other?)
There was a problem hiding this comment.
Is a boolean enough or we will need a more complex mechanism (like the above integer identifier) to identify exactly which @starting-style ?
There was a problem hiding this comment.
You can't nest multiple @starting-style within each other so I doubt you'll need an integer ID
There was a problem hiding this comment.
(Even if nesting of @starting-style were allowed (which I'm not sure of), it would have the same meaning at just using one @starting-style)
b901fcd to
af22af6
Compare
|
EWS run on current version of this PR (hash af22af6) Details |
af22af6 to
3c40c77
Compare
https://bugs.webkit.org/show_bug.cgi?id=267855 rdar://121373181 Reviewed by Matthieu Dubet. Add support for parsing @starting-style rules. https://drafts.csswg.org/css-transitions-2/#at-ruledef-starting-style The styles are not actually used yet. * LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-name-defining-rules-expected.txt: * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: Add a setting. Not enabled yet. * Source/WebCore/bindings/js/JSCSSRuleCustom.cpp: (WebCore::toJSNewlyCreated): * Source/WebCore/css/StyleRule.cpp: (WebCore::StyleRuleBase::visitDerived): (WebCore::StyleRuleBase::createCSSOMWrapper const): (WebCore::StyleRuleScope::styleSheetContents const): (WebCore::StyleRuleScope::setStyleSheetContents): (WebCore::StyleRuleStartingStyle::create): (WebCore::StyleRuleStartingStyle::StyleRuleStartingStyle): Add a StyleRule. * Source/WebCore/css/StyleRule.h: (WebCore::StyleRuleBase::isGroupRule const): (WebCore::StyleRuleBase::isStartingStyleRule const): (isType): * Source/WebCore/css/StyleRuleType.h: * Source/WebCore/css/StyleSheetContents.cpp: (WebCore::StyleSheetContents::traverseSubresources const): * Source/WebCore/css/parser/CSSAtRuleID.cpp: (WebCore::cssAtRuleID): * Source/WebCore/css/parser/CSSAtRuleID.h: * Source/WebCore/css/parser/CSSParserContext.cpp: * Source/WebCore/css/parser/CSSParserContext.h: * Source/WebCore/css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::consumeAtRule): (WebCore::CSSParserImpl::consumeStartingStyleRule): Parse the rule. This is simple as there are no arguments to parse. * Source/WebCore/css/parser/CSSParserImpl.h: * Source/WebCore/inspector/InspectorStyleSheet.cpp: (WebCore::flatteningStrategyForStyleRuleType): * Source/WebCore/style/ElementRuleCollector.cpp: (WebCore::Style::ElementRuleCollector::transferMatchedRules): * Source/WebCore/style/MatchResult.h: (WebCore::Style::operator==): (WebCore::Style::add): Pass if a given declaration belongs to starting-style. * Source/WebCore/style/PropertyCascade.cpp: (WebCore::Style::PropertyCascade::addMatch): Skip @starting-style rules unless we are building a before-change RenderStyle. With this patch we always skip. * Source/WebCore/style/PropertyCascade.h: * Source/WebCore/style/RuleData.cpp: (WebCore::Style::RuleData::RuleData): * Source/WebCore/style/RuleData.h: (WebCore::Style::RuleData::isStartingStyle const): Remember if the rule is part of a starting-style. * Source/WebCore/style/RuleSet.cpp: (WebCore::Style::RuleSet::addRule): * Source/WebCore/style/RuleSetBuilder.cpp: (WebCore::Style::RuleSetBuilder::addChildRule): Gather child rules from @starting-style. (WebCore::Style::RuleSetBuilder::addStyleRuleWithSelectorList): * Source/WebCore/style/RuleSetBuilder.h: Canonical link: https://commits.webkit.org/273351@main
3c40c77 to
bfcf9bf
Compare
|
Committed 273351@main (bfcf9bf): https://commits.webkit.org/273351@main Reviewed commits have been landed. Closing PR #23044 and removing active labels. |
bfcf9bf
af22af6
🧪 wpe-wk2🧪 gtk-wk2🛠 tv-sim🧪 jsc-armv7-tests