[webkit-changes] [WebKit/WebKit] add19a: Add CSS parser support for the @view-transition ru...

mattwoodrow noreply at github.com
Thu Aug 1 01:48:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: add19a6245520b35080caa82faff3ed001ac0caf
      https://github.com/WebKit/WebKit/commit/add19a6245520b35080caa82faff3ed001ac0caf
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2024-08-01 (Thu, 01 Aug 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/navigation/at-rule-cssom-expected.txt
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/CMakeLists.txt
    M Source/WebCore/DerivedSources-input.xcfilelist
    M Source/WebCore/DerivedSources-output.xcfilelist
    M Source/WebCore/DerivedSources.make
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
    M Source/WebCore/bindings/js/WebCoreBuiltinNames.h
    M Source/WebCore/css/CSSProperties.json
    A Source/WebCore/css/CSSViewTransitionRule.cpp
    A Source/WebCore/css/CSSViewTransitionRule.h
    A Source/WebCore/css/CSSViewTransitionRule.idl
    M Source/WebCore/css/ComputedStyleExtractor.cpp
    M Source/WebCore/css/StyleRule.cpp
    M Source/WebCore/css/StyleRule.h
    M Source/WebCore/css/StyleRuleType.h
    M Source/WebCore/css/StyleSheetContents.cpp
    M Source/WebCore/css/parser/CSSAtRuleID.cpp
    M Source/WebCore/css/parser/CSSAtRuleID.h
    M Source/WebCore/css/parser/CSSParserImpl.cpp
    M Source/WebCore/css/parser/CSSParserImpl.h
    M Source/WebCore/css/parser/CSSPropertyParser.cpp
    M Source/WebCore/css/parser/CSSPropertyParser.h
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h
    M Source/WebCore/inspector/InspectorStyleSheet.cpp
    M Source/WebCore/style/RuleSet.cpp
    M Source/WebCore/style/RuleSet.h
    M Source/WebCore/style/RuleSetBuilder.cpp
    M Source/WebCore/style/StyleResolver.cpp
    M Source/WebCore/style/StyleResolver.h
    M Source/WebCore/style/StyleScopeRuleSets.cpp
    M Source/WebCore/style/StyleScopeRuleSets.h

  Log Message:
  -----------
  Add CSS parser support for the @view-transition rule and the navigation descriptor.
https://bugs.webkit.org/show_bug.cgi?id=277461
<rdar://132947828>

Reviewed by Tim Nguyen.

Adds support for parsing the @view-transition rule, and the navigation
descriptor.

Adds the CSSViewTransitionRule.idl CSSOM class, and implementation.

Adds a partial implemention of '6.2. Resolving the @view-transition rule'
(https://www.w3.org/TR/css-view-transitions-2/#vt-rule-algo), which still needs
support for transition types.

All of this is gated behind a new experimental preference
CSSCrossDocumentViewTransitionsEnabled.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/navigation/at-rule-cssom-expected.txt:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJSNewlyCreated):
* Source/WebCore/bindings/js/WebCoreBuiltinNames.h:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/CSSRule.idl:
* Source/WebCore/css/CSSViewTransitionRule.cpp: Added.
(WebCore::toViewTransitionNavigationEnum):
(WebCore::StyleRuleViewTransition::StyleRuleViewTransition):
(WebCore::StyleRuleViewTransition::create):
(WebCore::CSSViewTransitionRule::create):
(WebCore::CSSViewTransitionRule::CSSViewTransitionRule):
(WebCore::CSSViewTransitionRule::cssText const):
(WebCore::CSSViewTransitionRule::reattach):
* Source/WebCore/css/CSSViewTransitionRule.h: Added.
(isType):
* Source/WebCore/css/CSSViewTransitionRule.idl: Copied from Source/WebCore/css/StyleRuleType.h.
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle const):
* Source/WebCore/css/StyleRule.cpp:
(WebCore::StyleRuleBase::visitDerived):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
* Source/WebCore/css/StyleRule.h:
(WebCore::StyleRuleBase::isViewTransitionRule const):
* Source/WebCore/css/StyleRuleType.h:
* Source/WebCore/css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::traverseSubresources const):
(WebCore::StyleSheetContents::mayDependOnBaseURL const):
* Source/WebCore/css/parser/CSSAtRuleID.cpp:
(WebCore::cssAtRuleID):
* Source/WebCore/css/parser/CSSAtRuleID.h:
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::computeNewAllowedRules):
(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeViewTransitionRule):
* Source/WebCore/css/parser/CSSParserImpl.h:
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseValue):
(WebCore::CSSPropertyParser::parseViewTransitionDescriptor):
* Source/WebCore/css/parser/CSSPropertyParser.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Image.h:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::dispatchPagehideEvent):
(WebCore::Document::resolveViewTransitionRule):
* Source/WebCore/dom/Document.h:
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::flatteningStrategyForStyleRuleType):
* Source/WebCore/style/RuleSet.cpp:
(WebCore::Style::RuleSet::setViewTransitionRule):
(WebCore::Style::RuleSet::viewTransitionRule const):
* Source/WebCore/style/RuleSet.h:
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::RuleSetBuilder::addChildRule):
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::viewTransitionRule const):
* Source/WebCore/style/StyleResolver.h:
* Source/WebCore/style/StyleScopeRuleSets.cpp:
(WebCore::Style::ScopeRuleSets::viewTransitionRule const):
* Source/WebCore/style/StyleScopeRuleSets.h:

Canonical link: https://commits.webkit.org/281694@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list