Changeset 185207 in webkit


Ignore:
Timestamp:
Jun 4, 2015, 11:26:05 AM (10 years ago)
Author:
eric.carlson@apple.com
Message:

[Mac] Don't show default controls after playing to wireless target, again
https://bugs.webkit.org/show_bug.cgi?id=145620
<rdar://problem/21145806>

Reviewed by Dean Jackson.

  • Modules/mediacontrols/mediaControlsApple.js:

(Controller.prototype.updateControls): Show or hide the panel as appropriate.
(Controller.prototype.handleWrapperMouseMove): Early return if !video.controls.
(Controller.prototype.addControls): Call updateControls instead of this.setNeedsTimelineMetricsUpdate

so all needed setup is done.

(Controller.prototype.resetHideControlsTimer): Only start the hide timer if playing.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r185206 r185207  
     12015-06-04  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [Mac] Don't show default controls after playing to wireless target, again
     4        https://bugs.webkit.org/show_bug.cgi?id=145620
     5        <rdar://problem/21145806>
     6
     7        Reviewed by Dean Jackson.
     8
     9        * Modules/mediacontrols/mediaControlsApple.js:
     10        (Controller.prototype.updateControls): Show or hide the panel as appropriate.
     11        (Controller.prototype.handleWrapperMouseMove): Early return if !video.controls.
     12        (Controller.prototype.addControls): Call updateControls instead of this.setNeedsTimelineMetricsUpdate
     13          so all needed setup is done.
     14        (Controller.prototype.resetHideControlsTimer): Only start the hide timer if playing.
     15
    1162015-06-04  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js

    r184813 r185207  
    612612        this.updateLayoutForDisplayedWidth();
    613613        this.setNeedsTimelineMetricsUpdate();
     614
     615        if (this.video.controls) {
     616            this.controls.panel.classList.add(this.ClassNames.show);
     617            this.controls.panel.classList.remove(this.ClassNames.hidden);
     618            this.resetHideControlsTimer();
     619        } else {
     620            this.controls.panel.classList.remove(this.ClassNames.show);
     621            this.controls.panel.classList.add(this.ClassNames.hidden);
     622        }
    614623    },
    615624
     
    780789    handleWrapperMouseMove: function(event)
    781790    {
     791        if (!this.video.controls)
     792            return;
     793
    782794        if (this.controlsAreHidden())
    783795            this.showControls();
     
    14761488        this.base.appendChild(this.controls.inlinePlaybackPlaceholder);
    14771489        this.base.appendChild(this.controls.panel);
    1478         this.setNeedsTimelineMetricsUpdate();
     1490        this.updateControls();
    14791491    },
    14801492
     
    18681880        if (this.hideTimer)
    18691881            clearTimeout(this.hideTimer);
    1870         this.hideTimer = setTimeout(this.hideControls.bind(this), this.HideControlsDelay);
     1882
     1883        if (this.isPlaying)
     1884            this.hideTimer = setTimeout(this.hideControls.bind(this), this.HideControlsDelay);
    18711885    },
    18721886
Note: See TracChangeset for help on using the changeset viewer.