Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a6acaf9fffcc0e608491265f4ecc0905b9bc5b00
      
https://github.com/WebKit/WebKit/commit/a6acaf9fffcc0e608491265f4ecc0905b9bc5b00
  Author: Matt Woodrow <[email protected]>
  Date:   2024-06-09 (Sun, 09 Jun 2024)

  Changed paths:
    A LayoutTests/fast/css/view-transitions-zoom-expected.html
    A LayoutTests/fast/css/view-transitions-zoom.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

  Log Message:
  -----------
  [view-transitions] Support page zoom
https://bugs.webkit.org/show_bug.cgi?id=274533
<rdar://128549362>

Reviewed by Tim Nguyen.

Fixes support for page zoom in 3 ways:

Includes checks for page zoom (and page scale) changing, and aborts an 
in-progress
view transition, as required by spec.

Cache the intrinsic size of the capture in RenderViewTransitionCapture, and 
listen
for the `intrinsicSizeChanged()` function. This gets called when RenderReplaced
overwrites the existing intrinsic size, and we need to write it again.
Setting an initial style on the renderer with zoom causes this to happen.

Don't apply the page scale to the captured snapshot, since it will already be
applied to the pseudo element tree that the snapshot renders into.

Adds a new test with zoom, which displays both the new and old captures
simultaneously to confirm they're both the right size.

* LayoutTests/fast/css/view-transitions-zoom-expected.html: Added.
* LayoutTests/fast/css/view-transitions-zoom.html: Added.
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::snapshotElementVisualOverflowClippedToViewport):
(WebCore::ViewTransition::captureOldState):
(WebCore::ViewTransition::checkForViewportSizeChange):
(WebCore::ViewTransition::activateViewTransition):
(WebCore::ViewTransition::handleTransitionFrame):
(WebCore::ViewTransition::copyElementBaseProperties):
* Source/WebCore/dom/ViewTransition.h:
* Source/WebCore/rendering/RenderViewTransitionCapture.cpp:
(WebCore::RenderViewTransitionCapture::setSize):
(WebCore::RenderViewTransitionCapture::intrinsicSizeChanged):
* Source/WebCore/rendering/RenderViewTransitionCapture.h:

Canonical link: https://commits.webkit.org/279860@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to