Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3ba31ee3b3d5e5a87e409978bc11eb8aa0c7f1c5
      
https://github.com/WebKit/WebKit/commit/3ba31ee3b3d5e5a87e409978bc11eb8aa0c7f1c5
  Author: Matt Woodrow <mattwood...@apple.com>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/dom/Element.h
    M Source/WebCore/dom/Node.h
    M Source/WebCore/dom/ViewTransition.cpp
    M Source/WebCore/dom/ViewTransition.h
    M Source/WebCore/rendering/RenderElement.cpp
    M Source/WebCore/rendering/RenderElement.h
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderObject.h
    M Source/WebCore/style/StyleAdjuster.cpp
    M Source/WebCore/style/StyleAdjuster.h
    M Source/WebCore/style/StyleResolver.cpp
    M Source/WebCore/style/StyleResolver.h
    M Source/WebCore/style/Styleable.cpp
    M Source/WebCore/style/Styleable.h

  Log Message:
  -----------
  [view-transitions] Pseudo elements can't be captured.
https://bugs.webkit.org/show_bug.cgi?id=273166
<rdar://126964779>

Reviewed by Tim Nguyen.

Pseudo elements (like ::backdrop) don't have an associated Element, so can't
be found by ViewTransition's forEachElementInPaintOrder.

Rather than holding an Element in CapturedElement, hold a Styleable instead
which can represent these pseudo elements as well.

Since the normal Styleable class uses an Element reference, introduces a
WeakStyleable object which uses a WeakPtr to an Element and can (maybe) be
converted back into a Styleable when needed.

Changes most of the ViewTransition code to operator on the RenderElement
from the Styleable, instead of the Element.

Adds capturedInViewTransition to Styleable, so that we can look this up
in cases where the renderer hasn't yet been created.

* LayoutTests/TestExpectations:
* Source/WebCore/dom/Element.cpp:
(WebCore::operator<<):
* Source/WebCore/dom/Element.h:
(WebCore::Element::capturedInViewTransition const): Deleted.
(WebCore::Element::setCapturedInViewTransition): Deleted.
* Source/WebCore/dom/Node.h:
* Source/WebCore/dom/ViewTransition.cpp:
(WebCore::effectiveViewTransitionName):
(WebCore::captureOverflowRect):
(WebCore::snapshotElementVisualOverflowClippedToViewport):
(WebCore::forEachRendererInPaintOrder):
(WebCore::ViewTransition::captureOldState):
(WebCore::ViewTransition::captureNewState):
(WebCore::ViewTransition::activateViewTransition):
(WebCore::ViewTransition::clearViewTransition):
(WebCore::ViewTransition::copyElementBaseProperties):
(WebCore::ViewTransition::updatePseudoElementStyles):
(WebCore::ViewTransition::viewTransitionNewPseudoForCapturedElement):
(WebCore::forEachElementInPaintOrder): Deleted.
* Source/WebCore/dom/ViewTransition.h:
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::initializeStyle):
(WebCore::RenderElement::capturedInViewTransition const): Deleted.
* Source/WebCore/rendering/RenderElement.h:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::rebuildZOrderLists):
(WebCore::RenderLayer::paintList):
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateTransform):
(WebCore::RenderLayerBacking::updateGeometry):
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::collectViewTransitionNewContentLayers):
* Source/WebCore/rendering/RenderObject.h:
(WebCore::RenderObject::capturedInViewTransition const):
(WebCore::RenderObject::setCapturedInViewTransition):
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::capturedInViewTransition const):
* Source/WebCore/style/Styleable.h:
(WebCore::WeakStyleable::operator bool const):
(WebCore::WeakStyleable::operator=):
(WebCore::WeakStyleable::styleable const):

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



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

Reply via email to