[webkit-changes] [WebKit/WebKit] 115f02: [view-transitions] Implement "capture the image" a...
mattwoodrow
noreply at github.com
Sun Feb 18 19:08:28 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 115f0206bb9c8fc07b0f7d07d4e1001963b0557c
https://github.com/WebKit/WebKit/commit/115f0206bb9c8fc07b0f7d07d4e1001963b0557c
Author: Matt Woodrow <mattwoodrow at apple.com>
Date: 2024-02-18 (Sun, 18 Feb 2024)
Changed paths:
M LayoutTests/platform/glib/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/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 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
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