[webkit-changes] [WebKit/WebKit] 1a69a0: [view-transitions] Fix white flash on certain demos

Tim Nguyen noreply at github.com
Wed Mar 20 01:27:03 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1a69a06fefcb4f147bce55072b5346aedc75d170
      https://github.com/WebKit/WebKit/commit/1a69a06fefcb4f147bce55072b5346aedc75d170
  Author: Tim Nguyen <ntim at apple.com>
  Date:   2024-03-20 (Wed, 20 Mar 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/no-white-flash-before-activation-expected.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/no-white-flash-before-activation-ref.html
    A LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/no-white-flash-before-activation.html
    M Source/WebCore/dom/Element.h
    M Source/WebCore/dom/EventTarget.h
    M Source/WebCore/dom/ViewTransition.cpp
    M Source/WebCore/rendering/RenderElement.cpp

  Log Message:
  -----------
  [view-transitions] Fix white flash on certain demos
https://bugs.webkit.org/show_bug.cgi?id=270146
rdar://123668861

Reviewed by Matt Woodrow.

The white flash was caused by the definition of `RenderElement::capturedInViewTransition` leading to the original element layers being hidden too early before the pseudo-elements are even shown.

To fix this, update the definition of capturedInViewTransition to match exactly what the spec specifies:

https://drafts.csswg.org/css-view-transitions-1/#ref-for-captured-in-a-view-transition

This also ensures that we only move element layers for content that was successfully captured as opposed to anything with a view-transition-name.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/no-white-flash-before-activation-expected.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/no-white-flash-before-activation-ref.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-view-transitions/no-white-flash-before-activation.html: Added.
* Source/WebCore/dom/Element.h:
(WebCore::Element::capturedInViewTransition const):
(WebCore::Element::setCapturedInViewTransition):
* Source/WebCore/dom/EventTarget.h:
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::ViewTransition::captureOldState):
(WebCore::ViewTransition::activateViewTransition):
(WebCore::ViewTransition::clearViewTransition):
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::capturedInViewTransition const):

Canonical link: https://commits.webkit.org/276396@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