Changeset 171184 in webkit


Ignore:
Timestamp:
Jul 17, 2014 9:27:32 AM (10 years ago)
Author:
jer.noble@apple.com
Message:

Enable legacy fullscreen API in media controls
https://bugs.webkit.org/show_bug.cgi?id=134985

Reviewed by Eric Carlson.

Source/WebCore:
Allow clients who have not enabled HTML5 Fullscreen APIs to still use fullscreen mode
with <video> elements by using the legacy, video-element-specific fullscreen APIs in
the <video> media controls.

  • Modules/mediacontrols/mediaControlsApple.js:

(Controller):
(Controller.prototype.handleReadyStateChange):
(Controller.prototype.isFullScreen):
(Controller.prototype.handlePlayButtonClicked):
(Controller.prototype.updateFullscreenButton):
(Controller.prototype.handleFullscreenButtonClicked):

LayoutTests:
Rebaseline expected results.

  • platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt:
  • platform/mac/fast/layers/video-layer-expected.txt:
  • platform/mac/media/media-controls-clone-expected.txt:
  • platform/mac/webarchive/loading/video-in-webarchive-expected.txt:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r171183 r171184  
     12014-07-17  Jer Noble  <jer.noble@apple.com>
     2
     3        Enable legacy fullscreen API in media controls
     4        https://bugs.webkit.org/show_bug.cgi?id=134985
     5
     6        Reviewed by Eric Carlson.
     7
     8        Rebaseline expected results.
     9
     10        * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt:
     11        * platform/mac/fast/layers/video-layer-expected.txt:
     12        * platform/mac/media/media-controls-clone-expected.txt:
     13        * platform/mac/webarchive/loading/video-in-webarchive-expected.txt:
     14
    1152014-07-17  Manuel Rego Casasnovas  <rego@igalia.com>
    216
  • trunk/LayoutTests/platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt

    r167828 r171184  
    1919layer at (40,156) size 16x16
    2020  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
    21 layer at (180,160) size 98x9
    22   RenderFlexibleBox {DIV} at (171,8) size 99x10
    23 layer at (182,160) size 95x9
    24   RenderFlexibleBox {DIV} at (2,0) size 95x9
    25 layer at (285,156) size 16x16
    26   RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF]
     21layer at (195,160) size 113x9
     22  RenderFlexibleBox {DIV} at (186,8) size 114x10
     23layer at (197,160) size 110x9
     24  RenderFlexibleBox {DIV} at (2,0) size 110x9
  • trunk/LayoutTests/platform/mac/fast/layers/video-layer-expected.txt

    r167828 r171184  
    2424layer at (91,241) size 16x16
    2525  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
    26 layer at (231,245) size 98x9
    27   RenderFlexibleBox {DIV} at (171,8) size 99x10
    28 layer at (233,245) size 95x9
    29   RenderFlexibleBox {DIV} at (2,0) size 95x9
    30 layer at (336,241) size 16x16
    31   RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF]
     26layer at (246,245) size 113x9
     27  RenderFlexibleBox {DIV} at (186,8) size 114x10
     28layer at (248,245) size 110x9
     29  RenderFlexibleBox {DIV} at (2,0) size 110x9
  • trunk/LayoutTests/platform/mac/media/media-controls-clone-expected.txt

    r167828 r171184  
    2020layer at (40,138) size 16x16
    2121  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
    22 layer at (180,142) size 98x9
    23   RenderFlexibleBox {DIV} at (171,8) size 99x10
    24 layer at (182,142) size 95x9
    25   RenderFlexibleBox {DIV} at (2,0) size 95x9
    26 layer at (285,138) size 16x16
    27   RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF]
     22layer at (195,142) size 113x9
     23  RenderFlexibleBox {DIV} at (186,8) size 114x10
     24layer at (197,142) size 110x9
     25  RenderFlexibleBox {DIV} at (2,0) size 110x9
    2826layer at (308,133) size 200x25
    2927  RenderFlexibleBox {DIV} at (0,0) size 200x25
     
    4644layer at (40,292) size 16x16
    4745  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
    48 layer at (180,296) size 98x9
    49   RenderFlexibleBox {DIV} at (171,8) size 99x10
    50 layer at (182,296) size 95x9
    51   RenderFlexibleBox {DIV} at (2,0) size 95x9
    52 layer at (285,292) size 16x16
    53   RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF]
     46layer at (195,296) size 113x9
     47  RenderFlexibleBox {DIV} at (186,8) size 114x10
     48layer at (197,296) size 110x9
     49  RenderFlexibleBox {DIV} at (2,0) size 110x9
    5450layer at (308,287) size 200x25
    5551  RenderFlexibleBox {DIV} at (0,0) size 200x25
  • trunk/LayoutTests/platform/mac/webarchive/loading/video-in-webarchive-expected.txt

    r156546 r171184  
    1212frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
    1313frame "<!--framePath //<!--frame0-->-->" - didFailLoadWithError
    14 main frame "webkitfullscreenchange" - didFinishLoadForFrame
     14main frame "webkitendfullscreen" - didFinishLoadForFrame
    1515frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame
    1616
  • trunk/Source/WebCore/ChangeLog

    r171181 r171184  
     12014-07-17  Jer Noble  <jer.noble@apple.com>
     2
     3        Enable legacy fullscreen API in media controls
     4        https://bugs.webkit.org/show_bug.cgi?id=134985
     5
     6        Reviewed by Eric Carlson.
     7
     8        Allow clients who have not enabled HTML5 Fullscreen APIs to still use fullscreen mode
     9        with <video> elements by using the legacy, video-element-specific fullscreen APIs in
     10        the <video> media controls.
     11
     12        * Modules/mediacontrols/mediaControlsApple.js:
     13        (Controller):
     14        (Controller.prototype.handleReadyStateChange):
     15        (Controller.prototype.isFullScreen):
     16        (Controller.prototype.handlePlayButtonClicked):
     17        (Controller.prototype.updateFullscreenButton):
     18        (Controller.prototype.handleFullscreenButtonClicked):
     19
    1202014-07-17  Vineet Chaudhary  <code.vineet@gmail.com>
    221
  • trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js

    r171032 r171184  
    2727    this.updateCaptionButton();
    2828    this.updateCaptionContainer();
     29    this.updateFullscreenButton();
    2930    this.updateVolume();
    3031    this.updateHasAudio();
     
    6465        volumechange: 'handleVolumeChange',
    6566        webkitfullscreenchange: 'handleFullscreenChange',
     67        webkitbeginfullscreen: 'handleFullscreenChange',
     68        webkitendfullscreen: 'handleFullscreenChange',
    6669    },
    6770    HideControlsDelay: 4 * 1000,
     
    553556        this.updateCaptionButton();
    554557        this.updateCaptionContainer();
     558        this.updateFullscreenButton();
    555559        this.updateProgress();
    556560    },
     
    615619    isFullScreen: function()
    616620    {
    617         return document.webkitCurrentFullScreenElement === this.video;
     621        return this.video.webkitDisplayingFullscreen;
    618622    },
    619623
     
    828832    },
    829833
     834    updateFullscreenButton: function()
     835    {
     836        this.controls.fullscreenButton.classList.toggle(this.ClassNames.hidden, !this.video.webkitSupportsFullscreen);
     837    },
     838
    830839    handleFullscreenButtonClicked: function(event)
    831840    {
    832841        if (this.isFullScreen())
    833             document.webkitExitFullscreen();
     842            this.video.webkitExitFullscreen();
    834843        else
    835             this.video.webkitRequestFullscreen();
     844            this.video.webkitEnterFullscreen();
    836845        return true;
    837846    },
Note: See TracChangeset for help on using the changeset viewer.