Changeset 156546 in webkit


Ignore:
Timestamp:
Sep 27, 2013 9:05:05 AM (11 years ago)
Author:
jer.noble@apple.com
Message:

[Mac] Implement the media controls in JavaScript.
https://bugs.webkit.org/show_bug.cgi?id=120895

Reviewed by Dean Jackson.

Source/JavaScriptCore:

Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Re-implement the existing MediaControls constellation of classes in JavaScript
and CSS. This will allow different ports to configure their controls without
dependencies on the layout requirements of any other port's controls.

Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT:

  • Configurations/FeatureDefines.xcconfig:

Add new source files to the project:

  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:

Add a new class MediaControlsHost which the script controls can use to
communicate with the HTMLMediaElement without exposing private interfaces
to web facing scripts:

  • Modules/mediacontrols/MediaControlsHost.cpp: Added.

(WebCore::MediaControlsHost::automaticKeyword): Static method.
(WebCore::MediaControlsHost::forcedOnlyKeyword): Ditto.
(WebCore::MediaControlsHost::alwaysOnKeyword): Ditto.
(WebCore::MediaControlsHost::create): Simple factory.
(WebCore::MediaControlsHost::MediaControlsHost): Simple constructor.
(WebCore::MediaControlsHost::~MediaControlsHost): Simple destructor.
(WebCore::MediaControlsHost::sortedTrackListForMenu): Pass through to CaptionUserPreferences.
(WebCore::MediaControlsHost::displayNameForTrack): Ditto.
(WebCore::MediaControlsHost::captionMenuOffItem): Pass through to TextTrack.
(WebCore::MediaControlsHost::captionMenuAutomaticItem): Ditto.
(WebCore::MediaControlsHost::captionDisplayMode): Pass through to CaptionUserPreferences.
(WebCore::MediaControlsHost::setSelectedTextTrack): Pass through to HTMLMediaElement.
(WebCore::MediaControlsHost::textTrackContainer): Lazily create a MediaControlTextTrackContainerElement.
(WebCore::MediaControlsHost::updateTextTrackContainer): Pass through to MediaControlTextTrackContainerElement.

  • Modules/mediacontrols/MediaControlsHost.h: Added.
  • Modules/mediacontrols/MediaControlsHost.idl: Added.
  • Modules/mediacontrols/mediaControlsApple.css: Added.

Add convenience methods for adding a MediaControlsHost to a VM.

  • bindings/js/ScriptObject.cpp:

(WebCore::ScriptGlobalObject::set):

  • bindings/js/ScriptObject.h:

Add the new controller .js implementation:

  • Modules/mediacontrols/mediaControlsApple.js: Added.

(createControls): Global method to create a new Controller object.
(Controller): Constructor. Create and configure the default set of controls.
(Controller.prototype.addListeners): Adds event listeners to the this.video object.
(Controller.prototype.removeListeners): Removes listeners from same.
(Controller.prototype.handleEvent): Makes Controller an EventHandler, making registration and

deregistration simpler.

(Controller.prototype.createBase): Creates the base controls object and the text track container.
(Controller.prototype.createControls): Creates the controls panel object and controller UI.
(Controller.prototype.setControlsType): Switches between Full Screen and Inline style of controller.
(Controller.prototype.disconnectControls): Disconnects all UI elements from the DOM.
(Controller.prototype.configureInlineControls): Configures existing controls for Inline mode.
(Controller.prototype.configureFullScreenControls): Ditto, for Full Screen Mode.

Add listeners for HTMLMediaElement events:
(Controller.prototype.onloadstart): Update the status display.
(Controller.prototype.onerror): Ditto.
(Controller.prototype.onabort): Ditto.
(Controller.prototype.onsuspend): Ditto.
(Controller.prototype.onprogress): Ditto.
(Controller.prototype.onstalled): Ditto.
(Controller.prototype.onwaiting): Ditto.
(Controller.prototype.onreadystatechange): Ditto.
(Controller.prototype.ontimeupdate): Update the timeline and time displays.
(Controller.prototype.ondurationchange): Ditto.
(Controller.prototype.onplaying): Update the play button.
(Controller.prototype.onplay): Ditto.
(Controller.prototype.onpause): Ditto.
(Controller.prototype.onratechange): Ditto.
(Controller.prototype.onvolumechange): Update the volume and mute UI.
(Controller.prototype.ontexttrackchange): Update the text track container and captions button.
(Controller.prototype.ontexttrackadd): Ditto.
(Controller.prototype.ontexttrackremove): Ditto.
(Controller.prototype.ontexttrackcuechange): Ditto.
(Controller.prototype.onfullscreenchange): Reconfigure the controls.

Add listeners for UI element events:
(Controller.prototype.onwrappermousemove): Show the controls and start the hide timer.
(Controller.prototype.onwrappermouseout): Hide the controls and stop the hide timer.
(Controller.prototype.onrewindbuttonclicked): Rewind.
(Controller.prototype.onplaybuttonclicked): Toggle pause.
(Controller.prototype.ontimelinechange): Update the currentTime.
(Controller.prototype.ontimelinedown):
(Controller.prototype.ontimelineup):
(Controller.prototype.ontimelinemouseover): Show the thumbnail view if available.
(Controller.prototype.ontimelinemouseout): Hide same.
(Controller.prototype.ontimelinemousemove): Move the thumbnail view.
(Controller.prototype.onmutebuttonclicked): Mute audio.
(Controller.prototype.onminbuttonclicked): Increase volume to max.
(Controller.prototype.onmaxbuttonclicked): Decrease volume to min.
(Controller.prototype.onvolumesliderchange): Update the current volume.
(Controller.prototype.oncaptionbuttonclicked): Show or hide the track menu.
(Controller.prototype.onfullscreenbuttonclicked): Enter or exit fullscreen.
(Controller.prototype.oncontrolschange): Show or hide the controls panel.
(Controller.prototype.onseekbackmousedown): Start seeking and enable the seek timer.
(Controller.prototype.onseekbackmouseup): Stop seeking and disable the seek timer.
(Controller.prototype.onseekforwardmousedown): Start seekind and enable the seek timer.
(Controller.prototype.onseekforwardmouseup): Stop seekind and disable the seek timer.

Add action methods (which are mostly self explanatory):
(Controller.prototype.updateDuration):
(Controller.prototype.updatePlaying):
(Controller.prototype.showControls):
(Controller.prototype.hideControls):
(Controller.prototype.removeControls):
(Controller.prototype.addControls):
(Controller.prototype.updateTime):
(Controller.prototype.updateReadyState):
(Controller.prototype.setStatusHidden):
(Controller.prototype.updateThumbnailTrack):
(Controller.prototype.updateCaptionButton):
(Controller.prototype.updateCaptionContainer):
(Controller.prototype.buildCaptionMenu):
(Controller.prototype.captionItemSelected):
(Controller.prototype.destroyCaptionMenu):
(Controller.prototype.updateVolume):

Add utility methods:
(Controller.prototype.isFullScreen):
(Controller.prototype.canPlay):
(Controller.prototype.nextRate):
(Controller.prototype.seekBackFaster):
(Controller.prototype.seekForwardFaster):
(Controller.prototype.formatTime):
(Controller.prototype.trackHasThumbnails):

Add the stylesheet for the javascript controls (which are mostly) copied from
the (deleted) mediaControlsQuickTime.css and fullscreenQuickTime.css files:

  • Modules/mediacontrols/mediaControlsApple.css: Added.
  • css/fullscreenQuickTime.css: Removed.
  • css/mediaControlsQuickTime.css: Removed.

Inject new stylesheets into UA sheets:

  • css/CSSDefaultStyleSheets.cpp:

(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):

Use the new javascript controls rather than MediaControls:

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::childShouldCreateRenderer): Use the javascript controls if available.
(WebCore::HTMLMediaElement::updateTextTrackDisplay): Ditto.
(WebCore::HTMLMediaElement::mediaControls): Ditto.
(WebCore::HTMLMediaElement::hasMediaControls): Ditto.
(WebCore::HTMLMediaElement::createMediaControls): Ditto.
(WebCore::HTMLMediaElement::configureMediaControls): Ditto.
(WebCore::HTMLMediaElement::configureTextTrackDisplay): Ditto.
(WebCore::HTMLMediaElement::ensureIsolatedWorld): Create a new VM for the controls script.
(WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): Inject the media controls script into the VM.
(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Inject the MediaControlsHost into the VM and call

the scripts global factory function.

  • html/HTMLMediaElement.h:

Remove most of the drawing code from RenderThemeMac and RenderThemeWin and
add accessors for the new .js and .css file data:

  • rendering/RenderTheme.h:

(WebCore::RenderTheme::mediaControlsStyleSheet): Empty virtual method.
(WebCore::RenderTheme::mediaControlsScript): Ditto.

  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::mediaControlsStyleSheet): Add accessor for mediaControlsApple.css.
(WebCore::RenderThemeMac::mediaControlsScript): Add accessor for mediaControlsApple.js.
(WebCore::RenderThemeMac::adjustSliderThumbSize): Remove the call to adjustMediaSliderThumbSize.

  • rendering/RenderThemeWin.cpp:

(WebCore::RenderThemeWin::mediaControlsStyleSheet):
(WebCore::RenderThemeWin::mediaControlsScript):

  • rendering/RenderThemeWin.h:

Source/WebKit/mac:

Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.

  • wtf/FeatureDefines.h:

LayoutTests:

Rebaseline changed tests and add new (failing) tests to
TestExpectations.

  • media/audio-delete-while-slider-thumb-clicked.html:
  • platform/mac/TestExpectations:
  • platform/mac/fast/hidpi/video-controls-in-hidpi-expected.png:
  • platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt:
  • platform/mac/fast/layers/video-layer-expected.png:
  • platform/mac/fast/layers/video-layer-expected.txt:
  • platform/mac/fullscreen/video-controls-override-expected.txt: Added.
  • platform/mac/media/audio-controls-rendering-expected.png:
  • platform/mac/media/audio-controls-rendering-expected.txt:
  • platform/mac/media/controls-after-reload-expected.png:
  • platform/mac/media/controls-after-reload-expected.txt:
  • platform/mac/media/controls-strict-expected.png:
  • platform/mac/media/controls-strict-expected.txt:
  • platform/mac/media/controls-styling-strict-expected.png:
  • platform/mac/media/controls-styling-strict-expected.txt:
  • platform/mac/media/controls-without-preload-expected.png:
  • platform/mac/media/controls-without-preload-expected.txt:
  • platform/mac/media/media-controls-clone-expected.png:
  • platform/mac/media/media-controls-clone-expected.txt:
  • webarchive/loading/video-in-webarchive-expected.txt:
Location:
trunk
Files:
8 added
2 deleted
45 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r156545 r156546  
     12013-09-27  Jer Noble  <jer.noble@apple.com>
     2
     3        [Mac] Implement the media controls in JavaScript.
     4        https://bugs.webkit.org/show_bug.cgi?id=120895
     5
     6        Reviewed by Dean Jackson.
     7
     8        Rebaseline changed tests and add new (failing) tests to
     9        TestExpectations.
     10
     11        * media/audio-delete-while-slider-thumb-clicked.html:
     12        * platform/mac/TestExpectations:
     13        * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.png:
     14        * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt:
     15        * platform/mac/fast/layers/video-layer-expected.png:
     16        * platform/mac/fast/layers/video-layer-expected.txt:
     17        * platform/mac/fullscreen/video-controls-override-expected.txt: Added.
     18        * platform/mac/media/audio-controls-rendering-expected.png:
     19        * platform/mac/media/audio-controls-rendering-expected.txt:
     20        * platform/mac/media/controls-after-reload-expected.png:
     21        * platform/mac/media/controls-after-reload-expected.txt:
     22        * platform/mac/media/controls-strict-expected.png:
     23        * platform/mac/media/controls-strict-expected.txt:
     24        * platform/mac/media/controls-styling-strict-expected.png:
     25        * platform/mac/media/controls-styling-strict-expected.txt:
     26        * platform/mac/media/controls-without-preload-expected.png:
     27        * platform/mac/media/controls-without-preload-expected.txt:
     28        * platform/mac/media/media-controls-clone-expected.png:
     29        * platform/mac/media/media-controls-clone-expected.txt:
     30        * webarchive/loading/video-in-webarchive-expected.txt:
     31
    1322013-09-27  Bem Jones-Bey  <bjonesbe@adobe.com>
    233
  • trunk/LayoutTests/media/audio-delete-while-slider-thumb-clicked.html

    r120416 r156546  
    2626                // click the button
    2727                var button = document.getElementById('button');
    28                 eventSender.mouseMoveTo(button.offsetLeft + 20, button.offsetTop + 7);
    29                 eventSender.mouseDown();
    30                 eventSender.mouseUp();
    3128
    32                 testRunner.notifyDone();
     29                if (window.eventSender) {
     30                    eventSender.mouseMoveTo(button.offsetLeft + 20, button.offsetTop + 7);
     31                    eventSender.mouseDown();
     32                    eventSender.mouseUp();
     33                }
     34
     35                if (window.testRunner)
     36                    testRunner.notifyDone();
    3337            }
    3438           
     
    7478                eventSender.mouseDown();
    7579                eventSender.mouseMoveTo(x, y + 20);
    76 
    77                 // Remove the element after seeking started
    78                 audio.addEventListener("seeking", deleteAudio);
    7980            }
    8081
     
    8384            {
    8485                setSrcByTagName("audio", findMediaFile("audio", "content/test"));
     86
     87                // Remove the element after seeking started
     88                audio.addEventListener("seeking", deleteAudio);
    8589            }
    8690
  • trunk/LayoutTests/platform/mac/TestExpectations

    r156519 r156546  
    13391339
    13401340webkit.org/b/121998 http/tests/inspector/network/network-iframe-load-and-delete.html [ Pass Failure ]
     1341
     1342webkit.org/b/121990 accessibility/media-element.html [ Failure ]
     1343webkit.org/b/121992 media/media-volume-slider-rendered-below.html [ Failure ]
     1344webkit.org/b/121992 media/media-volume-slider-rendered-normal.html [ Timeout Failure ]
     1345webkit.org/b/121995 media/video-controls-captions-trackmenu-hide-on-click-outside.html [ Timeout Failure ]
     1346webkit.org/b/121995 media/video-controls-captions-trackmenu-hide-on-click.html [ Timeout Failure ]
     1347webkit.org/b/121995 media/video-controls-captions-trackmenu-includes-enabled-track.html [ Timeout Failure ]
     1348
  • trunk/LayoutTests/platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt

    r149210 r156546  
    1515layer at (8,151) size 300x25
    1616  RenderFlexibleBox {DIV} at (0,125) size 300x25
    17     RenderButton {INPUT} at (6,3) size 18x18
    18     RenderButton {INPUT} at (32,4) size 16x16
    19     RenderBlock {DIV} at (49,12) size 0x0
     17layer at (14,155) size 16x16
     18  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     19layer at (40,156) size 16x16
     20  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     21layer at (57,159) size 197x9
     22  RenderFlexibleBox {DIV} at (49,8) size 197x9
     23layer at (59,159) size 193x9
     24  RenderFlexibleBox {DIV} at (2,0) size 193x9
     25layer at (254,153) size 22x22
     26  RenderFlexibleBox {DIV} at (246,2) size 22x22
     27layer at (257,156) size 16x16
     28  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
     29layer at (285,156) size 16x16
     30  RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF]
  • trunk/LayoutTests/platform/mac/fast/layers/video-layer-expected.txt

    r149210 r156546  
    2020layer at (59,236) size 300x25
    2121  RenderFlexibleBox {DIV} at (0,125) size 300x25
    22     RenderButton {INPUT} at (6,3) size 18x18
    23     RenderButton {INPUT} at (32,4) size 16x16
    24     RenderBlock {DIV} at (49,12) size 0x0
     22layer at (65,240) size 16x16
     23  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     24layer at (91,241) size 16x16
     25  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     26layer at (108,244) size 197x9
     27  RenderFlexibleBox {DIV} at (49,8) size 197x9
     28layer at (110,244) size 193x9
     29  RenderFlexibleBox {DIV} at (2,0) size 193x9
     30layer at (305,238) size 22x22
     31  RenderFlexibleBox {DIV} at (246,2) size 22x22
     32layer at (308,241) size 16x16
     33  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
     34layer at (336,241) size 16x16
     35  RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF]
  • trunk/LayoutTests/platform/mac/media/audio-controls-rendering-expected.txt

    r149210 r156546  
    1919layer at (8,42) size 200x25
    2020  RenderFlexibleBox {DIV} at (0,0) size 200x25
    21     RenderButton {INPUT} at (6,3) size 18x18
    22     RenderButton {INPUT} at (32,4) size 16x16
    23     RenderFlexibleBox {DIV} at (49,5) size 126x15
    24       RenderSlider {INPUT} at (0,2) size 126x13
    25         RenderFlexibleBox {DIV} at (0,0) size 126x13
    26           RenderBlock {DIV} at (0,2) size 126x8
    27             RenderBlock {DIV} at (0,0) size 10x8
    28     RenderBlock {DIV} at (175,6) size 25x12
    29 layer at (185,48) size 14x12
    30   RenderButton zI: 1 {INPUT} at (2,0) size 14x12
     21layer at (14,46) size 16x16
     22  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     23layer at (40,47) size 16x16
     24  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     25layer at (57,49) size 127x11
     26  RenderFlexibleBox {DIV} at (49,7) size 127x11
     27layer at (57,49) size 45x11
     28  RenderFlexibleBox {DIV} at (0,0) size 45x11 [color=#FFFFFF]
     29    RenderBlock (anonymous) at (9,0) size 26x11
     30      RenderText {#text} at (0,0) size 26x11
     31        text run at (0,0) width 26: "00:00"
     32layer at (139,49) size 45x11
     33  RenderFlexibleBox {DIV} at (82,0) size 45x11 [color=#FFFFFF]
     34    RenderBlock (anonymous) at (7,0) size 31x11
     35      RenderText {#text} at (0,0) size 31x11
     36        text run at (0,0) width 31: "-00:07"
     37layer at (104,50) size 33x9
     38  RenderFlexibleBox {DIV} at (47,1) size 33x9
     39    RenderSlider {INPUT} at (0,0) size 33x9 [color=#909090] [bgcolor=#000000]
     40      RenderFlexibleBox {DIV} at (0,0) size 33x9
     41        RenderBlock {DIV} at (0,1) size 33x6
     42layer at (104,51) size 6x6
     43  RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
     44layer at (184,44) size 22x22
     45  RenderFlexibleBox {DIV} at (176,2) size 22x22
     46layer at (187,47) size 16x16
     47  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
    3148layer at (8,85) size 320x25
    3249  RenderFlexibleBox {DIV} at (0,0) size 320x25
    3350layer at (8,85) size 320x25
    3451  RenderFlexibleBox {DIV} at (0,0) size 320x25
    35     RenderButton {INPUT} at (6,3) size 18x18
    36     RenderButton {INPUT} at (32,4) size 16x16
    37     RenderFlexibleBox {DIV} at (49,5) size 246x15
    38       RenderSlider {INPUT} at (45,2) size 156x13
    39         RenderFlexibleBox {DIV} at (0,0) size 156x13
    40           RenderBlock {DIV} at (0,2) size 156x8
    41             RenderBlock {DIV} at (0,0) size 10x8
    42     RenderBlock {DIV} at (295,6) size 25x12
     52layer at (14,89) size 16x16
     53  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     54layer at (40,90) size 16x16
     55  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     56layer at (57,92) size 247x11
     57  RenderFlexibleBox {DIV} at (49,7) size 247x11
    4358layer at (57,92) size 45x11
    44   RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF]
     59  RenderFlexibleBox {DIV} at (0,0) size 45x11 [color=#FFFFFF]
    4560    RenderBlock (anonymous) at (9,0) size 26x11
    4661      RenderText {#text} at (0,0) size 26x11
    4762        text run at (0,0) width 26: "00:00"
    48 layer at (258,92) size 45x11
    49   RenderFlexibleBox {DIV} at (201,2) size 45x11 [color=#FFFFFF]
     63layer at (259,92) size 45x11
     64  RenderFlexibleBox {DIV} at (202,0) size 45x11 [color=#FFFFFF]
    5065    RenderBlock (anonymous) at (7,0) size 31x11
    5166      RenderText {#text} at (0,0) size 31x11
    5267        text run at (0,0) width 31: "-00:07"
    53 layer at (305,91) size 14x12
    54   RenderButton zI: 1 {INPUT} at (2,0) size 14x12
     68layer at (104,93) size 153x9
     69  RenderFlexibleBox {DIV} at (47,1) size 153x9
     70    RenderSlider {INPUT} at (0,0) size 153x9 [color=#909090] [bgcolor=#000000]
     71      RenderFlexibleBox {DIV} at (0,0) size 153x9
     72        RenderBlock {DIV} at (0,1) size 153x6
     73layer at (104,94) size 6x6
     74  RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
     75layer at (304,87) size 22x22
     76  RenderFlexibleBox {DIV} at (296,2) size 22x22
     77layer at (307,90) size 16x16
     78  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
    5579layer at (8,128) size 320x100
    5680  RenderMedia {AUDIO} at (8,128) size 320x100 [bgcolor=#0000FF]
     
    5983layer at (8,203) size 320x25
    6084  RenderFlexibleBox {DIV} at (0,75) size 320x25
    61     RenderButton {INPUT} at (6,3) size 18x18
    62     RenderButton {INPUT} at (32,4) size 16x16
    63     RenderFlexibleBox {DIV} at (49,5) size 246x15
    64       RenderSlider {INPUT} at (45,2) size 156x13
    65         RenderFlexibleBox {DIV} at (0,0) size 156x13
    66           RenderBlock {DIV} at (0,2) size 156x8
    67             RenderBlock {DIV} at (0,0) size 10x8
    68     RenderBlock {DIV} at (295,6) size 25x12
     85layer at (14,207) size 16x16
     86  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     87layer at (40,208) size 16x16
     88  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     89layer at (57,210) size 247x11
     90  RenderFlexibleBox {DIV} at (49,7) size 247x11
    6991layer at (57,210) size 45x11
    70   RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF]
     92  RenderFlexibleBox {DIV} at (0,0) size 45x11 [color=#FFFFFF]
    7193    RenderBlock (anonymous) at (9,0) size 26x11
    7294      RenderText {#text} at (0,0) size 26x11
    7395        text run at (0,0) width 26: "00:00"
    74 layer at (258,210) size 45x11
    75   RenderFlexibleBox {DIV} at (201,2) size 45x11 [color=#FFFFFF]
     96layer at (259,210) size 45x11
     97  RenderFlexibleBox {DIV} at (202,0) size 45x11 [color=#FFFFFF]
    7698    RenderBlock (anonymous) at (7,0) size 31x11
    7799      RenderText {#text} at (0,0) size 31x11
    78100        text run at (0,0) width 31: "-00:07"
    79 layer at (305,209) size 14x12
    80   RenderButton zI: 1 {INPUT} at (2,0) size 14x12
     101layer at (104,211) size 153x9
     102  RenderFlexibleBox {DIV} at (47,1) size 153x9
     103    RenderSlider {INPUT} at (0,0) size 153x9 [color=#909090] [bgcolor=#000000]
     104      RenderFlexibleBox {DIV} at (0,0) size 153x9
     105        RenderBlock {DIV} at (0,1) size 153x6
     106layer at (104,212) size 6x6
     107  RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
     108layer at (304,205) size 22x22
     109  RenderFlexibleBox {DIV} at (296,2) size 22x22
     110layer at (307,208) size 16x16
     111  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
  • trunk/LayoutTests/platform/mac/media/controls-after-reload-expected.txt

    r149210 r156546  
    1515layer at (8,257) size 320x25
    1616  RenderFlexibleBox {DIV} at (0,215) size 320x25
    17     RenderButton {INPUT} at (6,3) size 18x18
    18     RenderButton {INPUT} at (32,4) size 16x16
    19     RenderFlexibleBox {DIV} at (49,5) size 216x15
    20       RenderSlider {INPUT} at (45,2) size 126x13
    21         RenderFlexibleBox {DIV} at (0,0) size 126x13
    22           RenderBlock {DIV} at (0,2) size 126x8
    23             RenderBlock {DIV} at (0,0) size 10x8
    24     RenderButton {INPUT} at (297,4) size 16x16
    25     RenderBlock {DIV} at (265,6) size 25x12
     17layer at (14,261) size 16x16
     18  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     19layer at (40,262) size 16x16
     20  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     21layer at (57,264) size 217x11
     22  RenderFlexibleBox {DIV} at (49,7) size 217x11
    2623layer at (57,264) size 45x11
    27   RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF]
     24  RenderFlexibleBox {DIV} at (0,0) size 45x11 [color=#FFFFFF]
    2825    RenderBlock (anonymous) at (9,0) size 26x11
    2926      RenderText {#text} at (0,0) size 26x11
    3027        text run at (0,0) width 26: "00:00"
    31 layer at (228,264) size 45x11
    32   RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF]
     28layer at (229,264) size 45x11
     29  RenderFlexibleBox {DIV} at (172,0) size 45x11 [color=#FFFFFF]
    3330    RenderBlock (anonymous) at (7,0) size 31x11
    3431      RenderText {#text} at (0,0) size 31x11
    3532        text run at (0,0) width 31: "-00:06"
    36 layer at (275,263) size 14x12
    37   RenderButton zI: 1 {INPUT} at (2,0) size 14x12
     33layer at (104,265) size 123x9
     34  RenderFlexibleBox {DIV} at (47,1) size 123x9
     35    RenderSlider {INPUT} at (0,0) size 123x9 [color=#909090] [bgcolor=#000000]
     36      RenderFlexibleBox {DIV} at (0,0) size 123x9
     37        RenderBlock {DIV} at (0,1) size 123x6
     38layer at (104,266) size 6x6
     39  RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
     40layer at (274,259) size 22x22
     41  RenderFlexibleBox {DIV} at (266,2) size 22x22
     42layer at (277,262) size 16x16
     43  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
     44layer at (305,262) size 16x16
     45  RenderButton {BUTTON} at (297,5) size 16x16 [color=#FFFFFF]
  • trunk/LayoutTests/platform/mac/media/controls-strict-expected.txt

    r149210 r156546  
    1515layer at (8,265) size 320x25
    1616  RenderFlexibleBox {DIV} at (0,215) size 320x25
    17     RenderButton {INPUT} at (6,3) size 18x18
    18     RenderButton {INPUT} at (32,4) size 16x16
    19     RenderFlexibleBox {DIV} at (49,5) size 216x15
    20       RenderSlider {INPUT} at (45,2) size 126x13
    21         RenderFlexibleBox {DIV} at (0,0) size 126x13
    22           RenderBlock {DIV} at (0,2) size 126x8
    23             RenderBlock {DIV} at (0,0) size 10x8
    24     RenderButton {INPUT} at (297,4) size 16x16
    25     RenderBlock {DIV} at (265,6) size 25x12
     17layer at (14,269) size 16x16
     18  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     19layer at (40,270) size 16x16
     20  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     21layer at (57,272) size 217x11
     22  RenderFlexibleBox {DIV} at (49,7) size 217x11
    2623layer at (57,272) size 45x11
    27   RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF]
     24  RenderFlexibleBox {DIV} at (0,0) size 45x11 [color=#FFFFFF]
    2825    RenderBlock (anonymous) at (9,0) size 26x11
    2926      RenderText {#text} at (0,0) size 26x11
    3027        text run at (0,0) width 26: "00:00"
    31 layer at (228,272) size 45x11
    32   RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF]
     28layer at (229,272) size 45x11
     29  RenderFlexibleBox {DIV} at (172,0) size 45x11 [color=#FFFFFF]
    3330    RenderBlock (anonymous) at (7,0) size 31x11
    3431      RenderText {#text} at (0,0) size 31x11
    3532        text run at (0,0) width 31: "-00:06"
    36 layer at (275,271) size 14x12
    37   RenderButton zI: 1 {INPUT} at (2,0) size 14x12
     33layer at (104,273) size 123x9
     34  RenderFlexibleBox {DIV} at (47,1) size 123x9
     35    RenderSlider {INPUT} at (0,0) size 123x9 [color=#909090] [bgcolor=#000000]
     36      RenderFlexibleBox {DIV} at (0,0) size 123x9
     37        RenderBlock {DIV} at (0,1) size 123x6
     38layer at (104,274) size 6x6
     39  RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
     40layer at (274,267) size 22x22
     41  RenderFlexibleBox {DIV} at (266,2) size 22x22
     42layer at (277,270) size 16x16
     43  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
     44layer at (305,270) size 16x16
     45  RenderButton {BUTTON} at (297,5) size 16x16 [color=#FFFFFF]
  • trunk/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt

    r149210 r156546  
    1919layer at (8,265) size 320x25
    2020  RenderFlexibleBox {DIV} at (0,215) size 320x25
    21     RenderButton {INPUT} at (6,3) size 18x18
    22     RenderButton {INPUT} at (32,4) size 16x16
    23     RenderFlexibleBox {DIV} at (49,5) size 216x15
    24       RenderSlider {INPUT} at (45,2) size 126x13
    25         RenderFlexibleBox {DIV} at (0,0) size 126x13
    26           RenderBlock {DIV} at (0,2) size 126x8
    27             RenderBlock {DIV} at (0,0) size 10x8
    28     RenderButton {INPUT} at (297,4) size 16x16
    29     RenderBlock {DIV} at (265,6) size 25x12
     21layer at (14,269) size 16x16
     22  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     23layer at (40,270) size 16x16
     24  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     25layer at (57,272) size 217x11
     26  RenderFlexibleBox {DIV} at (49,7) size 217x11
    3027layer at (57,272) size 45x11
    31   RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF]
     28  RenderFlexibleBox {DIV} at (0,0) size 45x11 [color=#FFFFFF]
    3229    RenderBlock (anonymous) at (9,0) size 26x11
    3330      RenderText {#text} at (0,0) size 26x11
    3431        text run at (0,0) width 26: "00:00"
    35 layer at (228,272) size 45x11
    36   RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF]
     32layer at (229,272) size 45x11
     33  RenderFlexibleBox {DIV} at (172,0) size 45x11 [color=#FFFFFF]
    3734    RenderBlock (anonymous) at (7,0) size 31x11
    3835      RenderText {#text} at (0,0) size 31x11
    3936        text run at (0,0) width 31: "-00:06"
    40 layer at (275,271) size 14x12
    41   RenderButton zI: 1 {INPUT} at (2,0) size 14x12
     37layer at (104,273) size 123x9
     38  RenderFlexibleBox {DIV} at (47,1) size 123x9
     39    RenderSlider {INPUT} at (0,0) size 123x9 [color=#909090] [bgcolor=#000000]
     40      RenderFlexibleBox {DIV} at (0,0) size 123x9
     41        RenderBlock {DIV} at (0,1) size 123x6
     42layer at (104,274) size 6x6
     43  RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
     44layer at (274,267) size 22x22
     45  RenderFlexibleBox {DIV} at (266,2) size 22x22
     46layer at (277,270) size 16x16
     47  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
     48layer at (305,270) size 16x16
     49  RenderButton {BUTTON} at (297,5) size 16x16 [color=#FFFFFF]
    4250layer at (332,50) size 320x240
    4351  RenderFlexibleBox {DIV} at (0,0) size 320x240
    4452layer at (332,265) size 320x25
    4553  RenderFlexibleBox {DIV} at (0,215) size 320x25
    46     RenderButton {INPUT} at (6,3) size 18x18
    47     RenderButton {INPUT} at (32,4) size 16x16
    48     RenderFlexibleBox {DIV} at (49,5) size 216x15
    49       RenderSlider {INPUT} at (45,2) size 126x13
    50         RenderFlexibleBox {DIV} at (0,0) size 126x13
    51           RenderBlock {DIV} at (0,2) size 126x8
    52             RenderBlock {DIV} at (0,0) size 10x8
    53     RenderButton {INPUT} at (297,4) size 16x16
    54     RenderBlock {DIV} at (265,6) size 25x12
     54layer at (338,269) size 16x16
     55  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     56layer at (364,270) size 16x16
     57  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     58layer at (381,272) size 217x11
     59  RenderFlexibleBox {DIV} at (49,7) size 217x11
    5560layer at (381,272) size 45x11
    56   RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF]
     61  RenderFlexibleBox {DIV} at (0,0) size 45x11 [color=#FFFFFF]
    5762    RenderBlock (anonymous) at (9,0) size 26x11
    5863      RenderText {#text} at (0,0) size 26x11
    5964        text run at (0,0) width 26: "00:00"
    60 layer at (552,272) size 45x11
    61   RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF]
     65layer at (553,272) size 45x11
     66  RenderFlexibleBox {DIV} at (172,0) size 45x11 [color=#FFFFFF]
    6267    RenderBlock (anonymous) at (7,0) size 31x11
    6368      RenderText {#text} at (0,0) size 31x11
    6469        text run at (0,0) width 31: "-00:06"
    65 layer at (599,271) size 14x12
    66   RenderButton zI: 1 {INPUT} at (2,0) size 14x12
     70layer at (428,273) size 123x9
     71  RenderFlexibleBox {DIV} at (47,1) size 123x9
     72    RenderSlider {INPUT} at (0,0) size 123x9 [color=#909090] [bgcolor=#000000]
     73      RenderFlexibleBox {DIV} at (0,0) size 123x9
     74        RenderBlock {DIV} at (0,1) size 123x6
     75layer at (428,274) size 6x6
     76  RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
     77layer at (598,267) size 22x22
     78  RenderFlexibleBox {DIV} at (266,2) size 22x22
     79layer at (601,270) size 16x16
     80  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
     81layer at (629,270) size 16x16
     82  RenderButton {BUTTON} at (297,5) size 16x16 [color=#FFFFFF]
  • trunk/LayoutTests/platform/mac/media/controls-without-preload-expected.txt

    r149210 r156546  
    1515layer at (8,257) size 320x25
    1616  RenderFlexibleBox {DIV} at (0,215) size 320x25
    17     RenderButton {INPUT} at (6,3) size 18x18
    18     RenderButton {INPUT} at (32,4) size 16x16
    19     RenderFlexibleBox {DIV} at (49,5) size 216x15
    20       RenderSlider {INPUT} at (45,2) size 126x13
    21         RenderFlexibleBox {DIV} at (0,0) size 126x13
    22           RenderBlock {DIV} at (0,2) size 126x8
    23             RenderBlock {DIV} at (0,0) size 10x8
    24     RenderButton {INPUT} at (297,4) size 16x16
    25     RenderBlock {DIV} at (265,6) size 25x12
     17layer at (14,261) size 16x16
     18  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     19layer at (40,262) size 16x16
     20  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     21layer at (57,264) size 217x11
     22  RenderFlexibleBox {DIV} at (49,7) size 217x11
    2623layer at (57,264) size 45x11
    27   RenderFlexibleBox {DIV} at (0,2) size 45x11 [color=#FFFFFF]
     24  RenderFlexibleBox {DIV} at (0,0) size 45x11 [color=#FFFFFF]
    2825    RenderBlock (anonymous) at (9,0) size 26x11
    2926      RenderText {#text} at (0,0) size 26x11
    3027        text run at (0,0) width 26: "00:00"
    31 layer at (228,264) size 45x11
    32   RenderFlexibleBox {DIV} at (171,2) size 45x11 [color=#FFFFFF]
     28layer at (229,264) size 45x11
     29  RenderFlexibleBox {DIV} at (172,0) size 45x11 [color=#FFFFFF]
    3330    RenderBlock (anonymous) at (7,0) size 31x11
    3431      RenderText {#text} at (0,0) size 31x11
    3532        text run at (0,0) width 31: "-00:06"
    36 layer at (275,263) size 14x12
    37   RenderButton zI: 1 {INPUT} at (2,0) size 14x12
     33layer at (104,265) size 123x9
     34  RenderFlexibleBox {DIV} at (47,1) size 123x9
     35    RenderSlider {INPUT} at (0,0) size 123x9 [color=#909090] [bgcolor=#000000]
     36      RenderFlexibleBox {DIV} at (0,0) size 123x9
     37        RenderBlock {DIV} at (0,1) size 123x6
     38layer at (104,266) size 6x6
     39  RenderBlock {DIV} at (0,0) size 6x6 [bgcolor=#FFFFFF]
     40layer at (274,259) size 22x22
     41  RenderFlexibleBox {DIV} at (266,2) size 22x22
     42layer at (277,262) size 16x16
     43  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
     44layer at (305,262) size 16x16
     45  RenderButton {BUTTON} at (297,5) size 16x16 [color=#FFFFFF]
  • trunk/LayoutTests/platform/mac/media/media-controls-clone-expected.txt

    r149210 r156546  
    1616layer at (8,133) size 300x25
    1717  RenderFlexibleBox {DIV} at (0,125) size 300x25
    18     RenderButton {INPUT} at (6,3) size 18x18
    19     RenderButton {INPUT} at (32,4) size 16x16
    20     RenderBlock {DIV} at (49,12) size 0x0
     18layer at (14,137) size 16x16
     19  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     20layer at (40,138) size 16x16
     21  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     22layer at (57,141) size 197x9
     23  RenderFlexibleBox {DIV} at (49,8) size 197x9
     24layer at (59,141) size 193x9
     25  RenderFlexibleBox {DIV} at (2,0) size 193x9
     26layer at (254,135) size 22x22
     27  RenderFlexibleBox {DIV} at (246,2) size 22x22
     28layer at (257,138) size 16x16
     29  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
     30layer at (285,138) size 16x16
     31  RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF]
    2132layer at (308,133) size 200x25
    2233  RenderFlexibleBox {DIV} at (0,0) size 200x25
    2334layer at (308,133) size 200x25
    2435  RenderFlexibleBox {DIV} at (0,0) size 200x25
    25     RenderButton {INPUT} at (6,3) size 18x18
    26     RenderButton {INPUT} at (32,4) size 16x16
    27     RenderBlock {DIV} at (49,12) size 0x0
     36layer at (314,137) size 16x16
     37  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     38layer at (340,138) size 16x16
     39  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     40layer at (357,141) size 127x9
     41  RenderFlexibleBox {DIV} at (49,8) size 127x9
     42layer at (359,141) size 123x9
     43  RenderFlexibleBox {DIV} at (2,0) size 123x9
     44layer at (484,135) size 22x22
     45  RenderFlexibleBox {DIV} at (176,2) size 22x22
     46layer at (487,138) size 16x16
     47  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
    2848layer at (8,162) size 300x150
    2949  RenderFlexibleBox {DIV} at (0,0) size 300x150
    3050layer at (8,287) size 300x25
    3151  RenderFlexibleBox {DIV} at (0,125) size 300x25
    32     RenderButton {INPUT} at (6,3) size 18x18
    33     RenderButton {INPUT} at (32,4) size 16x16
    34     RenderBlock {DIV} at (49,12) size 0x0
     52layer at (14,291) size 16x16
     53  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     54layer at (40,292) size 16x16
     55  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     56layer at (57,295) size 197x9
     57  RenderFlexibleBox {DIV} at (49,8) size 197x9
     58layer at (59,295) size 193x9
     59  RenderFlexibleBox {DIV} at (2,0) size 193x9
     60layer at (254,289) size 22x22
     61  RenderFlexibleBox {DIV} at (246,2) size 22x22
     62layer at (257,292) size 16x16
     63  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
     64layer at (285,292) size 16x16
     65  RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF]
    3566layer at (308,287) size 200x25
    3667  RenderFlexibleBox {DIV} at (0,0) size 200x25
    3768layer at (308,287) size 200x25
    3869  RenderFlexibleBox {DIV} at (0,0) size 200x25
    39     RenderButton {INPUT} at (6,3) size 18x18
    40     RenderButton {INPUT} at (32,4) size 16x16
    41     RenderBlock {DIV} at (49,12) size 0x0
     70layer at (314,291) size 16x16
     71  RenderButton {BUTTON} at (6,4) size 16x16 [color=#FFFFFF]
     72layer at (340,292) size 16x16
     73  RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF]
     74layer at (357,295) size 127x9
     75  RenderFlexibleBox {DIV} at (49,8) size 127x9
     76layer at (359,295) size 123x9
     77  RenderFlexibleBox {DIV} at (2,0) size 123x9
     78layer at (484,289) size 22x22
     79  RenderFlexibleBox {DIV} at (176,2) size 22x22
     80layer at (487,292) size 16x16
     81  RenderButton {BUTTON} at (3,3) size 16x16 [color=#FFFFFF]
  • trunk/Source/JavaScriptCore/ChangeLog

    r156540 r156546  
     12013-09-06  Jer Noble  <jer.noble@apple.com>
     2
     3        [Mac] Implement the media controls in JavaScript.
     4        https://bugs.webkit.org/show_bug.cgi?id=120895
     5
     6        Reviewed by Dean Jackson.
     7
     8        Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
     9
     10        * Configurations/FeatureDefines.xcconfig:
     11
    1122013-09-27  Andreas Kling  <akling@apple.com>
    213
  • trunk/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig

    r156447 r156546  
    130130ENABLE_LINK_PREFETCH = ;
    131131ENABLE_MATHML = ENABLE_MATHML;
     132ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
    132133ENABLE_MEDIA_SOURCE = ;
    133134ENABLE_MEDIA_STATISTICS = ;
     
    188189ENABLE_FTL_JIT = ;
    189190
    190 FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_THREADED_HTML_PARSER) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
     191FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_THREADED_HTML_PARSER) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
  • trunk/Source/WTF/ChangeLog

    r156529 r156546  
     12013-09-06  Jer Noble  <jer.noble@apple.com>
     2
     3        [Mac] Implement the media controls in JavaScript.
     4        https://bugs.webkit.org/show_bug.cgi?id=120895
     5
     6        Reviewed by Dean Jackson.
     7
     8        Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
     9
     10        * wtf/FeatureDefines.h:
     11
    1122013-09-27  Gustavo Noronha Silva  <gns@gnome.org>
    213
  • trunk/Source/WTF/wtf/FeatureDefines.h

    r155496 r156546  
    617617#endif
    618618
     619#if !defined(ENABLE_MEDIA_CONTROLS_SCRIPT)
     620#define ENABLE_MEDIA_CONTROLS_SCRIPT 0
     621#endif
     622
    619623#if !defined(ENABLE_MEDIA_SOURCE)
    620624#define ENABLE_MEDIA_SOURCE 0
  • trunk/Source/WebCore/ChangeLog

    r156545 r156546  
     12013-09-06  Jer Noble  <jer.noble@apple.com>
     2
     3        [Mac] Implement the media controls in JavaScript.
     4        https://bugs.webkit.org/show_bug.cgi?id=120895
     5
     6        Reviewed by Dean Jackson.
     7
     8        Re-implement the existing MediaControls constellation of classes in JavaScript
     9        and CSS. This will allow different ports to configure their controls without
     10        dependencies on the layout requirements of any other port's controls.
     11
     12        Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT:
     13        * Configurations/FeatureDefines.xcconfig:
     14
     15        Add new source files to the project:
     16        * DerivedSources.cpp:
     17        * DerivedSources.make:
     18        * WebCore.vcxproj/WebCore.vcxproj:
     19        * WebCore.vcxproj/WebCore.vcxproj.filters:
     20        * WebCore.xcodeproj/project.pbxproj:
     21
     22        Add a new class MediaControlsHost which the script controls can use to
     23        communicate with the HTMLMediaElement without exposing private interfaces
     24        to web facing scripts:
     25        * Modules/mediacontrols/MediaControlsHost.cpp: Added.
     26        (WebCore::MediaControlsHost::automaticKeyword): Static method.
     27        (WebCore::MediaControlsHost::forcedOnlyKeyword): Ditto.
     28        (WebCore::MediaControlsHost::alwaysOnKeyword): Ditto.
     29        (WebCore::MediaControlsHost::create): Simple factory.
     30        (WebCore::MediaControlsHost::MediaControlsHost): Simple constructor.
     31        (WebCore::MediaControlsHost::~MediaControlsHost): Simple destructor.
     32        (WebCore::MediaControlsHost::sortedTrackListForMenu): Pass through to CaptionUserPreferences.
     33        (WebCore::MediaControlsHost::displayNameForTrack): Ditto.
     34        (WebCore::MediaControlsHost::captionMenuOffItem): Pass through to TextTrack.
     35        (WebCore::MediaControlsHost::captionMenuAutomaticItem): Ditto.
     36        (WebCore::MediaControlsHost::captionDisplayMode): Pass through to CaptionUserPreferences.
     37        (WebCore::MediaControlsHost::setSelectedTextTrack): Pass through to HTMLMediaElement.
     38        (WebCore::MediaControlsHost::textTrackContainer): Lazily create a MediaControlTextTrackContainerElement.
     39        (WebCore::MediaControlsHost::updateTextTrackContainer): Pass through to MediaControlTextTrackContainerElement.
     40        * Modules/mediacontrols/MediaControlsHost.h: Added.
     41        * Modules/mediacontrols/MediaControlsHost.idl: Added.
     42        * Modules/mediacontrols/mediaControlsApple.css: Added.
     43
     44        Add convenience methods for adding a MediaControlsHost to a VM.
     45        * bindings/js/ScriptObject.cpp:
     46        (WebCore::ScriptGlobalObject::set):
     47        * bindings/js/ScriptObject.h:
     48
     49        Add the new controller .js implementation:
     50        * Modules/mediacontrols/mediaControlsApple.js: Added.
     51        (createControls): Global method to create a new Controller object.
     52        (Controller): Constructor. Create and configure the default set of controls.
     53        (Controller.prototype.addListeners): Adds event listeners to the this.video object.
     54        (Controller.prototype.removeListeners): Removes listeners from same.
     55        (Controller.prototype.handleEvent): Makes Controller an EventHandler, making registration and
     56                deregistration simpler.
     57        (Controller.prototype.createBase): Creates the base controls object and the text track container.
     58        (Controller.prototype.createControls): Creates the controls panel object and controller UI.
     59        (Controller.prototype.setControlsType): Switches between Full Screen and Inline style of controller.
     60        (Controller.prototype.disconnectControls): Disconnects all UI elements from the DOM.
     61        (Controller.prototype.configureInlineControls): Configures existing controls for Inline mode.
     62        (Controller.prototype.configureFullScreenControls): Ditto, for Full Screen Mode.
     63
     64        Add listeners for HTMLMediaElement events:
     65        (Controller.prototype.onloadstart): Update the status display.
     66        (Controller.prototype.onerror): Ditto.
     67        (Controller.prototype.onabort): Ditto.
     68        (Controller.prototype.onsuspend): Ditto.
     69        (Controller.prototype.onprogress): Ditto.
     70        (Controller.prototype.onstalled): Ditto.
     71        (Controller.prototype.onwaiting): Ditto.
     72        (Controller.prototype.onreadystatechange): Ditto.
     73        (Controller.prototype.ontimeupdate): Update the timeline and time displays.
     74        (Controller.prototype.ondurationchange): Ditto.
     75        (Controller.prototype.onplaying): Update the play button.
     76        (Controller.prototype.onplay): Ditto.
     77        (Controller.prototype.onpause): Ditto.
     78        (Controller.prototype.onratechange): Ditto.
     79        (Controller.prototype.onvolumechange): Update the volume and mute UI.
     80        (Controller.prototype.ontexttrackchange): Update the text track container and captions button.
     81        (Controller.prototype.ontexttrackadd): Ditto.
     82        (Controller.prototype.ontexttrackremove): Ditto.
     83        (Controller.prototype.ontexttrackcuechange): Ditto.
     84        (Controller.prototype.onfullscreenchange): Reconfigure the controls.
     85
     86        Add listeners for UI element events:
     87        (Controller.prototype.onwrappermousemove): Show the controls and start the hide timer.
     88        (Controller.prototype.onwrappermouseout): Hide the controls and stop the hide timer.
     89        (Controller.prototype.onrewindbuttonclicked): Rewind.
     90        (Controller.prototype.onplaybuttonclicked): Toggle pause.
     91        (Controller.prototype.ontimelinechange): Update the currentTime.
     92        (Controller.prototype.ontimelinedown):
     93        (Controller.prototype.ontimelineup):
     94        (Controller.prototype.ontimelinemouseover): Show the thumbnail view if available.
     95        (Controller.prototype.ontimelinemouseout): Hide same.
     96        (Controller.prototype.ontimelinemousemove): Move the thumbnail view.
     97        (Controller.prototype.onmutebuttonclicked): Mute audio.
     98        (Controller.prototype.onminbuttonclicked): Increase volume to max.
     99        (Controller.prototype.onmaxbuttonclicked): Decrease volume to min.
     100        (Controller.prototype.onvolumesliderchange): Update the current volume.
     101        (Controller.prototype.oncaptionbuttonclicked): Show or hide the track menu.
     102        (Controller.prototype.onfullscreenbuttonclicked): Enter or exit fullscreen.
     103        (Controller.prototype.oncontrolschange): Show or hide the controls panel.
     104        (Controller.prototype.onseekbackmousedown): Start seeking and enable the seek timer.
     105        (Controller.prototype.onseekbackmouseup): Stop seeking and disable the seek timer.
     106        (Controller.prototype.onseekforwardmousedown): Start seekind and enable the seek timer.
     107        (Controller.prototype.onseekforwardmouseup): Stop seekind and disable the seek timer.
     108
     109        Add action methods (which are mostly self explanatory):
     110        (Controller.prototype.updateDuration):
     111        (Controller.prototype.updatePlaying):
     112        (Controller.prototype.showControls):
     113        (Controller.prototype.hideControls):
     114        (Controller.prototype.removeControls):
     115        (Controller.prototype.addControls):
     116        (Controller.prototype.updateTime):
     117        (Controller.prototype.updateReadyState):
     118        (Controller.prototype.setStatusHidden):       
     119        (Controller.prototype.updateThumbnailTrack):
     120        (Controller.prototype.updateCaptionButton):
     121        (Controller.prototype.updateCaptionContainer):
     122        (Controller.prototype.buildCaptionMenu):
     123        (Controller.prototype.captionItemSelected):
     124        (Controller.prototype.destroyCaptionMenu):
     125        (Controller.prototype.updateVolume):
     126
     127        Add utility methods:
     128        (Controller.prototype.isFullScreen):
     129        (Controller.prototype.canPlay):
     130        (Controller.prototype.nextRate):
     131        (Controller.prototype.seekBackFaster):
     132        (Controller.prototype.seekForwardFaster):
     133        (Controller.prototype.formatTime):
     134        (Controller.prototype.trackHasThumbnails):
     135
     136        Add the stylesheet for the javascript controls (which are mostly) copied from
     137        the (deleted) mediaControlsQuickTime.css and fullscreenQuickTime.css files:
     138        * Modules/mediacontrols/mediaControlsApple.css: Added.
     139        * css/fullscreenQuickTime.css: Removed.
     140        * css/mediaControlsQuickTime.css: Removed.
     141
     142        Inject new stylesheets into UA sheets:
     143        * css/CSSDefaultStyleSheets.cpp:
     144        (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
     145
     146        Use the new javascript controls rather than MediaControls:
     147        * html/HTMLMediaElement.cpp:
     148        (WebCore::HTMLMediaElement::childShouldCreateRenderer): Use the javascript controls if available.
     149        (WebCore::HTMLMediaElement::updateTextTrackDisplay): Ditto.
     150        (WebCore::HTMLMediaElement::mediaControls): Ditto.
     151        (WebCore::HTMLMediaElement::hasMediaControls): Ditto.
     152        (WebCore::HTMLMediaElement::createMediaControls): Ditto.
     153        (WebCore::HTMLMediaElement::configureMediaControls): Ditto.
     154        (WebCore::HTMLMediaElement::configureTextTrackDisplay): Ditto.
     155        (WebCore::HTMLMediaElement::ensureIsolatedWorld): Create a new VM for the controls script.
     156        (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): Inject the media controls script into the VM.
     157        (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Inject the MediaControlsHost into the VM and call
     158                the scripts global factory function.
     159        * html/HTMLMediaElement.h:
     160
     161        Remove most of the drawing code from RenderThemeMac and RenderThemeWin and
     162        add accessors for the new .js and .css file data:
     163        * rendering/RenderTheme.h:
     164        (WebCore::RenderTheme::mediaControlsStyleSheet): Empty virtual method.
     165        (WebCore::RenderTheme::mediaControlsScript): Ditto.
     166        * rendering/RenderThemeMac.h:
     167        * rendering/RenderThemeMac.mm:
     168        (WebCore::RenderThemeMac::mediaControlsStyleSheet): Add accessor for mediaControlsApple.css.
     169        (WebCore::RenderThemeMac::mediaControlsScript): Add accessor for mediaControlsApple.js.
     170        (WebCore::RenderThemeMac::adjustSliderThumbSize): Remove the call to adjustMediaSliderThumbSize.
     171        * rendering/RenderThemeWin.cpp:
     172        (WebCore::RenderThemeWin::mediaControlsStyleSheet):
     173        (WebCore::RenderThemeWin::mediaControlsScript):
     174        * rendering/RenderThemeWin.h:
     175
    11762013-09-27  Bem Jones-Bey  <bjonesbe@adobe.com>
    2177
  • trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig

    r156447 r156546  
    130130ENABLE_LINK_PREFETCH = ;
    131131ENABLE_MATHML = ENABLE_MATHML;
     132ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
    132133ENABLE_MEDIA_SOURCE = ;
    133134ENABLE_MEDIA_STATISTICS = ;
     
    188189ENABLE_FTL_JIT = ;
    189190
    190 FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_THREADED_HTML_PARSER) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
     191FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_THREADED_HTML_PARSER) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
  • trunk/Source/WebCore/DerivedSources.cpp

    r156381 r156546  
    263263#include "JSLocation.cpp"
    264264#include "JSMediaController.cpp"
     265#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     266#include "JSMediaControlsHost.cpp"
     267#endif
    265268#include "JSMediaError.cpp"
    266269#include "JSMediaList.cpp"
  • trunk/Source/WebCore/DerivedSources.make

    r156488 r156546  
    3434    $(WebCore)/Modules/indexeddb \
    3535    $(WebCore)/Modules/indieui \
     36    $(WebCore)/Modules/mediacontrols \
    3637    $(WebCore)/Modules/mediasource \
    3738    $(WebCore)/Modules/mediastream \
     
    116117    $(WebCore)/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl \
    117118    $(WebCore)/Modules/indieui/UIRequestEvent.idl \
     119    $(WebCore)/Modules/mediacontrols/MediaControlsHost.idl \
    118120        $(WebCore)/Modules/mediasource/MediaSource.idl \
    119121        $(WebCore)/Modules/mediasource/SourceBuffer.idl \
     
    701703    SVGElementFactory.cpp \
    702704    SVGNames.cpp \
     705    UserAgentScripts.h \
    703706    UserAgentStyleSheets.h \
    704707    WebKitFontFamilyNames.cpp \
     
    846849ifeq ($(findstring ENABLE_VIDEO,$(FEATURE_DEFINES)), ENABLE_VIDEO)
    847850    USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/mediaControls.css
    848     USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/mediaControlsQuickTime.css
    849851endif
    850852
    851853ifeq ($(findstring ENABLE_FULLSCREEN_API,$(FEATURE_DEFINES)), ENABLE_FULLSCREEN_API)
    852     USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/fullscreen.css $(WebCore)/css/fullscreenQuickTime.css
    853 endif
     854    USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/fullscreen.css
     855endif
     856
     857# ifeq ($(findstring ENABLE_MEDIA_CONTROLS_SCRIPT,$(FEATURE_DEFINES)), ENABLE_MEDIA_CONTROLS_SCRIPT)
     858        USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/Modules/mediacontrols/mediaControlsApple.css
     859# endif
    854860
    855861UserAgentStyleSheets.h : css/make-css-file-arrays.pl bindings/scripts/preprocessor.pm $(USER_AGENT_STYLE_SHEETS) $(PLATFORM_FEATURE_DEFINES)
    856862        perl -I$(WebCore)/bindings/scripts $< --defines "$(FEATURE_DEFINES)" $@ UserAgentStyleSheetsData.cpp $(USER_AGENT_STYLE_SHEETS)
     863
     864# --------
     865
     866# user agent scripts
     867
     868USER_AGENT_SCRIPTS =
     869
     870ifeq ($(findstring ENABLE_MEDIA_CONTROLS_SCRIPT,$(FEATURE_DEFINES)), ENABLE_MEDIA_CONTROLS_SCRIPT)
     871        USER_AGENT_SCRIPTS := $(USER_AGENT_SCRIPTS) $(WebCore)/Modules/mediacontrols/mediaControlsApple.js
     872endif
     873
     874
     875UserAgentScripts.h : css/make-css-file-arrays.pl bindings/scripts/preprocessor.pm $(USER_AGENT_SCRIPTS) $(PLATFORM_FEATURE_DEFINES)
     876        perl -I$(WebCore)/bindings/scripts $< --defines "$(FEATURE_DEFINES)" $@ UserAgentScriptsData.cpp $(USER_AGENT_SCRIPTS)
    857877
    858878# --------
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj

    r156543 r156546  
    33313331      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
    33323332    </ClCompile>
     3333    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaControlsHost.cpp">
     3334      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     3335      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     3336      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
     3337      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     3338      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
     3339      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
     3340      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
     3341      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     3342      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
     3343      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     3344      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
     3345      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     3346    </ClCompile>
    33333347    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaError.cpp">
    33343348      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
     
    67656779    <ClCompile Include="..\Modules\quota\StorageInfo.cpp" />
    67666780    <ClCompile Include="..\Modules\quota\StorageQuota.cpp" />
     6781    <ClInclude Include="..\Modules\mediacontrols\MediaControlsHost.cpp" />
    67676782    <ClCompile Include="..\Modules\mediasource\MediaSource.cpp" />
    67686783    <ClCompile Include="..\Modules\mediasource\MediaSourceRegistry.cpp" />
     
    1822118236    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSKeyboardEvent.h" />
    1822218237    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSLocation.h" />
     18238    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaControlsHost.h" />
    1822318239    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaError.h" />
    1822418240    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaList.h" />
     
    1867518691    <ClInclude Include="..\Modules\quota\StorageQuotaCallback.h" />
    1867618692    <ClInclude Include="..\Modules\quota\StorageUsageCallback.h" />
     18693    <ClInclude Include="..\Modules\mediacontrols\MediaControlsHost.h" />
    1867718694    <ClInclude Include="..\Modules\mediasource\MediaSource.h" />
    1867818695    <ClInclude Include="..\Modules\mediasource\MediaSourceRegistry.h" />
     
    2088220899    <None Include="..\css\CSSValueKeywords.in" />
    2088320900    <None Include="..\css\fullscreen.css" />
    20884     <None Include="..\css\fullscreenQuickTime.css" />
    2088520901    <None Include="..\css\html.css" />
    2088620902    <None Include="..\css\mathml.css" />
    2088720903    <None Include="..\css\mediaControls.css" />
    20888     <None Include="..\css\mediaControlsQuickTime.css" />
    2088920904    <None Include="..\css\plugIns.css" />
    2089020905    <None Include="..\css\quirks.css" />
  • trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters

    r156543 r156546  
    2525    <Filter Include="Modules\quota">
    2626      <UniqueIdentifier>{47f62e6e-87ae-4091-993d-d1d78f2c8ba9}</UniqueIdentifier>
     27    </Filter>
     28    <Filter Include="Modules\mediacontrols">
     29      <UniqueIdentifier>{63ec45f2-29a3-4f42-90af-dd4fedaca99b}</UniqueIdentifier>
    2730    </Filter>
    2831    <Filter Include="Modules\mediasource">
     
    448451      <Filter>Modules\quota</Filter>
    449452    </ClCompile>
     453    <ClCompile Include="..\Modules\mediacontrols\MediaControlsHost.cpp">
     454      <Filter>Modules\mediacontrols</Filter>
     455    </CLCompile>
    450456    <ClCompile Include="..\Modules\mediasource\MediaSource.cpp">
    451457      <Filter>Modules\mediasource</Filter>
     
    59755981      <Filter>DerivedSources</Filter>
    59765982    </ClCompile>
    5977     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaError.cpp">
     5983    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaControlsHost.cpp">
     5984      <Filter>DerivedSources</Filter>
     5985    </ClCompile>
     5986     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaError.cpp">
    59785987      <Filter>DerivedSources</Filter>
    59795988    </ClCompile>
     
    73007309      <Filter>Modules\quota</Filter>
    73017310    </ClInclude>
     7311    <ClInclude Include="..\Modules\mediacontrols\MediaControlsHost.h">
     7312      <Filter>Modules\mediacontrols</Filter>
     7313    </CLCompile>
    73027314    <ClInclude Include="..\Modules\mediasource\MediaSource.h">
    73037315      <Filter>Modules\mediasource</Filter>
     
    1373813750    </ClInclude>
    1373913751    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSLocation.h">
     13752      <Filter>DerivedSources</Filter>
     13753    </ClInclude>
     13754    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSMediaControlsHost.h">
    1374013755      <Filter>DerivedSources</Filter>
    1374113756    </ClInclude>
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r156543 r156546  
    53695369                CDA98E0E1603FE5800FEA3B1 /* MediaKeySession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA98DC716014F2C00FEA3B1 /* MediaKeySession.cpp */; };
    53705370                CDAA8D0A14D71B2E0061EA60 /* PlatformClockCM.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDAA8D0814D385600061EA60 /* PlatformClockCM.mm */; };
     5371                CDAB6D2817C7DE6C00C60B34 /* MediaControlsHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDAB6D2617C7DE6C00C60B34 /* MediaControlsHost.cpp */; };
     5372                CDAB6D2917C7DE6C00C60B34 /* MediaControlsHost.h in Headers */ = {isa = PBXBuildFile; fileRef = CDAB6D2717C7DE6C00C60B34 /* MediaControlsHost.h */; };
     5373                CDAB6D2D17C814EE00C60B34 /* JSMediaControlsHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDAB6D2B17C814EE00C60B34 /* JSMediaControlsHost.cpp */; };
     5374                CDAB6D2E17C814EE00C60B34 /* JSMediaControlsHost.h in Headers */ = {isa = PBXBuildFile; fileRef = CDAB6D2C17C814EE00C60B34 /* JSMediaControlsHost.h */; };
     5375                CDAB6D3117C9259500C60B34 /* UserAgentScripts.h in Headers */ = {isa = PBXBuildFile; fileRef = CDAB6D2F17C9259500C60B34 /* UserAgentScripts.h */; };
     5376                CDAB6D3217C9259500C60B34 /* UserAgentScriptsData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDAB6D3017C9259500C60B34 /* UserAgentScriptsData.cpp */; };
    53715377                CDAE8C091746B95700532D78 /* AudioSessionManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDAE8C071746B95700532D78 /* AudioSessionManager.cpp */; };
    53725378                CDB859F7160D48A400E5B07F /* MediaKeyEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDB859F4160D489900E5B07F /* MediaKeyEvent.cpp */; };
     
    1231412320                CDAA8D0714D385600061EA60 /* PlatformClockCM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformClockCM.h; sourceTree = "<group>"; };
    1231512321                CDAA8D0814D385600061EA60 /* PlatformClockCM.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformClockCM.mm; sourceTree = "<group>"; };
     12322                CDAB6D2517C7DE5700C60B34 /* MediaControlsHost.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = MediaControlsHost.idl; sourceTree = "<group>"; };
     12323                CDAB6D2617C7DE6C00C60B34 /* MediaControlsHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaControlsHost.cpp; sourceTree = "<group>"; };
     12324                CDAB6D2717C7DE6C00C60B34 /* MediaControlsHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaControlsHost.h; sourceTree = "<group>"; };
     12325                CDAB6D2B17C814EE00C60B34 /* JSMediaControlsHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaControlsHost.cpp; sourceTree = "<group>"; };
     12326                CDAB6D2C17C814EE00C60B34 /* JSMediaControlsHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaControlsHost.h; sourceTree = "<group>"; };
     12327                CDAB6D2F17C9259500C60B34 /* UserAgentScripts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserAgentScripts.h; sourceTree = "<group>"; };
     12328                CDAB6D3017C9259500C60B34 /* UserAgentScriptsData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserAgentScriptsData.cpp; sourceTree = "<group>"; };
    1231612329                CDAE8C071746B95700532D78 /* AudioSessionManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioSessionManager.cpp; sourceTree = "<group>"; };
    1231712330                CDAE8C081746B95700532D78 /* AudioSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioSessionManager.h; sourceTree = "<group>"; };
     
    1232312336                CDB859F8160D493E00E5B07F /* JSMediaKeyEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeyEvent.cpp; sourceTree = "<group>"; };
    1232412337                CDB859F9160D493E00E5B07F /* JSMediaKeyEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeyEvent.h; sourceTree = "<group>"; };
    12325                 CDBD93BA1333BD4B002570E3 /* fullscreenQuickTime.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = fullscreenQuickTime.css; sourceTree = "<group>"; };
     12338                CDC1DD4117CC2C48008CB55D /* mediaControlsApple.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = mediaControlsApple.css; sourceTree = "<group>"; };
    1232612339                CDC26B3C160A62B00026757B /* MockCDM.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MockCDM.cpp; sourceTree = "<group>"; };
    1232712340                CDC26B3D160A62B00026757B /* MockCDM.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MockCDM.h; sourceTree = "<group>"; };
     
    1233212345                CDCE5CD014633BC900D47CCA /* EventTargetFactory.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EventTargetFactory.in; sourceTree = "<group>"; };
    1233312346                CDD1E525167BA56400CE820B /* TextTrackRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextTrackRepresentation.h; sourceTree = "<group>"; };
     12347                CDE6560E17CA6E7600526BA7 /* mediaControlsApple.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = mediaControlsApple.js; sourceTree = "<group>"; };
    1233412348                CDEA762C14608224008B31F1 /* Clock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Clock.h; sourceTree = "<group>"; };
    1233512349                CDEA762E146084DE008B31F1 /* PlatformClockCA.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformClockCA.cpp; sourceTree = "<group>"; };
     
    1380913823                                1C5FAECA0DCFD8C900D58F78 /* Inspector */,
    1381013824                                CD61FE7B1794CA02004101EB /* MediaSource */,
     13825                                CDAB6D2A17C7E97D00C60B34 /* MediaControls */,
    1381113826                                07CFD99317D01405001C4FFC /* MediaStream */,
    1381213827                                33503C9C10179A9A003B47E1 /* Notifications */,
     
    1496214977                        isa = PBXGroup;
    1496314978                        children = (
     14979                                CDAB6D2F17C9259500C60B34 /* UserAgentScripts.h */,
     14980                                CDAB6D3017C9259500C60B34 /* UserAgentScriptsData.cpp */,
    1496414981                                656581AC09D14EE6000E61D7 /* CharsetData.cpp */,
    1496514982                                E406F3FB1198307D009D59D6 /* ColorData.cpp */,
     
    1666016677                                9712A55315004E3C0048AF10 /* indexeddb */,
    1666116678                                AA7EA0A917557B1C00DF4643 /* indieui */,
     16679                                CD9A37F517C7D93600C5FA7A /* mediacontrols */,
    1666216680                                B1A942DD15B5CE2200D525D1 /* mediasource */,
    1666316681                                07221B4617CEC32700848E51 /* mediastream */,
     
    2001020028                        sourceTree = "<group>";
    2001120029                };
     20030                CD9A37F517C7D93600C5FA7A /* mediacontrols */ = {
     20031                        isa = PBXGroup;
     20032                        children = (
     20033                                CDC1DD4117CC2C48008CB55D /* mediaControlsApple.css */,
     20034                                CDE6560E17CA6E7600526BA7 /* mediaControlsApple.js */,
     20035                                CDAB6D2517C7DE5700C60B34 /* MediaControlsHost.idl */,
     20036                                CDAB6D2617C7DE6C00C60B34 /* MediaControlsHost.cpp */,
     20037                                CDAB6D2717C7DE6C00C60B34 /* MediaControlsHost.h */,
     20038                        );
     20039                        name = mediacontrols;
     20040                        path = Modules/mediacontrols;
     20041                        sourceTree = "<group>";
     20042                };
    2001220043                CDA98DBD16014E0800FEA3B1 /* encryptedmedia */ = {
    2001320044                        isa = PBXGroup;
     
    2004920080                        );
    2005020081                        name = EncryptedMedia;
     20082                        sourceTree = "<group>";
     20083                };
     20084                CDAB6D2A17C7E97D00C60B34 /* MediaControls */ = {
     20085                        isa = PBXGroup;
     20086                        children = (
     20087                                CDAB6D2B17C814EE00C60B34 /* JSMediaControlsHost.cpp */,
     20088                                CDAB6D2C17C814EE00C60B34 /* JSMediaControlsHost.h */,
     20089                        );
     20090                        name = MediaControls;
    2005120091                        sourceTree = "<group>";
    2005220092                };
     
    2037620416                                A80E6CC30A1989CA007FB8C5 /* FontValue.h */,
    2037720417                                CD4E0AFA11F7BC27009D3811 /* fullscreen.css */,
    20378                                 CDBD93BA1333BD4B002570E3 /* fullscreenQuickTime.css */,
    2037920418                                93CA4C9909DF93FA00DF8677 /* html.css */,
    2038020419                                4A9CC81E16BF9BB400EC645A /* InspectorCSSOMWrappers.cpp */,
     
    2238022419                                85031B420A44EFC700F992E0 /* Event.h in Headers */,
    2238122420                                4138D3351244054800323D33 /* EventContext.h in Headers */,
     22421                                CDAB6D2917C7DE6C00C60B34 /* MediaControlsHost.h in Headers */,
    2238222422                                418A06D0133C04D500CD379C /* EventDispatcher.h in Headers */,
    2238322423                                4AF1AD3F13FD23A400AA9590 /* EventDispatchMediator.h in Headers */,
     
    2241722457                                50D403C814768C9400D30BB5 /* FECustomFilter.h in Headers */,
    2241822458                                84730D7B1248F0B300D3A9C9 /* FEDiffuseLighting.h in Headers */,
     22459                                CDAB6D3117C9259500C60B34 /* UserAgentScripts.h in Headers */,
    2241922460                                84730D7D1248F0B300D3A9C9 /* FEDisplacementMap.h in Headers */,
    2242022461                                4358E8811360A31700E4748C /* FEDropShadow.h in Headers */,
     
    2256122602                                499B3ED7128CD31400E726C2 /* GraphicsLayerCA.h in Headers */,
    2256222603                                0F580B0E0F12A2690051D689 /* GraphicsLayerClient.h in Headers */,
     22604                                CDAB6D2E17C814EE00C60B34 /* JSMediaControlsHost.h in Headers */,
    2256322605                                1AC69593161A1E53003732CB /* GraphicsLayerFactory.h in Headers */,
    2256422606                                0FA24D7A162DF91900A3F4C0 /* GraphicsLayerUpdater.h in Headers */,
     
    2511425156                                24F54EAC101FE914000AE741 /* ApplicationCacheHost.cpp in Sources */,
    2511525157                                1A8F6BC00DB55CDC001DB794 /* ApplicationCacheResource.cpp in Sources */,
     25158                                CDAB6D2817C7DE6C00C60B34 /* MediaControlsHost.cpp in Sources */,
    2511625159                                1A2AAC580DC2A3B100A20D9A /* ApplicationCacheStorage.cpp in Sources */,
    2511725160                                9B417065125662B3006B28FC /* ApplyBlockElementCommand.cpp in Sources */,
     
    2609826141                                1449E287107D4DB400B5793F /* JSCallbackData.cpp in Sources */,
    2609926142                                65DF323909D1DE65000BE325 /* JSCanvasGradient.cpp in Sources */,
     26143                                CDAB6D3217C9259500C60B34 /* UserAgentScriptsData.cpp in Sources */,
    2610026144                                65DF323B09D1DE65000BE325 /* JSCanvasPattern.cpp in Sources */,
    2610126145                                49EED1421051969400099FAB /* JSCanvasRenderingContext.cpp in Sources */,
     
    2773227776                                00B9318913BA8DBC0035A948 /* XMLDocumentParserLibxml2.cpp in Sources */,
    2773327777                                00B9318B13BA8DC90035A948 /* XMLDocumentParserScope.cpp in Sources */,
     27778                                CDAB6D2D17C814EE00C60B34 /* JSMediaControlsHost.cpp in Sources */,
    2773427779                                59C28045138DC2410079B7E2 /* XMLErrors.cpp in Sources */,
    2773527780                                BC772C460C4EB2C60083285F /* XMLHttpRequest.cpp in Sources */,
  • trunk/Source/WebCore/bindings/js/ScriptObject.cpp

    r155736 r156546  
    3939#include "JSInjectedScriptHost.h"
    4040#include "JSInspectorFrontendHost.h"
     41#endif
     42
     43#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     44#include "JSMediaControlsHost.h"
    4145#endif
    4246
     
    9195#endif // ENABLE(INSPECTOR)
    9296
     97#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     98bool ScriptGlobalObject::set(JSC::ExecState* scriptState, const char* name, MediaControlsHost* value)
     99{
     100    JSLockHolder lock(scriptState);
     101    JSDOMGlobalObject* globalObject = jsCast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject());
     102    globalObject->putDirect(scriptState->vm(), Identifier(scriptState, name), toJS(scriptState, globalObject, value));
     103    return handleException(scriptState);
     104}
     105#endif
     106
    93107bool ScriptGlobalObject::get(JSC::ExecState* scriptState, const char* name, ScriptObject& value)
    94108{
  • trunk/Source/WebCore/bindings/js/ScriptObject.h

    r155736 r156546  
    4141    class InjectedScriptHost;
    4242    class InspectorFrontendHost;
     43    class MediaControlsHost;
    4344
    4445    class ScriptObject : public ScriptValue {
     
    6162        static bool set(JSC::ExecState*, const char* name, InjectedScriptHost*);
    6263#endif
     64#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     65        static bool set(JSC::ExecState*, const char* name, MediaControlsHost*);
     66#endif
     67
    6368        static bool get(JSC::ExecState*, const char* name, ScriptObject&);
    6469        static bool remove(JSC::ExecState*, const char* name);
  • trunk/Source/WebCore/css/CSSDefaultStyleSheets.cpp

    r156178 r156546  
    186186#if ENABLE(VIDEO)
    187187    if (!mediaControlsStyleSheet && (element->hasTagName(videoTag) || isHTMLAudioElement(element))) {
    188         String mediaRules = String(mediaControlsUserAgentStyleSheet, sizeof(mediaControlsUserAgentStyleSheet)) + RenderTheme::themeForPage(element->document().page())->extraMediaControlsStyleSheet();
     188        String mediaRules = RenderTheme::themeForPage(element->document().page())->mediaControlsStyleSheet();
     189        if (mediaRules.isEmpty())
     190            mediaRules = String(mediaControlsUserAgentStyleSheet, sizeof(mediaControlsUserAgentStyleSheet)) + RenderTheme::themeForPage(element->document().page())->extraMediaControlsStyleSheet();
    189191        mediaControlsStyleSheet = parseUASheet(mediaRules);
    190192        defaultStyle->addRulesFromSheet(mediaControlsStyleSheet, screenEval());
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r156424 r156546  
    4646#include "ExceptionCode.h"
    4747#include "ExceptionCodePlaceholder.h"
    48 #include "Frame.h"
    4948#include "FrameLoader.h"
    5049#include "FrameLoaderClient.h"
     
    5453#include "HTMLSourceElement.h"
    5554#include "HTMLVideoElement.h"
     55#include "JSHTMLMediaElement.h"
    5656#include "Language.h"
    5757#include "Logging.h"
     58#include "MainFrame.h"
    5859#include "MediaController.h"
    5960#include "MediaControls.h"
     
    7172#include "PageActivityAssertionToken.h"
    7273#include "PageGroup.h"
     74#include "RenderTheme.h"
    7375#include "RenderVideo.h"
    7476#include "RenderView.h"
    7577#include "ScriptController.h"
     78#include "ScriptSourceCode.h"
    7679#include "SecurityPolicy.h"
    7780#include "Settings.h"
     
    138141#if USE(AUDIO_SESSION)
    139142#include "AudioSessionManager.h"
     143#endif
     144
     145#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     146#include "JSMediaControlsHost.h"
     147#include "MediaControlsHost.h"
     148#include "ScriptObject.h"
     149#include "UserAgentScripts.h"
    140150#endif
    141151
     
    574584bool HTMLMediaElement::childShouldCreateRenderer(const Node* child) const
    575585{
     586#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     587    return hasShadowRootParent(child) && HTMLElement::childShouldCreateRenderer(child);
     588#else
    576589    if (!hasMediaControls())
    577590        return false;
     
    583596        && hasShadowRootParent(child)
    584597        && HTMLElement::childShouldCreateRenderer(child);
     598#endif
    585599}
    586600
     
    45064520void HTMLMediaElement::updateTextTrackDisplay()
    45074521{
     4522#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     4523    ensureUserAgentShadowRoot();
     4524    return;
     4525#endif
    45084526    if (!hasMediaControls() && !createMediaControls())
    45094527        return;
     
    46354653MediaControls* HTMLMediaElement::mediaControls() const
    46364654{
     4655#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     4656    return 0;
     4657#else
    46374658    return toMediaControls(userAgentShadowRoot()->firstChild());
     4659#endif
    46384660}
    46394661
    46404662bool HTMLMediaElement::hasMediaControls() const
    46414663{
     4664#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     4665    return false;
     4666#else
     4667
    46424668    if (ShadowRoot* userAgent = userAgentShadowRoot()) {
    46434669        Node* node = userAgent->firstChild();
     
    46474673
    46484674    return false;
     4675#endif
    46494676}
    46504677
    46514678bool HTMLMediaElement::createMediaControls()
    46524679{
     4680#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     4681    ensureUserAgentShadowRoot();
     4682    return false;
     4683#else
    46534684    if (hasMediaControls())
    46544685        return true;
     
    46694700
    46704701    return true;
     4702#endif
    46714703}
    46724704
    46734705void HTMLMediaElement::configureMediaControls()
    46744706{
    4675 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
     4707#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     4708    if (!controls() || !inDocument())
     4709        return;
     4710
     4711    ensureUserAgentShadowRoot();
     4712    return;
     4713#elif !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
    46764714    if (!controls() || !inDocument()) {
    46774715        if (hasMediaControls())
     
    46844722
    46854723    mediaControls()->show();
    4686 #else
     4724#else 
    46874725    if (m_player)
    46884726        m_player->setControls(controls());
     
    47184756    m_haveVisibleTextTrack = haveVisibleTextTrack;
    47194757    m_closedCaptionsVisible = m_haveVisibleTextTrack;
     4758
     4759#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     4760    if (!m_haveVisibleTextTrack)
     4761        return;
     4762
     4763    ensureUserAgentShadowRoot();
     4764    return;
     4765#endif
    47204766
    47214767    if (!m_haveVisibleTextTrack && !hasMediaControls())
     
    51215167}
    51225168
    5123 }
    5124 #endif
     5169#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     5170DOMWrapperWorld* HTMLMediaElement::ensureIsolatedWorld()
     5171{
     5172    if (!m_isolatedWorld)
     5173        m_isolatedWorld = DOMWrapperWorld::create(JSDOMWindow::commonVM());
     5174    return m_isolatedWorld.get();
     5175}
     5176
     5177bool HTMLMediaElement::ensureMediaControlsInjectedScript()
     5178{
     5179    Page* page = document().page();
     5180    if (!page)
     5181        return false;
     5182
     5183    String mediaControlsScript = RenderTheme::themeForPage(page)->mediaControlsScript();
     5184    if (!mediaControlsScript.length())
     5185        return false;
     5186
     5187    DOMWrapperWorld* world = ensureIsolatedWorld();
     5188    ScriptController& scriptController = page->mainFrame().script();
     5189    JSDOMGlobalObject* globalObject = JSC::jsCast<JSDOMGlobalObject*>(scriptController.globalObject(world));
     5190    JSC::ExecState* exec = globalObject->globalExec();
     5191
     5192    JSC::JSValue overlayValue = globalObject->get(exec, JSC::Identifier(exec, "createControls"));
     5193    if (overlayValue.isFunction())
     5194        return true;
     5195
     5196    scriptController.evaluateInWorld(ScriptSourceCode(mediaControlsScript), world);
     5197    if (exec->hadException()) {
     5198        exec->clearException();
     5199        return false;
     5200    }
     5201
     5202    return true;
     5203}
     5204
     5205void HTMLMediaElement::didAddUserAgentShadowRoot(ShadowRoot* root)
     5206{
     5207    Page* page = document().page();
     5208    if (!page)
     5209        return;
     5210
     5211    DOMWrapperWorld* world = ensureIsolatedWorld();
     5212    if (!world)
     5213        return;
     5214
     5215    if (!ensureMediaControlsInjectedScript())
     5216        return;
     5217
     5218    ScriptController& scriptController = page->mainFrame().script();
     5219    JSDOMGlobalObject* globalObject = JSC::jsCast<JSDOMGlobalObject*>(scriptController.globalObject(world));
     5220    JSC::ExecState* exec = globalObject->globalExec();
     5221    JSC::JSLockHolder lock(exec);
     5222
     5223    // It is expected the JS file provides a createControls(shadowRoot, video, mediaControlsHost) function.
     5224    JSC::JSValue overlayValue = globalObject->get(exec, JSC::Identifier(exec, "createControls"));
     5225    if (overlayValue.isUndefinedOrNull())
     5226        return;
     5227
     5228    if (!m_mediaControlsHost)
     5229        m_mediaControlsHost = MediaControlsHost::create(this);
     5230
     5231    JSC::MarkedArgumentBuffer argList;
     5232    argList.append(toJS(exec, globalObject, root));
     5233    argList.append(toJS(exec, globalObject, this));
     5234    argList.append(toJS(exec, globalObject, m_mediaControlsHost.get()));
     5235
     5236    JSC::JSObject* overlay = overlayValue.toObject(exec);
     5237    JSC::CallData callData;
     5238    JSC::CallType callType = overlay->methodTable()->getCallData(overlay, callData);
     5239    if (callType == JSC::CallTypeNone)
     5240        return;
     5241
     5242    JSC::call(exec, overlay, callType, callData, globalObject, argList);
     5243    if (exec->hadException())
     5244        exec->clearException();
     5245}
     5246#endif
     5247
     5248}
     5249
     5250#endif
  • trunk/Source/WebCore/html/HTMLMediaElement.h

    r156234 r156546  
    4949#endif
    5050
     51
     52
    5153namespace WebCore {
    5254
     
    6466class MediaController;
    6567class MediaControls;
     68class MediaControlsHost;
    6669class MediaError;
    6770class PageActivityAssertionToken;
     
    623626#endif
    624627
     628#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     629    virtual void didAddUserAgentShadowRoot(ShadowRoot*) OVERRIDE;
     630    DOMWrapperWorld* ensureIsolatedWorld();
     631    bool ensureMediaControlsInjectedScript();
     632#endif
     633
    625634    Timer<HTMLMediaElement> m_loadTimer;
    626635    Timer<HTMLMediaElement> m_progressEventTimer;
     
    775784    OwnPtr<PageActivityAssertionToken> m_activityToken;
    776785    size_t m_reportedExtraMemoryCost;
     786
     787#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     788    RefPtr<MediaControlsHost> m_mediaControlsHost;
     789    RefPtr<DOMWrapperWorld> m_isolatedWorld;
     790#endif
    777791};
    778792
  • trunk/Source/WebCore/rendering/RenderTextTrackCue.cpp

    r155211 r156546  
    6868    RenderBlock* parentBlock = containingBlock();
    6969    firstLineBox = toRenderInline(firstChild())->firstLineBox();
     70    if (!firstLineBox)
     71        firstLineBox = this->firstLineBox();
    7072
    7173    // 1. Horizontal: Let step be the height of the first line box in boxes.
  • trunk/Source/WebCore/rendering/RenderTheme.h

    r155460 r156546  
    9292    virtual String extraPlugInsStyleSheet() { return String(); }
    9393#if ENABLE(VIDEO)
     94    virtual String mediaControlsStyleSheet() { return String(); }
    9495    virtual String extraMediaControlsStyleSheet() { return String(); }
     96    virtual String mediaControlsScript() { return String() ; }
    9597#endif
    9698#if ENABLE(FULLSCREEN_API)
  • trunk/Source/WebCore/rendering/RenderThemeMac.h

    r155460 r156546  
    108108
    109109#if ENABLE(VIDEO)
    110     virtual bool paintMediaFullscreenButton(RenderObject*, const PaintInfo&, const IntRect&);
    111     virtual bool paintMediaPlayButton(RenderObject*, const PaintInfo&, const IntRect&);
    112     virtual bool paintMediaMuteButton(RenderObject*, const PaintInfo&, const IntRect&);
    113     virtual bool paintMediaSeekBackButton(RenderObject*, const PaintInfo&, const IntRect&);
    114     virtual bool paintMediaSeekForwardButton(RenderObject*, const PaintInfo&, const IntRect&);
    115     virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
    116     virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
    117     virtual bool paintMediaRewindButton(RenderObject*, const PaintInfo&, const IntRect&);
    118     virtual bool paintMediaReturnToRealtimeButton(RenderObject*, const PaintInfo&, const IntRect&);
    119     virtual bool paintMediaControlsBackground(RenderObject*, const PaintInfo&, const IntRect&);
    120     virtual bool paintMediaCurrentTime(RenderObject*, const PaintInfo&, const IntRect&);
    121     virtual bool paintMediaTimeRemaining(RenderObject*, const PaintInfo&, const IntRect&);
    122     virtual bool paintMediaVolumeSliderContainer(RenderObject*, const PaintInfo&, const IntRect&);
    123     virtual bool paintMediaVolumeSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
    124     virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
    125     virtual bool paintMediaFullScreenVolumeSliderTrack(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
    126     virtual bool paintMediaFullScreenVolumeSliderThumb(RenderObject*, const PaintInfo&, const IntRect&) OVERRIDE;
    127 
    128110    // Media controls
    129     virtual String extraMediaControlsStyleSheet();
    130 #if ENABLE(FULLSCREEN_API)
    131     virtual String extraFullScreenStyleSheet();
    132 #endif
    133 
    134     virtual bool usesMediaControlStatusDisplay() { return true; }
    135     virtual void adjustMediaSliderThumbSize(RenderStyle*) const;
    136     virtual IntPoint volumeSliderOffsetFromMuteButton(RenderBox*, const IntSize&) const OVERRIDE;
     111    virtual String mediaControlsStyleSheet() OVERRIDE;
     112    virtual String mediaControlsScript() OVERRIDE;
    137113#endif
    138114    virtual bool supportsSelectionForegroundColors() const { return false; }
  • trunk/Source/WebCore/rendering/RenderThemeMac.mm

    r156308 r156546  
    5757#import "ThemeMac.h"
    5858#import "TimeRanges.h"
     59#import "UserAgentScripts.h"
    5960#import "UserAgentStyleSheets.h"
    6061#import "WebCoreNSCellExtras.h"
     
    184185
    185186#if ENABLE(VIDEO)
    186 
    187 void RenderThemeMac::adjustMediaSliderThumbSize(RenderStyle* style) const
    188 {
    189     int wkPart;
    190     switch (style->appearance()) {
    191     case MediaSliderThumbPart:
    192         wkPart = MediaSliderThumb;
    193         break;
    194     case MediaVolumeSliderThumbPart:
    195         wkPart = MediaVolumeSliderThumb;
    196         break;
    197     case MediaFullScreenVolumeSliderThumbPart:
    198         wkPart = MediaFullScreenVolumeSliderThumb;
    199         break;
    200     default:
    201         return;
    202     }
    203 
    204     CGSize size;
    205     wkMeasureMediaUIPart(wkPart, NULL, &size);
    206     int width = size.width;
    207     int height = size.height;
    208 
    209     float zoomLevel = style->effectiveZoom();
    210     style->setWidth(Length(static_cast<int>(width * zoomLevel), Fixed));
    211     style->setHeight(Length(static_cast<int>(height * zoomLevel), Fixed));
    212 }
    213 
    214 enum WKMediaControllerThemeState {
    215     MediaUIPartDisabledFlag = 1 << 0,
    216     MediaUIPartPressedFlag = 1 << 1,
    217     MediaUIPartDrawEndCapsFlag = 1 << 3,
    218 };
    219 
    220 static unsigned getMediaUIPartStateFlags(Node* node)
    221 {
    222     unsigned flags = 0;
    223 
    224     if (isDisabledFormControl(node))
    225         flags |= MediaUIPartDisabledFlag;
    226     else if (node->isElementNode() && toElement(node)->active())
    227         flags |= MediaUIPartPressedFlag;
    228     return flags;
    229 }
    230 
    231 // Utility to scale when the UI part are not scaled by wkDrawMediaUIPart
    232 static FloatRect getUnzoomedRectAndAdjustCurrentContext(RenderObject* o, const PaintInfo& paintInfo, const IntRect &originalRect)
    233 {
    234     float zoomLevel = o->style()->effectiveZoom();
    235     FloatRect unzoomedRect(originalRect);
    236     if (zoomLevel != 1.0f) {
    237         unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel);
    238         unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel);
    239         paintInfo.context->translate(unzoomedRect.x(), unzoomedRect.y());
    240         paintInfo.context->scale(FloatSize(zoomLevel, zoomLevel));
    241         paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y());
    242     }
    243     return unzoomedRect;
    244 }
    245 
    246 bool RenderThemeMac::paintMediaFullscreenButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    247 {
    248     Node* node = o->node();
    249     if (!node)
    250         return false;
    251 
    252     if (node->isMediaControlElement()) {
    253         LocalCurrentGraphicsContext localContext(paintInfo.context);
    254         wkDrawMediaUIPart(mediaControlElementType(node), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    255     }
    256     return false;
    257 }
    258 
    259 bool RenderThemeMac::paintMediaMuteButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    260 {
    261     Node* node = o->node();
    262     Node* mediaNode = node ? node->shadowHost() : 0;
    263     if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !isHTMLAudioElement(mediaNode)))
    264         return false;
    265 
    266     if (node->isMediaControlElement()) {
    267         LocalCurrentGraphicsContext localContext(paintInfo.context);
    268         wkDrawMediaUIPart(mediaControlElementType(node), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    269     }
    270     return false;
    271 }
    272 
    273 bool RenderThemeMac::paintMediaPlayButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    274 {
    275     Node* node = o->node();
    276     Node* mediaNode = node ? node->shadowHost() : 0;
    277     if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !isHTMLAudioElement(mediaNode)))
    278         return false;
    279 
    280     if (node->isMediaControlElement()) {
    281         LocalCurrentGraphicsContext localContext(paintInfo.context);
    282         wkDrawMediaUIPart(mediaControlElementType(node), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    283     }
    284     return false;
    285 }
    286 
    287 bool RenderThemeMac::paintMediaSeekBackButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    288 {
    289     Node* node = o->node();
    290     if (!node)
    291         return false;
    292 
    293     LocalCurrentGraphicsContext localContext(paintInfo.context);
    294     wkDrawMediaUIPart(MediaSeekBackButton, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    295     return false;
    296 }
    297 
    298 bool RenderThemeMac::paintMediaSeekForwardButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    299 {
    300     Node* node = o->node();
    301     if (!node)
    302         return false;
    303 
    304     LocalCurrentGraphicsContext localContext(paintInfo.context);
    305     wkDrawMediaUIPart(MediaSeekForwardButton, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    306     return false;
    307 }
    308 
    309 bool RenderThemeMac::paintMediaSliderTrack(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    310 {
    311     Node* node = o->node();
    312     Element* mediaNode = node ? node->shadowHost() : 0;
    313     if (!mediaNode || !mediaNode->isMediaElement())
    314         return false;
    315 
    316     HTMLMediaElement* mediaElement = toHTMLMediaElement(mediaNode);
    317     if (!mediaElement)
    318         return false;
    319 
    320     RefPtr<TimeRanges> timeRanges = mediaElement->buffered();
    321     float timeLoaded = timeRanges->length() ? timeRanges->end(0, IGNORE_EXCEPTION) : 0;
    322     float currentTime = mediaElement->currentTime();
    323     float duration = mediaElement->duration();
    324     if (std::isnan(duration))
    325         duration = 0;
    326 
    327     ContextContainer cgContextContainer(paintInfo.context);
    328     CGContextRef context = cgContextContainer.context();
    329     GraphicsContextStateSaver stateSaver(*paintInfo.context);
    330     FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
    331     wkDrawMediaSliderTrack(context, unzoomedRect,
    332         timeLoaded, currentTime, duration, getMediaUIPartStateFlags(node));
    333     return false;
    334 }
    335 
    336 bool RenderThemeMac::paintMediaSliderThumb(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    337 {
    338     Node* node = o->node();
    339     if (!node)
    340         return false;
    341 
    342     LocalCurrentGraphicsContext localContext(paintInfo.context);
    343     wkDrawMediaUIPart(MediaSliderThumb, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    344     return false;
    345 }
    346 
    347 bool RenderThemeMac::paintMediaRewindButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    348 {
    349     Node* node = o->node();
    350     if (!node)
    351         return false;
    352 
    353     LocalCurrentGraphicsContext localContext(paintInfo.context);
    354     wkDrawMediaUIPart(MediaRewindButton, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    355     return false;
    356 }
    357 
    358 bool RenderThemeMac::paintMediaReturnToRealtimeButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    359 {
    360     Node* node = o->node();
    361     if (!node)
    362         return false;
    363 
    364     LocalCurrentGraphicsContext localContext(paintInfo.context);
    365     wkDrawMediaUIPart(MediaReturnToRealtimeButton, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    366     return false;
    367 }
    368 
    369 bool RenderThemeMac::paintMediaControlsBackground(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    370 {
    371     Node* node = o->node();
    372     if (!node)
    373         return false;
    374 
    375     LocalCurrentGraphicsContext localContext(paintInfo.context);
    376     wkDrawMediaUIPart(MediaTimelineContainer, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    377     return false;
    378 }
    379 
    380 bool RenderThemeMac::paintMediaCurrentTime(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    381 {
    382     Node* node = o->node();
    383     if (!node)
    384         return false;
    385 
    386     ContextContainer cgContextContainer(paintInfo.context);
    387     GraphicsContextStateSaver stateSaver(*paintInfo.context);
    388     FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
    389     wkDrawMediaUIPart(MediaCurrentTimeDisplay, cgContextContainer.context(), unzoomedRect, getMediaUIPartStateFlags(node));
    390     return false;
    391 }
    392 
    393 bool RenderThemeMac::paintMediaTimeRemaining(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    394 {
    395     Node* node = o->node();
    396     if (!node)
    397         return false;
    398 
    399     ContextContainer cgContextContainer(paintInfo.context);
    400     GraphicsContextStateSaver stateSaver(*paintInfo.context);
    401     FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
    402     wkDrawMediaUIPart(MediaTimeRemainingDisplay, cgContextContainer.context(), unzoomedRect, getMediaUIPartStateFlags(node));
    403     return false;
    404 }
    405 
    406 bool RenderThemeMac::paintMediaVolumeSliderContainer(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    407 {
    408     Node* node = o->node();
    409     if (!node)
    410         return false;
    411 
    412     LocalCurrentGraphicsContext localContext(paintInfo.context);
    413     wkDrawMediaUIPart(MediaVolumeSliderContainer, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    414     return false;
    415 }
    416 
    417 bool RenderThemeMac::paintMediaVolumeSliderTrack(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    418 {
    419     Node* node = o->node();
    420     if (!node)
    421         return false;
    422 
    423     LocalCurrentGraphicsContext localContext(paintInfo.context);
    424     wkDrawMediaUIPart(MediaVolumeSlider, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    425     return false;
    426 }
    427 
    428 bool RenderThemeMac::paintMediaVolumeSliderThumb(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    429 {
    430     Node* node = o->node();
    431     if (!node)
    432         return false;
    433 
    434     LocalCurrentGraphicsContext localContext(paintInfo.context);
    435     wkDrawMediaUIPart(MediaVolumeSliderThumb, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    436     return false;
    437 }
    438 
    439 bool RenderThemeMac::paintMediaFullScreenVolumeSliderTrack(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    440 {
    441     Node* node = o->node();
    442     if (!node)
    443         return false;
    444 
    445     LocalCurrentGraphicsContext localContext(paintInfo.context);
    446     wkDrawMediaUIPart(MediaFullScreenVolumeSlider, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    447     return false;
    448 }
    449 
    450 bool RenderThemeMac::paintMediaFullScreenVolumeSliderThumb(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    451 {
    452     Node* node = o->node();
    453     if (!node)
    454         return false;
    455 
    456     LocalCurrentGraphicsContext localContext(paintInfo.context);
    457     wkDrawMediaUIPart(MediaFullScreenVolumeSliderThumb, localContext.cgContext(), r, getMediaUIPartStateFlags(node));
    458     return false;
    459 }
    460 
    461 String RenderThemeMac::extraMediaControlsStyleSheet()
    462 {
    463     return String(mediaControlsQuickTimeUserAgentStyleSheet, sizeof(mediaControlsQuickTimeUserAgentStyleSheet));
    464 }
    465 
    466 #if ENABLE(FULLSCREEN_API)
    467 String RenderThemeMac::extraFullScreenStyleSheet()
    468 {
    469     return String(fullscreenQuickTimeUserAgentStyleSheet, sizeof(fullscreenQuickTimeUserAgentStyleSheet));
    470 }
     187String RenderThemeMac::mediaControlsStyleSheet()
     188{
     189#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     190    return String(mediaControlsAppleUserAgentStyleSheet, sizeof(mediaControlsAppleUserAgentStyleSheet));
     191#else
     192    return emptyString();
    471193#endif
    472 
    473 IntPoint RenderThemeMac::volumeSliderOffsetFromMuteButton(RenderBox* muteButtonBox, const IntSize& size) const
    474 {
    475     return RenderMediaControls::volumeSliderOffsetFromMuteButton(muteButtonBox, size);
     194}
     195
     196String RenderThemeMac::mediaControlsScript()
     197{
     198#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     199    return String(mediaControlsAppleJavaScript, sizeof(mediaControlsAppleJavaScript));
     200#else
     201    return emptyString();
     202#endif
    476203}
    477204
     
    21321859        style->setHeight(Length(static_cast<int>(sliderThumbHeight * zoomLevel), Fixed));
    21331860    }
    2134 
    2135 #if ENABLE(VIDEO)
    2136     adjustMediaSliderThumbSize(style);
    2137 #endif
    21381861}
    21391862
  • trunk/Source/WebCore/rendering/RenderThemeWin.cpp

    r155454 r156546  
    10761076
    10771077#if ENABLE(VIDEO)
    1078 
    1079 String RenderThemeWin::extraMediaControlsStyleSheet()
    1080 {
    1081     return String(mediaControlsQuickTimeUserAgentStyleSheet, sizeof(mediaControlsQuickTimeUserAgentStyleSheet));
    1082 }
    1083 
    1084 #if ENABLE(FULLSCREEN_API)
    1085 String RenderThemeWin::extraFullScreenStyleSheet()
    1086 {
    1087     return String(fullscreenQuickTimeUserAgentStyleSheet, sizeof(fullscreenQuickTimeUserAgentStyleSheet));
    1088 }
     1078String RenderThemeWin::mediaControlsStyleSheet()
     1079{
     1080#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     1081    return String(mediaControlsAppleUserAgentStyleSheet, sizeof(mediaControlsAppleUserAgentStyleSheet));
     1082#else
     1083    return emptyString();
    10891084#endif
    1090 
    1091 bool RenderThemeWin::supportsClosedCaptioning() const
    1092 {
    1093     return true;
    1094 }
    1095 
    1096 bool RenderThemeWin::paintMediaFullscreenButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1097 {
    1098     return RenderMediaControls::paintMediaControlsPart(MediaEnterFullscreenButton, o, paintInfo, r);
    1099 }
    1100 
    1101 bool RenderThemeWin::paintMediaMuteButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1102 {
    1103     return RenderMediaControls::paintMediaControlsPart(MediaMuteButton, o, paintInfo, r);
    1104 }
    1105 
    1106 bool RenderThemeWin::paintMediaPlayButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1107 {
    1108     return RenderMediaControls::paintMediaControlsPart(MediaPlayButton, o, paintInfo, r);
    1109 }
    1110 
    1111 bool RenderThemeWin::paintMediaRewindButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1112 {
    1113     return RenderMediaControls::paintMediaControlsPart(MediaRewindButton, o, paintInfo, r);
    1114 }
    1115 
    1116 bool RenderThemeWin::paintMediaSeekBackButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1117 {
    1118     return RenderMediaControls::paintMediaControlsPart(MediaSeekBackButton, o, paintInfo, r);
    1119 }
    1120 
    1121 bool RenderThemeWin::paintMediaSeekForwardButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1122 {
    1123     return RenderMediaControls::paintMediaControlsPart(MediaSeekForwardButton, o, paintInfo, r);
    1124 }
    1125 
    1126 bool RenderThemeWin::paintMediaSliderTrack(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1127 {
    1128     return RenderMediaControls::paintMediaControlsPart(MediaSlider, o, paintInfo, r);
    1129 }
    1130 
    1131 bool RenderThemeWin::paintMediaSliderThumb(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1132 {
    1133     return RenderMediaControls::paintMediaControlsPart(MediaSliderThumb, o, paintInfo, r);
    1134 }
    1135 
    1136 bool RenderThemeWin::paintMediaControlsBackground(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1137 {
    1138     return RenderMediaControls::paintMediaControlsPart(MediaTimelineContainer, o, paintInfo, r);
    1139 }
    1140 
    1141 bool RenderThemeWin::paintMediaVolumeSliderContainer(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1142 {
    1143     return RenderMediaControls::paintMediaControlsPart(MediaVolumeSliderContainer, o, paintInfo, r);
    1144 }
    1145 
    1146 bool RenderThemeWin::paintMediaVolumeSliderTrack(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1147 {
    1148     return RenderMediaControls::paintMediaControlsPart(MediaVolumeSlider, o, paintInfo, r);
    1149 }
    1150 
    1151 bool RenderThemeWin::paintMediaVolumeSliderThumb(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
    1152 {
    1153     return RenderMediaControls::paintMediaControlsPart(MediaVolumeSliderThumb, o, paintInfo, r);
    1154 }
    1155 
    1156 IntPoint RenderThemeWin::volumeSliderOffsetFromMuteButton(RenderBox* muteButtonBox, const IntSize& size) const
    1157 {
    1158     return RenderMediaControls::volumeSliderOffsetFromMuteButton(muteButtonBox, size);
    1159 }
    1160 
     1085}
     1086
     1087String RenderThemeWin::mediaControlsScript()
     1088{
     1089#if ENABLE(MEDIA_CONTROLS_SCRIPT)
     1090    return String(mediaControlsAppleJavaScript, sizeof(mediaControlsAppleJavaScript));
     1091#else
     1092    return emptyString();
     1093#endif
     1094}
    11611095#endif
    11621096
  • trunk/Source/WebCore/rendering/RenderThemeWin.h

    r153845 r156546  
    124124
    125125#if ENABLE(VIDEO)
    126     virtual String extraMediaControlsStyleSheet();
    127 #if ENABLE(FULLSCREEN_API)
    128     virtual String extraFullScreenStyleSheet();
    129 #endif
    130     virtual bool supportsClosedCaptioning() const;
    131     virtual bool paintMediaControlsBackground(RenderObject*, const PaintInfo&, const IntRect&);
    132     virtual bool paintMediaFullscreenButton(RenderObject*, const PaintInfo&, const IntRect&);
    133     virtual bool paintMediaMuteButton(RenderObject*, const PaintInfo&, const IntRect&);
    134     virtual bool paintMediaPlayButton(RenderObject*, const PaintInfo&, const IntRect&);
    135     virtual bool paintMediaRewindButton(RenderObject*, const PaintInfo&, const IntRect&);
    136     virtual bool paintMediaSeekBackButton(RenderObject*, const PaintInfo&, const IntRect&);
    137     virtual bool paintMediaSeekForwardButton(RenderObject*, const PaintInfo&, const IntRect&);
    138     virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
    139     virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
    140     virtual bool paintMediaVolumeSliderContainer(RenderObject*, const PaintInfo&, const IntRect&);
    141     virtual bool paintMediaVolumeSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
    142     virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
    143     virtual IntPoint volumeSliderOffsetFromMuteButton(RenderBox*, const IntSize&) const OVERRIDE;
     126    virtual String mediaControlsStyleSheet() OVERRIDE;
     127    virtual String mediaControlsScript() OVERRIDE;
    144128#endif
    145129
  • trunk/Source/WebKit/mac/ChangeLog

    r156543 r156546  
     12013-09-06  Jer Noble  <jer.noble@apple.com>
     2
     3        [Mac] Implement the media controls in JavaScript.
     4        https://bugs.webkit.org/show_bug.cgi?id=120895
     5
     6        Reviewed by Dean Jackson.
     7
     8        Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
     9
     10        * Configurations/FeatureDefines.xcconfig:
     11
    1122013-09-27  Darin Adler  <darin@apple.com>
    213
  • trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig

    r156447 r156546  
    130130ENABLE_LINK_PREFETCH = ;
    131131ENABLE_MATHML = ENABLE_MATHML;
     132ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
    132133ENABLE_MEDIA_SOURCE = ;
    133134ENABLE_MEDIA_STATISTICS = ;
     
    188189ENABLE_FTL_JIT = ;
    189190
    190 FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_THREADED_HTML_PARSER) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
     191FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_THREADED_HTML_PARSER) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
  • trunk/Source/WebKit2/ChangeLog

    r156543 r156546  
     12013-09-06  Jer Noble  <jer.noble@apple.com>
     2
     3        [Mac] Implement the media controls in JavaScript.
     4        https://bugs.webkit.org/show_bug.cgi?id=120895
     5
     6        Reviewed by Dean Jackson.
     7
     8        Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
     9
     10        * Configurations/FeatureDefines.xcconfig:
     11
    1122013-09-27  Darin Adler  <darin@apple.com>
    213
  • trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig

    r156447 r156546  
    130130ENABLE_LINK_PREFETCH = ;
    131131ENABLE_MATHML = ENABLE_MATHML;
     132ENABLE_MEDIA_CONTROLS_SCRIPT = ENABLE_MEDIA_CONTROLS_SCRIPT;
    132133ENABLE_MEDIA_SOURCE = ;
    133134ENABLE_MEDIA_STATISTICS = ;
     
    188189ENABLE_FTL_JIT = ;
    189190
    190 FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_THREADED_HTML_PARSER) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
     191FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROMISES) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_THREADED_HTML_PARSER) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(FEATURE_DEFINES_$(PLATFORM_NAME));
Note: See TracChangeset for help on using the changeset viewer.