[webkit-changes] [WebKit/WebKit] bcf280: [media-controls] volume slider should animate when...

Antoine Quint noreply at github.com
Fri Mar 24 02:41:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bcf280115e84f94ff9f5da5596e20ffb0fceebf8
      https://github.com/WebKit/WebKit/commit/bcf280115e84f94ff9f5da5596e20ffb0fceebf8
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2023-03-24 (Fri, 24 Mar 2023)

  Changed paths:
    M LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api-expected.txt
    M LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api-mute-expected.txt
    M LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api-mute.html
    M LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api.html
    M Source/WebCore/Modules/modern-media-controls/controls/slider-base.js
    M Source/WebCore/Modules/modern-media-controls/media/media-controller-support.js
    M Source/WebCore/Modules/modern-media-controls/media/volume-support.js

  Log Message:
  -----------
  [media-controls] volume slider should animate when mute button is toggled
https://bugs.webkit.org/show_bug.cgi?id=254350
rdar://102427937

Reviewed by Dean Jackson.

We used to simply snap the volume slider value as the mute button is toggled. Now we use a short animation
by checking we have an event passed to syncControl(), which indicates this is not the initial call to syncControl()
where we do not want to animate as we just want to match the initial state of the media element.

* LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api-expected.txt:
* LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api-mute-expected.txt:
* LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api-mute.html:
* LayoutTests/media/modern-media-controls/volume-support/volume-support-media-api.html:
* Source/WebCore/Modules/modern-media-controls/controls/slider-base.js:
(SliderBase.prototype.set value):
(SliderBase.prototype.setValueAnimated):
(SliderBase.prototype._setValueInternal):
(SliderBase.prototype._handlePointerdownEvent):
* Source/WebCore/Modules/modern-media-controls/media/media-controller-support.js:
(MediaControllerSupport.prototype.handleEvent):
* Source/WebCore/Modules/modern-media-controls/media/volume-support.js:
(VolumeSupport.prototype.syncControl):
(VolumeSupport):

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




More information about the webkit-changes mailing list