[webkit-changes] [WebKit/WebKit] 4f53db: Fix Clock offset bug for setPlayRate

Ahmad Saleem noreply at github.com
Wed Oct 4 12:54:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4f53db6c72686f745024a8dc9b6cecb9c83d48b1
      https://github.com/WebKit/WebKit/commit/4f53db6c72686f745024a8dc9b6cecb9c83d48b1
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-10-04 (Wed, 04 Oct 2023)

  Changed paths:
    A LayoutTests/media/media-controller-play-then-pause-expected.txt
    A LayoutTests/media/media-controller-play-then-pause.html
    M Source/WebCore/PAL/pal/system/ClockGeneric.cpp
    M Source/WebCore/PAL/pal/system/ClockGeneric.h

  Log Message:
  -----------
  Fix Clock offset bug for setPlayRate

https://bugs.webkit.org/show_bug.cgi?id=262619

Reviewed by Eric Carlson.

Merge: https://src.chromium.org/viewvc/blink?view=revision&revision=159814

Stopping and then restarting a WebCore::ClockGeneric resulted in junk values on subsequent currentTime() calls,
this caused MediaController (the only user of Clock as far as I can tell) to lose the playback position when paused.

* Source/WebCore/PAL/pal/system/ClockGeneric.cpp:
(ClockGeneric::currentTime):
(ClockGeneric::setPlayRate):
(ClockGeneric::stop):
(ClockGeneric::currentDelta):
* Source/WebCore/PAL/pal/system/ClockGeneric.h:
* LayoutTests/media/media-controller-play-then-pause.html: Add Test Case
* LayoutTests/media/media-controller-play-then-pause-expected.txt: Add Test Case Expectation

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




More information about the webkit-changes mailing list