Changeset 174972 in webkit


Ignore:
Timestamp:
Oct 21, 2014 9:28:34 AM (10 years ago)
Author:
jer.noble@apple.com
Message:

REGRESSION (r170808): Volume slider in built-in media controls only changes volume when thumb is released, not while dragging
https://bugs.webkit.org/show_bug.cgi?id=137805

Reviewed by Dan Bernstein.

Source/WebCore:

Test: media/video-volume-slider-drag.html

Respond to the 'input' event rather than the 'change' event for the volume slider, so that
volume changes are continuous during drag operations.

Also listen for both 'input' and 'change' events for the timeline slider, doing fastSeek()
during 'input' and setting an explicit currentTime during 'change'. This is the same behavior
as current, but using 'change' instead of 'mouseup' to do the final currentTime change.

  • Modules/mediacontrols/mediaControlsApple.js:

(Controller.prototype.createControls):
(Controller.prototype.handleTimelineInput):
(Controller.prototype.handleTimelineChange):
(Controller.prototype.handleTimelineMouseUp):
(Controller.prototype.handleVolumeSliderInput):
(Controller.prototype.handlePlayButtonClicked): Deleted.
(Controller.prototype.handleMaxButtonClicked): Deleted.

LayoutTests:

  • media/video-volume-slider-drag-expected.txt: Added.
  • media/video-volume-slider-drag.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r174946 r174972  
     12014-10-21  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION (r170808): Volume slider in built-in media controls only changes volume when thumb is released, not while dragging
     4        https://bugs.webkit.org/show_bug.cgi?id=137805
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * media/video-volume-slider-drag-expected.txt: Added.
     9        * media/video-volume-slider-drag.html: Added.
     10
    1112014-10-21  Manuel Rego Casasnovas  <rego@igalia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r174946 r174972  
     12014-10-21  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION (r170808): Volume slider in built-in media controls only changes volume when thumb is released, not while dragging
     4        https://bugs.webkit.org/show_bug.cgi?id=137805
     5
     6        Reviewed by Dan Bernstein.
     7
     8        Test: media/video-volume-slider-drag.html
     9
     10        Respond to the 'input' event rather than the 'change' event for the volume slider, so that
     11        volume changes are continuous during drag operations.
     12
     13        Also listen for both 'input' and 'change' events for the timeline slider, doing fastSeek()
     14        during 'input' and setting an explicit currentTime during 'change'. This is the same behavior
     15        as current, but using 'change' instead of 'mouseup' to do the final currentTime change.
     16
     17        * Modules/mediacontrols/mediaControlsApple.js:
     18        (Controller.prototype.createControls):
     19        (Controller.prototype.handleTimelineInput):
     20        (Controller.prototype.handleTimelineChange):
     21        (Controller.prototype.handleTimelineMouseUp):
     22        (Controller.prototype.handleVolumeSliderInput):
     23        (Controller.prototype.handlePlayButtonClicked): Deleted.
     24        (Controller.prototype.handleMaxButtonClicked): Deleted.
     25
    1262014-10-21  Manuel Rego Casasnovas  <rego@igalia.com>
    227
  • trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js

    r174832 r174972  
    335335        timeline.type = 'range';
    336336        timeline.value = 0;
    337         this.listenFor(timeline, 'input', this.handleTimelineChange);
     337        this.listenFor(timeline, 'input', this.handleTimelineInput);
     338        this.listenFor(timeline, 'change', this.handleTimelineChange);
    338339        this.listenFor(timeline, 'mouseover', this.handleTimelineMouseOver);
    339340        this.listenFor(timeline, 'mouseout', this.handleTimelineMouseOut);
     
    386387        volume.max = 1;
    387388        volume.step = .01;
    388         this.listenFor(volume, 'change', this.handleVolumeSliderChange);
     389        this.listenFor(volume, 'input', this.handleVolumeSliderInput);
    389390
    390391        var captionButton = this.controls.captionButton = document.createElement('button');
     
    741742    },
    742743
     744    handleTimelineInput: function(event)
     745    {
     746        this.video.fastSeek(this.controls.timeline.value);
     747    },
     748
    743749    handleTimelineChange: function(event)
    744750    {
    745         this.video.fastSeek(this.controls.timeline.value);
     751        this.video.currentTime = this.controls.timeline.value;
    746752    },
    747753
     
    805811    {
    806812        this.scrubbing = false;
    807 
    808         // Do a precise seek when we lift the mouse:
    809         this.video.currentTime = this.controls.timeline.value;
    810813    },
    811814
     
    837840    },
    838841
    839     handleVolumeSliderChange: function(event)
     842    handleVolumeSliderInput: function(event)
    840843    {
    841844        if (this.video.muted) {
Note: See TracChangeset for help on using the changeset viewer.