Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c8e5a371ab3ea0972719c4917b0b62757a332b90
      
https://github.com/WebKit/WebKit/commit/c8e5a371ab3ea0972719c4917b0b62757a332b90
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-07-02 (Thu, 02 Jul 2026)

  Changed paths:
    A 
LayoutTests/media/modern-media-controls/time-label/time-label-value-dedupes-expected.txt
    A 
LayoutTests/media/modern-media-controls/time-label/time-label-value-dedupes.html
    M Source/WebCore/Modules/modern-media-controls/controls/time-label.js

  Log Message:
  -----------
  TimeLabel re-formats on every timeupdate when its value is unchanged
https://bugs.webkit.org/show_bug.cgi?id=318288
rdar://181073565

Reviewed by Eric Carlson.

TimeLabel's `value` setter unconditionally marked the "value" property
dirty, so it was re-committed on every layout even when the displayed
value had not changed. Because TimeControl._performIdealLayout() writes
each label's value on every layout, and layout runs on each timeupdate,
this repeatedly performed two independent formatting passes
(Intl.DurationFormat for textContent and formattedStringForDuration for
the aria-label) plus a setAttribute, all producing identical output.

Early-return from the setter when the value is unchanged, treating NaN
as equal to NaN so a loading label held at NaN also stops re-formatting.

Test: media/modern-media-controls/time-label/time-label-value-dedupes.html

* 
LayoutTests/media/modern-media-controls/time-label/time-label-value-dedupes-expected.txt:
 Added.
* 
LayoutTests/media/modern-media-controls/time-label/time-label-value-dedupes.html:
 Added.
* Source/WebCore/Modules/modern-media-controls/controls/time-label.js:
(TimeLabel.prototype.set value):

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



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

Reply via email to