Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1e6f8e595987eb38a0b906594d96fa791dfb2d88
      
https://github.com/WebKit/WebKit/commit/1e6f8e595987eb38a0b906594d96fa791dfb2d88
  Author: Antoine Quint <[email protected]>
  Date:   2025-10-29 (Wed, 29 Oct 2025)

  Changed paths:
    M Source/WebCore/Headers.cmake
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/animation/WebAnimationTime.h
    M Source/WebCore/platform/animation/AcceleratedTimeline.cpp
    M Source/WebCore/platform/animation/AcceleratedTimeline.h
    A Source/WebCore/platform/animation/ProgressResolutionData.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/SourcesCocoa.txt
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimeline.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimeline.h
    R 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimelineRegistry.cpp
    R Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimelineRegistry.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
    A Source/WebKit/UIProcess/RemoteLayerTree/RemoteMonotonicTimeline.cpp
    A Source/WebKit/UIProcess/RemoteLayerTree/RemoteMonotonicTimeline.h
    A 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteMonotonicTimelineRegistry.cpp
    A Source/WebKit/UIProcess/RemoteLayerTree/RemoteMonotonicTimelineRegistry.h
    A Source/WebKit/UIProcess/RemoteLayerTree/RemoteProgressBasedTimeline.cpp
    A Source/WebKit/UIProcess/RemoteLayerTree/RemoteProgressBasedTimeline.h
    A 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteProgressBasedTimelineRegistry.cpp
    A 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteProgressBasedTimelineRegistry.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h
    M 
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h
    M 
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
    M 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h
    M 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.mm
    M 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.h
    M 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  -----------
  [threaded-animation-resolution] upload progress-based timelines through the 
remote layer tree
https://bugs.webkit.org/show_bug.cgi?id=301501
rdar://163469082

Reviewed by Matt Woodrow.

In 301942@main we added a system to upload monotonic timelines from the web 
process to the remote
layer tree. In preparation for the support of scroll-driven animations running 
in the remote layer
tree, we add a new `ProgressResolutionData` struct to package all the relevant 
information for
progress-based timelines. The `m_originTime` member is now replaced with an 
`m_data` member which
holds a variant holding either monotonic (`Seconds`) or progress-based data 
(`ProgressResolutionData`).

The remote layer tree `RemoteAnimationTimeline` class now has two subclasses, 
`RemoteMonotonicTimeline`
and `RemoteProgressBasedTimeline`. The `RemoteAnimationTimelineRegistry` no 
longer exists and instead
two different registry classes are added, one for each timeline type: 
`RemoteMonotonicTimelineRegistry`
and `RemoteProgressBasedTimelineRegistry`. The former is backing monotonic 
timeline management for
`RemoteLayerTreeEventDispatcher` (macOS) and 
`RemoteScrollingCoordinatorProxyIOS` (iOS) while the latter
is backing progress-based timeline management for `RemoteScrollingTree` (both 
macOS and iOS).

Another change was required to adhere to our safe-programming guidelines and 
the `timeline()` lookup
methods now return a RefPtr instead of a raw pointer in order to avoid the use 
of `RefPtr::unsageGet()`
in `RemoteScrollingCoordinatorProxyIOS::timeline()` and 
`RemoteLayerTreeEventDispatcher::timeline()`.

Note that this patch does not enable the creation of remote progress-based 
timelines, nor does it add
the necessary code to update remote progress-based timelines and schedule 
invalidation of affected remote
layer tree nodes.

* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/animation/WebAnimationTime.h:
* Source/WebCore/platform/animation/AcceleratedTimeline.cpp:
(WebCore::AcceleratedTimeline::create):
(WebCore::AcceleratedTimeline::AcceleratedTimeline):
(WebCore::AcceleratedTimeline::originTime const):
(WebCore::AcceleratedTimeline::progressResolutionData const):
* Source/WebCore/platform/animation/AcceleratedTimeline.h:
(WebCore::AcceleratedTimeline::isMonotonic const):
(WebCore::AcceleratedTimeline::isProgressBased const):
(WebCore::AcceleratedTimeline::data const):
(WebCore::AcceleratedTimeline::originTime const): Deleted.
* Source/WebCore/platform/animation/ProgressResolutionData.h: Added.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimeline.cpp:
(WebKit::RemoteAnimationTimeline::RemoteAnimationTimeline):
(WebKit::computeCurrentTime): Deleted.
(WebKit::RemoteAnimationTimeline::create): Deleted.
(WebKit::RemoteAnimationTimeline::updateCurrentTime): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimeline.h:
(WebKit::RemoteAnimationTimeline::duration const):
(): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::timeline const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::timeline const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteMonotonicTimeline.cpp: Copied 
from Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimeline.cpp.
(WebKit::RemoteMonotonicTimeline::create):
(WebKit::RemoteMonotonicTimeline::RemoteMonotonicTimeline):
(WebKit::RemoteMonotonicTimeline::updateCurrentTime):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteMonotonicTimeline.h: Copied 
from Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimeline.h.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteMonotonicTimelineRegistry.cpp: 
Renamed from 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimelineRegistry.cpp.
(WebKit::RemoteMonotonicTimelineRegistry::update):
(WebKit::RemoteMonotonicTimelineRegistry::get const):
(WebKit::RemoteMonotonicTimelineRegistry::advanceCurrentTime):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteMonotonicTimelineRegistry.h: 
Copied from 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationTimelineRegistry.h.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteProgressBasedTimeline.cpp: 
Added.
(WebKit::RemoteProgressBasedTimeline::create):
(WebKit::RemoteProgressBasedTimeline::RemoteProgressBasedTimeline):
(WebKit::RemoteProgressBasedTimeline::updateCurrentTime):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteProgressBasedTimeline.h: Added.
* 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteProgressBasedTimelineRegistry.cpp:
 Added.
(WebKit::RemoteProgressBasedTimelineRegistry::update):
(WebKit::RemoteProgressBasedTimelineRegistry::get const):
* 
Source/WebKit/UIProcess/RemoteLayerTree/RemoteProgressBasedTimelineRegistry.h: 
Added.
(WebKit::RemoteProgressBasedTimelineRegistry::isEmpty const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
(WebKit::RemoteScrollingCoordinatorProxy::timeline const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::updateTimelineRegistration):
(WebKit::RemoteScrollingTree::timeline const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
* 
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.h:
* 
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxyIOS::updateTimelineRegistration):
(WebKit::RemoteScrollingCoordinatorProxyIOS::timeline const):
(WebKit::RemoteScrollingCoordinatorProxyIOS::updateAnimations):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.mm:
(WebKit::RemoteLayerTreeEventDispatcher::updateTimelineRegistration):
(WebKit::RemoteLayerTreeEventDispatcher::timeline):
(WebKit::RemoteLayerTreeEventDispatcher::updateAnimations):
* 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.h:
* 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm:
(WebKit::RemoteScrollingCoordinatorProxyMac::timeline const):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to