-
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 transition old snapshots incorrectly get scaled to the border-bo…
…x 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
- Loading branch information
1 parent
277513e
commit 34e14bf
Showing
15 changed files
with
104 additions
and
97 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
Oops, something went wrong.