Changeset 202075 in webkit


Ignore:
Timestamp:
Jun 14, 2016 6:03:30 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Inline media controls cut off PiP and fullscreen buttons on cnn.com
https://bugs.webkit.org/show_bug.cgi?id=158766
<rdar://problem/24175161>

Patch by Antoine Quint <Antoine Quint> on 2016-06-14
Reviewed by Dean Jackson.

The display of the picture-in-picture and fullscreen buttons are dependent on the availability
of video tracks through a call to hasVideo(). We need to ensure that the display properties of
both those buttons are updated when the number of video tracks has changed since the controls
may be populated prior to the availability of video tracks.

  • Modules/mediacontrols/mediaControlsApple.js:

(Controller.prototype.updateHasVideo):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r202072 r202075  
     12016-06-14  Antoine Quint  <graouts@apple.com>
     2
     3        Inline media controls cut off PiP and fullscreen buttons on cnn.com
     4        https://bugs.webkit.org/show_bug.cgi?id=158766
     5        <rdar://problem/24175161>
     6
     7        Reviewed by Dean Jackson.
     8
     9        The display of the picture-in-picture and fullscreen buttons are dependent on the availability
     10        of video tracks through a call to hasVideo(). We need to ensure that the display properties of
     11        both those buttons are updated when the number of video tracks has changed since the controls
     12        may be populated prior to the availability of video tracks.
     13
     14        * Modules/mediacontrols/mediaControlsApple.js:
     15        (Controller.prototype.updateHasVideo):
     16
    1172016-06-14  Joseph Pecoraro  <pecoraro@apple.com>
    218
  • trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js

    r201883 r202075  
    20362036    updateHasVideo: function()
    20372037    {
    2038         if (this.hasVideo())
    2039             this.controls.panel.classList.remove(this.ClassNames.noVideo);
    2040         else
    2041             this.controls.panel.classList.add(this.ClassNames.noVideo);
     2038        this.controls.panel.classList.toggle(this.ClassNames.noVideo, !this.hasVideo());
     2039        // The availability of the picture-in-picture button as well as the full-screen
     2040        // button depends no the value returned by hasVideo(), so make sure we invalidate
     2041        // the availability of both controls.
     2042        this.updateFullscreenButtons();
    20422043    },
    20432044
Note: See TracChangeset for help on using the changeset viewer.