[webkit-changes] [WebKit/WebKit] 14d2ee: [view-transitions] Visible clipping at the end of ...
mattwoodrow
noreply at github.com
Wed May 29 01:31:43 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 14d2ee99d4aaacbe10cb5f00a01b783ee45a0708
https://github.com/WebKit/WebKit/commit/14d2ee99d4aaacbe10cb5f00a01b783ee45a0708
Author: Matt Woodrow <mattwoodrow at apple.com>
Date: 2024-05-29 (Wed, 29 May 2024)
Changed paths:
A LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/inline-with-offset-from-containing-block-clipped-ref.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/new-content-inline-with-offset-from-containing-block-clipped-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/new-content-inline-with-offset-from-containing-block-clipped.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/old-content-inline-with-offset-from-containing-block-clipped-expected.html
A LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/old-content-inline-with-offset-from-containing-block-clipped.html
M Source/WebCore/dom/ViewTransition.cpp
M Source/WebCore/dom/ViewTransition.h
M Source/WebCore/rendering/RenderViewTransitionCapture.cpp
M Source/WebCore/rendering/RenderViewTransitionCapture.h
M Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.cpp
Log Message:
-----------
[view-transitions] Visible clipping at the end of animation on https://www.kvin.me/posts/cards
https://bugs.webkit.org/show_bug.cgi?id=274404
<rdar://128406756>
Reviewed by Alan Baradlay.
RenderLayer's use of RenderInline doesn't include any padding from its containing block in its position, and instead accounts for it
in the position of the lines boxes themselves.
This means that the computed (web visible) transform (using the renderer's position) for the ::view-transition-group doesn't
include the offset between the inline element and its container. It also means that an overflow:clip on the
::view-transition-image-pair applies the clip in the wrong coordinate space for the snapshots.
This change computes the offset between the position of the renderer, and that used by RenderLayer. It uses this
to adjust the computed transform, and the overflow rect of the snapshot so that they correctly account for the position of the
renderer.
* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/inline-with-offset-from-containing-block-clipped-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/new-content-inline-with-offset-from-containing-block-clipped-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/new-content-inline-with-offset-from-containing-block-clipped.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/old-content-inline-with-offset-from-containing-block-clipped-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/old-content-inline-with-offset-from-containing-block-clipped.html: Added.
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::layerToLayoutOffset):
(WebCore::ViewTransition::captureOldState):
(WebCore::ViewTransition::copyElementBaseProperties):
(WebCore::ViewTransition::updatePseudoElementStyles):
* Source/WebCore/dom/ViewTransition.h:
* Source/WebCore/rendering/RenderViewTransitionCapture.cpp:
(WebCore::RenderViewTransitionCapture::setCapturedSize):
(WebCore::RenderViewTransitionCapture::layout):
(WebCore::RenderViewTransitionCapture::setSize): Deleted.
* Source/WebCore/rendering/RenderViewTransitionCapture.h:
* Source/WebCore/rendering/updating/RenderTreeUpdaterViewTransition.cpp:
(WebCore::createRendererIfNeeded):
Canonical link: https://commits.webkit.org/279433@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