-
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.
[view-transitions] Implement "capture the image" algorithm.
https://bugs.webkit.org/show_bug.cgi?id=265170 <rdar://118667021> Reviewed by Tim Nguyen and Simon Fraser. Uses 'snapshotNode' to capture the old image during 'captureOldState', and implements `paintReplaced` on the renderer (in the same way RenderHTMLElement does) to draw the old catpured image. Forces composited layers to be created for the ::view-transition-new/old pseudos, as well as the element with the view-transtion, and reparents the GraphicsLayer from real element into pseduo, so that the new capture is displayed using the live content. This also effectively stops the original element from being displayed normally, as required by the spec. * Source/WebCore/dom/ViewTransition.cpp: (WebCore::ViewTransition::captureOldState): * Source/WebCore/dom/ViewTransition.h: * Source/WebCore/rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::requiresLayer const): * Source/WebCore/rendering/RenderElement.cpp: (WebCore::RenderElement::hasViewTransition const): (WebCore::RenderElement::isViewTransitionPseudo const): * Source/WebCore/rendering/RenderElement.h: * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::canCreateStackingContext): (WebCore::RenderLayer::shouldBeCSSStackingContext const): (WebCore::RenderLayer::computeCanBeBackdropRoot const): * Source/WebCore/rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGeometry): * Source/WebCore/rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::collectViewTransitionNewContentLayers): (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): (WebCore::RenderLayerCompositor::requiresCompositingLayer const): (WebCore::RenderLayerCompositor::requiresOwnBackingStore const): (WebCore::RenderLayerCompositor::requiresCompositingForViewTransition const): * Source/WebCore/rendering/RenderLayerCompositor.h: * Source/WebCore/rendering/RenderViewTransitionCapture.cpp: (WebCore::RenderViewTransitionCapture::setImage): (WebCore::RenderViewTransition::paintReplaced): * Source/WebCore/rendering/RenderViewTransitionCapture.h: * Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.cpp: (WebCore::RenderTreeUpdater::ViewTransition::updatePseudoElementTree): (WebCore::RenderTreeUpdater::ViewTransition::buildPseudoElementGroup): (WebCore::RenderTreeUpdater::ViewTransition::updatePseudoElementGroup): Canonical link: https://commits.webkit.org/274957@main
- Loading branch information
1 parent
de9e3d6
commit 115f020
Showing
13 changed files
with
112 additions
and
11 deletions.
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
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
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