Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 066b75f5a58bba233bfb505248d89ba1fbbc0e1f https://github.com/WebKit/WebKit/commit/066b75f5a58bba233bfb505248d89ba1fbbc0e1f Author: Matt Woodrow <mattwood...@apple.com> Date: 2024-02-19 (Mon, 19 Feb 2024)
Changed paths: M Source/WebCore/Sources.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/dom/ViewTransition.cpp M Source/WebCore/dom/ViewTransition.h M Source/WebCore/rendering/RenderObject.h A Source/WebCore/rendering/RenderViewTransitionCapture.cpp A Source/WebCore/rendering/RenderViewTransitionCapture.h M Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.cpp M Source/WebCore/style/ElementRuleCollector.cpp M Source/WebCore/style/ElementRuleCollector.h M Source/WebCore/style/StyleResolver.cpp M Source/WebCore/style/StyleResolver.h M Source/WebCore/style/StyleScope.cpp M Source/WebCore/style/StyleScope.h M Source/WebCore/style/StyleScopeRuleSets.cpp M Source/WebCore/style/StyleScopeRuleSets.h Log Message: ----------- [view-transitions] Implement "update pseudo-element styles" algorithm. https://bugs.webkit.org/show_bug.cgi?id=265224 rdar://118703293> Reviewed by Tim Nguyen. Implements the basic outline of capturing the computed style from both the old and new elements, and using these to generate a style rule for the selector ':root::view-transition-group(transitionName)'. Adds a mostly empty RenderViewTransitionOld class that we will use for the replaced snapshot content, but just acts as a placeholder for the intrinsic size right now. With these changes, the size of the transitioned element now gets applied correctly to the :view-transition-new/old renderers, and styles targetting them (like background color) correctly get applied and rendered. The next step is to implement the 'capture the image' algorithm for new and old (likely splitting RenderViewTransformNew as a separate class), so that we also include the replaced content. * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/dom/ViewTransition.cpp: (WebCore::ViewTransition::captureOldState): (WebCore::ViewTransition::handleTransitionFrame): (WebCore::ViewTransition::copyElementBaseProperties): (WebCore::ViewTransition::updatePseudoElementStyles): * Source/WebCore/dom/ViewTransition.h: (WebCore::OrderedNamedElementsMap::map const): (WebCore::OrderedNamedElementsMap::find const): * Source/WebCore/rendering/RenderObject.h: (WebCore::RenderObject::isRenderViewTransitionOld const): * Source/WebCore/rendering/RenderViewTransitionOld.cpp: Added. (WebCore::RenderViewTransitionOld::RenderViewTransitionOld): (WebCore::RenderViewTransitionOld::setImage): * Source/WebCore/rendering/RenderViewTransitionOld.h: Added. * Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.cpp: (WebCore::RenderTreeUpdater::ViewTransition::buildPseudoElementGroup): (WebCore::RenderTreeUpdater::ViewTransition::updatePseudoElementGroup): * Source/WebCore/style/ElementRuleCollector.cpp: (WebCore::Style::ElementRuleCollector::ElementRuleCollector): (WebCore::Style::ElementRuleCollector::matchUARules): * Source/WebCore/style/ElementRuleCollector.h: * Source/WebCore/style/StyleResolver.cpp: (WebCore::Style::Resolver::applyMatchedProperties): (WebCore::Style::Resolver::setViewTransitionGroupStyles): * Source/WebCore/style/StyleResolver.h: * Source/WebCore/style/StyleScope.cpp: (WebCore::Style::Scope::createDocumentResolver): * Source/WebCore/style/StyleScope.h: * Source/WebCore/style/StyleScopeRuleSets.cpp: (WebCore::Style::ScopeRuleSets::dynamicViewTransitionsStyle const): * Source/WebCore/style/StyleScopeRuleSets.h: (WebCore::Style::ScopeRuleSets::setDynamicViewTransitionsStyle): Canonical link: https://commits.webkit.org/275005@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes