[webkit-changes] [WebKit/WebKit] 136017: [view-transitions] Implement "capture the image" a...
mattwoodrow
noreply at github.com
Wed Feb 21 00:26:25 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1360173f7d2bb98f8b6d3eefa30d77620bd07c37
https://github.com/WebKit/WebKit/commit/1360173f7d2bb98f8b6d3eefa30d77620bd07c37
Author: Matt Woodrow <mattwoodrow at apple.com>
Date: 2024-02-21 (Wed, 21 Feb 2024)
Changed paths:
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/mac-wk2/TestExpectations
M Source/WebCore/dom/ViewTransition.cpp
M Source/WebCore/dom/ViewTransition.h
M Source/WebCore/rendering/RenderBoxModelObject.cpp
M Source/WebCore/rendering/RenderElement.cpp
M Source/WebCore/rendering/RenderElement.h
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/RenderLayer.h
M Source/WebCore/rendering/RenderLayerBacking.cpp
M Source/WebCore/rendering/RenderLayerCompositor.cpp
M Source/WebCore/rendering/RenderLayerCompositor.h
M Source/WebCore/rendering/RenderViewTransitionCapture.cpp
M Source/WebCore/rendering/RenderViewTransitionCapture.h
M Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.cpp
Log Message:
-----------
[view-transitions] Implement "capture the image" algorithm.
https://bugs.webkit.org/show_bug.cgi?id=265170
<rdar://118667021>
Reviewed by Tim Nguyen.
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/275087@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