Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f9a893b0dbefc3ebdf27746ab6629ae650e73885
      
https://github.com/WebKit/WebKit/commit/f9a893b0dbefc3ebdf27746ab6629ae650e73885
  Author: Antoine Quint <[email protected]>
  Date:   2026-01-16 (Fri, 16 Jan 2026)

  Changed paths:
    A 
LayoutTests/webanimations/threaded-animations/view-timeline-subject-metrics-change-reflected-on-remote-progress-based-timeline-expected.txt
    A 
LayoutTests/webanimations/threaded-animations/view-timeline-subject-metrics-change-reflected-on-remote-progress-based-timeline.html
    M Source/WebCore/animation/ScrollTimeline.cpp

  Log Message:
  -----------
  [threaded-animations] REGRESSION: Animations jitter after device rotation on 
https://codepen.io/utilitybend/full/RwqBymL
https://bugs.webkit.org/show_bug.cgi?id=305642
rdar://167043842

Reviewed by Anne van Kesteren.

In the demo https://codepen.io/utilitybend/full/RwqBymL, elements use a view 
timeline to run animated effects as the user
scrolls. However, when the demo is viewed on an iPad and the device is rotated, 
there are all kinds of odd artifacts. This
is due to the view timeline's remote counterpart in the remote layer tree not 
being updated as the demo's layout changes
upon rotation.

We have a system in place to detect when a scroll timeline or view timeline has 
its source or subject element change metrics,
which among other things will update the resolution data held by that 
timeline's remote counterpart. However, the remote update
only worked for scroll timelines and failed for view timelines. Indeed, in 
`ScrollTimeline::scheduleAcceleratedRepresentationUpdate()`
we would go through `ScrollTimeline::m_source` to access the document 
associated with that timeline, but view timelines will not
have a source explicitly set, but only a subject, which is used to compute the 
source.

All we need to do is to call `ScrollTimeline::source()` which will return the 
computed source for both scroll and view timelines.

We add a new test to check this works indeed.

Test: 
webanimations/threaded-animations/view-timeline-subject-metrics-change-reflected-on-remote-progress-based-timeline.html

* 
LayoutTests/webanimations/threaded-animations/view-timeline-subject-metrics-change-reflected-on-remote-progress-based-timeline-expected.txt:
 Added.
* 
LayoutTests/webanimations/threaded-animations/view-timeline-subject-metrics-change-reflected-on-remote-progress-based-timeline.html:
 Added.
* Source/WebCore/animation/ScrollTimeline.cpp:
(WebCore::ScrollTimeline::scheduleAcceleratedRepresentationUpdate):

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



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

Reply via email to