[webkit-changes] [WebKit/WebKit] 34e14b: View transition old snapshots incorrectly get scal...
mattwoodrow
noreply at github.com
Fri Feb 23 01:42:14 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 34e14bf3631972e46abcee10b0b72f0339e7a493
https://github.com/WebKit/WebKit/commit/34e14bf3631972e46abcee10b0b72f0339e7a493
Author: Matt Woodrow <mattwoodrow at apple.com>
Date: 2024-02-23 (Fri, 23 Feb 2024)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/platform/glib/TestExpectations
M Source/WebCore/dom/ViewTransition.cpp
M Source/WebCore/dom/ViewTransition.h
M Source/WebCore/page/FrameSnapshotting.cpp
M Source/WebCore/page/FrameSnapshotting.h
M Source/WebCore/rendering/RenderBoxModelObject.cpp
M Source/WebCore/rendering/RenderElement.cpp
M Source/WebCore/rendering/RenderElement.h
M Source/WebCore/rendering/RenderInline.cpp
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/RenderTableRow.cpp
M Source/WebCore/rendering/RenderViewTransitionCapture.cpp
M Source/WebCore/rendering/RenderViewTransitionCapture.h
M Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.cpp
Log Message:
-----------
View transition old snapshots incorrectly get scaled to the border-box size.
https://bugs.webkit.org/show_bug.cgi?id=269954
<rdar://123478049>
Reviewed by Tim Nguyen.
Drawing of the old snapshot rescales the image to the border-box size, even if
we captured a larger area.
We shouldn't apply scaling, just align the origin of the border-box in the snapshot
to the border-box origin of the pseudo element.
This records the overflow rect for which the snapshot is captured, and uses it
to adjust the overflow rect of the pseudo element and align the painting
position of the snapshot.
As a slight cleanup, merges the two createRendererIfNeeded lambdas into a single
static function.
* LayoutTests/TestExpectations:
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::snapshotNodeVisualOverflowClippedToViewport):
(WebCore::ViewTransition::captureOldState):
* Source/WebCore/dom/ViewTransition.h:
* Source/WebCore/page/FrameSnapshotting.cpp:
(WebCore::snapshotFrameRectWithClip):
* Source/WebCore/page/FrameSnapshotting.h:
* Source/WebCore/rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::requiresLayer const):
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::capturedInViewTransition const):
(WebCore::RenderElement::hasViewTransitionName const):
* Source/WebCore/rendering/RenderElement.h:
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::RenderInline::requiresLayer const):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::canCreateStackingContext):
(WebCore::RenderLayer::shouldBeCSSStackingContext const):
(WebCore::RenderLayer::computeCanBeBackdropRoot const):
* Source/WebCore/rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::requiresLayer const):
* Source/WebCore/rendering/RenderViewTransitionCapture.cpp:
(WebCore::RenderViewTransitionCapture::setImage):
(WebCore::RenderViewTransitionCapture::paintReplaced):
(WebCore::RenderViewTransitionCapture::layout):
* Source/WebCore/rendering/RenderViewTransitionCapture.h:
* Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.cpp:
(WebCore::createRendererIfNeeded):
(WebCore::RenderTreeUpdater::ViewTransition::buildPseudoElementGroup):
(WebCore::RenderTreeUpdater::ViewTransition::updatePseudoElementGroup):
Canonical link: https://commits.webkit.org/275227@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