Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 662686d7e7b2cb7fd3a8d5df6ff7d036e4038af1
      
https://github.com/WebKit/WebKit/commit/662686d7e7b2cb7fd3a8d5df6ff7d036e4038af1
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-08-18 (Tue, 18 Aug 2026)

  Changed paths:
    A 
LayoutTests/webanimations/frame-rate/animation-frame-rate-alignment-highest-compatible-frame-rate-expected.txt
    A 
LayoutTests/webanimations/frame-rate/animation-frame-rate-alignment-highest-compatible-frame-rate.html
    M Source/WebCore/animation/FrameRateAligner.cpp

  Log Message:
  -----------
  FrameRateAligner aligns a newly-encountered frame rate with the lowest 
compatible frame rate instead of the highest
https://bugs.webkit.org/show_bug.cgi?id=321971
rdar://185152473

Reviewed by Antoine Quint.

FrameRateAligner::finishUpdate() looks for "the compatible frame rate with the
highest value" to align a newly-encountered frame rate with, but the comparison
was inverted, so it picked the lowest one instead.

This only matters when the new frame rate is compatible with two existing frame
rates that are incompatible with each other, and therefore may have different
first update times. With animations running at 10fps and 15fps started one frame
apart, a new 30fps animation aligned with the 10fps animation and so was never
sampled in the same frame as the 15fps animation, which is exactly what this
code exists to avoid.

Test: 
webanimations/frame-rate/animation-frame-rate-alignment-highest-compatible-frame-rate.html

* 
LayoutTests/webanimations/frame-rate/animation-frame-rate-alignment-highest-compatible-frame-rate-expected.txt:
 Added.
* 
LayoutTests/webanimations/frame-rate/animation-frame-rate-alignment-highest-compatible-frame-rate.html:
 Added.
* Source/WebCore/animation/FrameRateAligner.cpp:
(WebCore::FrameRateAligner::finishUpdate):

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



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

Reply via email to