Changeset 164024 in webkit
- Timestamp:
- Feb 13, 2014 3:28:34 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 51 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r163970 r164024 1 2014-02-13 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 3 [GTK] MEDIA_CONTROLS_SCRIPT support 4 https://bugs.webkit.org/show_bug.cgi?id=123097 5 6 Reviewed by Jer Noble. 7 8 Part of the Autotools and CMake structure to build the media 9 controls script. 10 11 * Source/autotools/SetupWebKitFeatures.m4: Activated the media 12 controls script by default. 13 * Source/cmake/OptionsGTK.cmake: Activated the media controls 14 script by default. 15 * Source/cmake/WebKitFeatures.cmake: Created the option to 16 activate the controls script. 17 * Source/cmakeconfig.h.cmake: Created the define template the the 18 media controls script. 19 1 20 2014-02-12 Zan Dobersek <zdobersek@igalia.com> 2 21 -
trunk/LayoutTests/ChangeLog
r164019 r164024 1 2014-02-13 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 3 [GTK] MEDIA_CONTROLS_SCRIPT support 4 https://bugs.webkit.org/show_bug.cgi?id=123097 5 6 Reviewed by Jer Noble. 7 8 Tests infrastructure for the media controls script. 9 10 * media/click-volume-bar-not-pausing.html: 11 * media/media-volume-slider-rendered-normal.html: 12 * media/video-controls-captions-trackmenu-hide-on-click-outside.html: 13 * media/video-volume-slider.html: Fixed. 14 * platform/gtk-wk2/TestExpectations: Tests flagged. 15 * platform/gtk/TestExpectations: Changed tests flags. 16 * platform/gtk/accessibility/media-element-expected.txt: 17 * platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt: 18 * platform/gtk/fast/layers/video-layer-expected.txt: Rebaseline. 19 * platform/gtk/fullscreen/video-controls-override-expected.txt: Added. 20 * platform/gtk/http/tests/media/video-buffered-range-contains-currentTime-expected.png: 21 * platform/gtk/media/audio-controls-rendering-expected.png: 22 * platform/gtk/media/audio-controls-rendering-expected.txt: 23 * platform/gtk/media/audio-repaint-expected.txt: 24 * platform/gtk/media/controls-after-reload-expected.png: 25 * platform/gtk/media/controls-after-reload-expected.txt: 26 * platform/gtk/media/controls-strict-expected.png: 27 * platform/gtk/media/controls-strict-expected.txt: 28 * platform/gtk/media/controls-styling-strict-expected.png: 29 * platform/gtk/media/controls-styling-strict-expected.txt: 30 * platform/gtk/media/controls-without-preload-expected.png: 31 * platform/gtk/media/controls-without-preload-expected.txt: 32 * platform/gtk/media/video-controls-rendering-expected.png: 33 * platform/gtk/media/video-controls-rendering-expected.txt: 34 * platform/gtk/media/video-display-toggle-expected.png: 35 * platform/gtk/media/video-display-toggle-expected.txt: 36 * platform/gtk/media/video-empty-source-expected.txt: 37 * platform/gtk/media/video-no-audio-expected.png: 38 * platform/gtk/media/video-no-audio-expected.txt: 39 * platform/gtk/media/video-volume-slider-expected.png: 40 * platform/gtk/media/video-volume-slider-expected.txt: 41 * platform/gtk/media/video-zoom-controls-expected.png: 42 * platform/gtk/media/video-zoom-controls-expected.txt: 43 Rebaseline. 44 1 45 2014-02-12 Ryosuke Niwa <rniwa@webkit.org> 2 46 -
trunk/LayoutTests/media/click-volume-bar-not-pausing.html
r156699 r164024 71 71 } 72 72 73 internals.suspendAnimations(); // Volumebar can be animated and we would need a timeout to have it shown. 74 75 mediaElement.volume = 1; 76 73 77 waitForEventAndFail("error"); 74 78 waitForEventOnce('playing', playing); -
trunk/LayoutTests/media/media-volume-slider-rendered-normal.html
r120416 r164024 18 18 function init() 19 19 { 20 internals.suspendAnimations(); // Volumebar can be animated and we would need a timeout to have it shown. 20 21 video = document.getElementsByTagName("video")[0]; 21 22 video.src = findMediaFile("video", "content/test"); -
trunk/LayoutTests/media/video-controls-captions-trackmenu-hide-on-click-outside.html
r150371 r164024 45 45 video.src = findMediaFile('video', 'content/test'); 46 46 waitForEvent('canplaythrough', function () { startTrackMenuTest(startTest); }); 47 48 internals.suspendAnimations(); // Captions menu can be animated and allowing the animation can create flakyness. 47 49 } 48 50 </script> -
trunk/LayoutTests/media/video-volume-slider.html
r154941 r164024 11 11 if (window.testRunner) 12 12 testRunner.waitUntilDone(); 13 14 internals.suspendAnimations(); // Volumebar can be animated and we would need a timeout to have it shown. 13 15 14 16 video = document.getElementsByTagName("video")[0]; -
trunk/LayoutTests/platform/gtk-wk2/TestExpectations
r163749 r164024 475 475 Bug(GTK) fast/media/view-mode-media-feature.html [ ImageOnlyFailure ] 476 476 477 Bug(GTK) media/video-volume-slider.html [ ImageOnlyFailure ] 478 477 479 #//////////////////////////////////////////////////////////////////////////////////////// 478 480 # End of Tests failing -
trunk/LayoutTests/platform/gtk/TestExpectations
r164013 r164024 442 442 443 443 # New chromium based controls 444 webkit.org/b/107825 fullscreen/video-controls-drag.html [ Failure ]445 444 webkit.org/b/107825 media/audio-delete-while-step-button-clicked.html [ Failure ] 446 webkit.org/b/107825 media/media-volume-slider-rendered-below.html [ Failure ]447 445 webkit.org/b/107825 media/nodesFromRect-shadowContent.html [ Failure ] 448 446 webkit.org/b/107825 media/video-controls-fullscreen-volume.html [ Failure ] … … 994 992 995 993 # GTK is moving from toggle button to a menu of tracks. 996 webkit.org/b/101670 media/video-controls-captions-trackmenu.html [ Failure ]994 webkit.org/b/101670 media/video-controls-captions-trackmenu.html [ Timeout Failure ] 997 995 webkit.org/b/101670 media/track/track-user-preferences.html [ Failure ] 998 996 webkit.org/b/101670 media/video-controls-captions-trackmenu-includes-enabled-track.html [ Failure ] … … 1485 1483 1486 1484 webkit.org/b/124509 media/video-controls-captions-trackmenu-hide-on-click-outside.html [ Failure ] 1487 webkit.org/b/124509 media/video-controls-captions-trackmenu-hide-on-click.html [ Failure ]1485 webkit.org/b/124509 media/video-controls-captions-trackmenu-hide-on-click.html [ Timeout Failure ] 1488 1486 1489 1487 webkit.org/b/124566 fast/dom/SelectorAPI/resig-SelectorsAPI-test.xhtml [ Failure ] … … 1515 1513 1516 1514 webkit.org/b/126519 inspector-protocol/model/highlight-shape-outside-margin.html [ Failure ] 1517 1518 webkit.org/b/126520 media/click-volume-bar-not-pausing.html [ Failure ]1519 1515 1520 1516 webkit.org/b/126521 accessibility/menu-list-sends-change-notification.html [ Failure ] … … 1548 1544 # End of subpixel failures. 1549 1545 1546 # After webkit.org/b/123097 we flag these tests that also fail in mac 1547 webkit.org/b/123097 media/track/track-cue-mutable-text.html [ Failure ] 1548 webkit.org/b/123097 media/video-controls-captions-trackmenu-sorted.html [ Failure ] 1549 webkit.org/b/123097 media/video-controls-toggling.html [ Timeout ] 1550 1550 1551 #//////////////////////////////////////////////////////////////////////////////////////// 1551 1552 # End of Tests failing -
trunk/LayoutTests/platform/gtk/accessibility/media-element-expected.txt
r158841 r164024 10 10 11 11 12 description: AXDescription: video playback12 description: AXDescription: Video Playback 13 13 role: AXRole: AXToolbar 14 14 15 15 16 description: AXDescription: video playback17 role: AXRole: AX Toolbar16 description: AXDescription: Play 17 role: AXRole: AXButton 18 18 19 19 20 description: AXDescription: play21 role: AXRole: AXButton20 description: AXDescription: Duration 21 role: AXRole: AXSlider 22 22 23 23 24 description: AXDescription:25 role: AXRole: AXSlider24 description: AXDescription: Remaining 25 role: AXRole: AXTimer 26 26 27 27 28 description: AXDescription: enter fullscreen29 28 description: AXDescription: Display Full Screen 29 role: AXRole: AXButton 30 30 31 31 32 description: AXDescription: mute 33 role: AXRole: AXButton 32 description: AXDescription: Mute 33 role: AXRole: AXButton 34 35 36 description: AXDescription: Volume 37 role: AXRole: AXSlider 34 38 35 39 -
trunk/LayoutTests/platform/gtk/fast/hidpi/video-controls-in-hidpi-expected.txt
r148821 r164024 16 16 layer at (13,140) size 290x30 17 17 RenderFlexibleBox {DIV} at (5,5) size 290x30 [bgcolor=#141414CC] 18 RenderButton { INPUT} at (9,0) size 30x3018 RenderButton {BUTTON} at (9,0) size 30x30 19 19 RenderSlider {INPUT} at (49,11) size 179x8 [color=#E6E6E659] 20 20 RenderFlexibleBox {DIV} at (0,0) size 179x8 [border: (1px solid #E6E6E659)] -
trunk/LayoutTests/platform/gtk/fast/layers/video-layer-expected.txt
r148819 r164024 21 21 layer at (64,224) size 290x30 22 22 RenderFlexibleBox {DIV} at (5,5) size 290x30 [bgcolor=#141414CC] 23 RenderButton { INPUT} at (9,0) size 30x3023 RenderButton {BUTTON} at (9,0) size 30x30 24 24 RenderSlider {INPUT} at (49,11) size 179x8 [color=#E6E6E659] 25 25 RenderFlexibleBox {DIV} at (0,0) size 179x8 [border: (1px solid #E6E6E659)] -
trunk/LayoutTests/platform/gtk/media/audio-controls-rendering-expected.txt
r148815 r164024 20 20 layer at (8,41) size 300x30 21 21 RenderFlexibleBox {DIV} at (0,0) size 300x30 [bgcolor=#141414CC] 22 RenderButton { INPUT} at (9,0) size 30x3022 RenderButton {BUTTON} at (9,0) size 30x30 23 23 RenderSlider {INPUT} at (49,11) size 157x8 [color=#E6E6E659] 24 24 RenderFlexibleBox {DIV} at (0,0) size 157x8 [border: (1px solid #E6E6E659)] … … 28 28 RenderText {#text} at (0,7) size 32x15 29 29 text run at (0,7) width 32: "00:07" 30 RenderButton {INPUT} at (261,0) size 30x30 30 RenderFlexibleBox {DIV} at (261,0) size 30x30 31 RenderButton {BUTTON} at (0,0) size 30x30 31 32 layer at (8,88) size 320x30 32 33 RenderFlexibleBox {DIV} at (0,0) size 320x30 … … 34 35 layer at (8,88) size 320x30 35 36 RenderFlexibleBox {DIV} at (0,0) size 320x30 [bgcolor=#141414CC] 36 RenderButton { INPUT} at (9,0) size 30x3037 RenderButton {BUTTON} at (9,0) size 30x30 37 38 RenderSlider {INPUT} at (49,11) size 177x8 [color=#E6E6E659] 38 39 RenderFlexibleBox {DIV} at (0,0) size 177x8 [border: (1px solid #E6E6E659)] … … 42 43 RenderText {#text} at (0,7) size 32x15 43 44 text run at (0,7) width 32: "00:07" 44 RenderButton {INPUT} at (281,0) size 30x30 45 RenderFlexibleBox {DIV} at (281,0) size 30x30 46 RenderButton {BUTTON} at (0,0) size 30x30 45 47 layer at (8,135) size 320x100 46 48 RenderMedia {AUDIO} at (8,135) size 320x100 [bgcolor=#0000FF] … … 50 52 layer at (8,205) size 320x30 51 53 RenderFlexibleBox {DIV} at (0,0) size 320x30 [bgcolor=#141414CC] 52 RenderButton { INPUT} at (9,0) size 30x3054 RenderButton {BUTTON} at (9,0) size 30x30 53 55 RenderSlider {INPUT} at (49,11) size 177x8 [color=#E6E6E659] 54 56 RenderFlexibleBox {DIV} at (0,0) size 177x8 [border: (1px solid #E6E6E659)] … … 58 60 RenderText {#text} at (0,7) size 32x15 59 61 text run at (0,7) width 32: "00:07" 60 RenderButton {INPUT} at (281,0) size 30x30 62 RenderFlexibleBox {DIV} at (281,0) size 30x30 63 RenderButton {BUTTON} at (0,0) size 30x30 -
trunk/LayoutTests/platform/gtk/media/audio-repaint-expected.txt
r148815 r164024 20 20 layer at (8,71) size 300x30 21 21 RenderFlexibleBox {DIV} at (0,0) size 300x30 [bgcolor=#141414CC] 22 RenderButton { INPUT} at (9,0) size 30x3022 RenderButton {BUTTON} at (9,0) size 30x30 23 23 RenderSlider {INPUT} at (49,11) size 115x8 [color=#E6E6E659] 24 24 RenderFlexibleBox {DIV} at (0,0) size 115x8 [border: (1px solid #E6E6E659)] … … 28 28 RenderText {#text} at (0,7) size 74x15 29 29 text run at (0,7) width 74: "00:00 / 00:01" 30 RenderButton {INPUT} at (261,0) size 30x30 30 RenderFlexibleBox {DIV} at (261,0) size 30x30 31 RenderButton {BUTTON} at (0,0) size 30x30 31 32 layer at (8,41) size 300x30 32 33 RenderFlexibleBox {DIV} at (0,0) size 300x30 … … 34 35 layer at (8,41) size 300x30 35 36 RenderFlexibleBox {DIV} at (0,0) size 300x30 [bgcolor=#141414CC] 36 RenderButton { INPUT} at (9,0) size 30x3037 RenderButton {BUTTON} at (9,0) size 30x30 37 38 RenderSlider {INPUT} at (49,11) size 115x8 [color=#E6E6E659] 38 39 RenderFlexibleBox {DIV} at (0,0) size 115x8 [border: (1px solid #E6E6E659)] … … 42 43 RenderText {#text} at (0,7) size 74x15 43 44 text run at (0,7) width 74: "00:00 / 00:01" 44 RenderButton {INPUT} at (261,0) size 30x30 45 RenderFlexibleBox {DIV} at (261,0) size 30x30 46 RenderButton {BUTTON} at (0,0) size 30x30 45 47 layer at (8,153) size 300x30 46 48 RenderMedia {AUDIO} at (0,112) size 300x30 … … 50 52 layer at (8,153) size 300x30 51 53 RenderFlexibleBox {DIV} at (0,0) size 300x30 [bgcolor=#141414CC] 52 RenderButton { INPUT} at (9,0) size 30x3054 RenderButton {BUTTON} at (9,0) size 30x30 53 55 RenderSlider {INPUT} at (49,11) size 115x8 [color=#E6E6E659] 54 56 RenderFlexibleBox {DIV} at (0,0) size 115x8 [border: (1px solid #E6E6E659)] … … 58 60 RenderText {#text} at (0,7) size 74x15 59 61 text run at (0,7) width 74: "00:00 / 00:01" 60 RenderButton {INPUT} at (261,0) size 30x30 62 RenderFlexibleBox {DIV} at (261,0) size 30x30 63 RenderButton {BUTTON} at (0,0) size 30x30 -
trunk/LayoutTests/platform/gtk/media/controls-after-reload-expected.txt
r148815 r164024 16 16 layer at (13,246) size 310x30 17 17 RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC] 18 RenderButton { INPUT} at (9,0) size 30x3018 RenderButton {BUTTON} at (9,0) size 30x30 19 19 RenderSlider {INPUT} at (49,11) size 93x8 [color=#E6E6E659] 20 20 RenderFlexibleBox {DIV} at (0,0) size 93x8 [border: (1px solid #E6E6E659)] … … 24 24 RenderText {#text} at (0,7) size 74x15 25 25 text run at (0,7) width 74: "00:00 / 00:06" 26 RenderButton {INPUT} at (239,0) size 30x30 27 RenderButton {INPUT} at (271,0) size 30x30 26 RenderButton {BUTTON} at (239,0) size 30x30 27 RenderFlexibleBox {DIV} at (271,0) size 30x30 28 RenderButton {BUTTON} at (0,0) size 30x30 -
trunk/LayoutTests/platform/gtk/media/controls-strict-expected.txt
r148815 r164024 16 16 layer at (13,254) size 310x30 17 17 RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC] 18 RenderButton { INPUT} at (9,0) size 30x3018 RenderButton {BUTTON} at (9,0) size 30x30 19 19 RenderSlider {INPUT} at (49,11) size 93x8 [color=#E6E6E659] 20 20 RenderFlexibleBox {DIV} at (0,0) size 93x8 [border: (1px solid #E6E6E659)] … … 24 24 RenderText {#text} at (0,7) size 74x15 25 25 text run at (0,7) width 74: "00:00 / 00:06" 26 RenderButton {INPUT} at (239,0) size 30x30 27 RenderButton {INPUT} at (271,0) size 30x30 26 RenderButton {BUTTON} at (239,0) size 30x30 27 RenderFlexibleBox {DIV} at (271,0) size 30x30 28 RenderButton {BUTTON} at (0,0) size 30x30 -
trunk/LayoutTests/platform/gtk/media/controls-styling-strict-expected.txt
r148815 r164024 20 20 layer at (13,254) size 310x30 21 21 RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC] 22 RenderButton { INPUT} at (9,0) size 30x3022 RenderButton {BUTTON} at (9,0) size 30x30 23 23 RenderSlider {INPUT} at (49,11) size 93x8 [color=#E6E6E659] 24 24 RenderFlexibleBox {DIV} at (0,0) size 93x8 [border: (1px solid #E6E6E659)] … … 28 28 RenderText {#text} at (0,7) size 74x15 29 29 text run at (0,7) width 74: "00:00 / 00:06" 30 RenderButton {INPUT} at (239,0) size 30x30 31 RenderButton {INPUT} at (271,0) size 30x30 30 RenderButton {BUTTON} at (239,0) size 30x30 31 RenderFlexibleBox {DIV} at (271,0) size 30x30 32 RenderButton {BUTTON} at (0,0) size 30x30 32 33 layer at (332,49) size 320x240 33 34 RenderFlexibleBox {DIV} at (0,0) size 320x240 … … 35 36 layer at (337,254) size 310x30 36 37 RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC] 37 RenderButton { INPUT} at (9,0) size 30x3038 RenderButton {BUTTON} at (9,0) size 30x30 38 39 RenderSlider {INPUT} at (49,11) size 93x8 [color=#E6E6E659] 39 40 RenderFlexibleBox {DIV} at (0,0) size 93x8 [border: (1px solid #E6E6E659)] … … 43 44 RenderText {#text} at (0,7) size 74x15 44 45 text run at (0,7) width 74: "00:00 / 00:06" 45 RenderButton {INPUT} at (239,0) size 30x30 46 RenderButton {INPUT} at (271,0) size 30x30 46 RenderButton {BUTTON} at (239,0) size 30x30 47 RenderFlexibleBox {DIV} at (271,0) size 30x30 48 RenderButton {BUTTON} at (0,0) size 30x30 -
trunk/LayoutTests/platform/gtk/media/controls-without-preload-expected.txt
r148815 r164024 16 16 layer at (13,246) size 310x30 17 17 RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC] 18 RenderButton { INPUT} at (9,0) size 30x3018 RenderButton {BUTTON} at (9,0) size 30x30 19 19 RenderSlider {INPUT} at (49,11) size 93x8 [color=#E6E6E659] 20 20 RenderFlexibleBox {DIV} at (0,0) size 93x8 [border: (1px solid #E6E6E659)] … … 24 24 RenderText {#text} at (0,7) size 74x15 25 25 text run at (0,7) width 74: "00:00 / 00:06" 26 RenderButton {INPUT} at (239,0) size 30x30 27 RenderButton {INPUT} at (271,0) size 30x30 26 RenderButton {BUTTON} at (239,0) size 30x30 27 RenderFlexibleBox {DIV} at (271,0) size 30x30 28 RenderButton {BUTTON} at (0,0) size 30x30 -
trunk/LayoutTests/platform/gtk/media/video-controls-rendering-expected.txt
r148815 r164024 21 21 layer at (13,246) size 310x30 22 22 RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC] 23 RenderButton { INPUT} at (9,0) size 30x3023 RenderButton {BUTTON} at (9,0) size 30x30 24 24 RenderSlider {INPUT} at (49,11) size 93x8 [color=#E6E6E659] 25 25 RenderFlexibleBox {DIV} at (0,0) size 93x8 [border: (1px solid #E6E6E659)] … … 29 29 RenderText {#text} at (0,7) size 74x15 30 30 text run at (0,7) width 74: "00:00 / 00:06" 31 RenderButton {INPUT} at (239,0) size 30x30 32 RenderButton {INPUT} at (271,0) size 30x30 31 RenderButton {BUTTON} at (239,0) size 30x30 32 RenderFlexibleBox {DIV} at (271,0) size 30x30 33 RenderButton {BUTTON} at (0,0) size 30x30 33 34 layer at (8,281) size 320x240 34 35 RenderFlexibleBox {DIV} at (0,0) size 320x240 … … 36 37 layer at (13,486) size 310x30 37 38 RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC] 38 RenderButton { INPUT} at (9,0) size 30x3039 RenderButton {BUTTON} at (9,0) size 30x30 39 40 RenderSlider {INPUT} at (49,11) size 93x8 [color=#E6E6E659] 40 41 RenderFlexibleBox {DIV} at (0,0) size 93x8 [border: (1px solid #E6E6E659)] … … 44 45 RenderText {#text} at (0,7) size 74x15 45 46 text run at (0,7) width 74: "00:00 / 00:06" 46 RenderButton {INPUT} at (239,0) size 30x30 47 RenderButton {INPUT} at (271,0) size 30x30 47 RenderButton {BUTTON} at (239,0) size 30x30 48 RenderFlexibleBox {DIV} at (271,0) size 30x30 49 RenderButton {BUTTON} at (0,0) size 30x30 48 50 layer at (8,521) size 320x240 49 51 RenderVideo {VIDEO} at (8,521) size 320x240 … … 53 55 layer at (13,726) size 310x30 54 56 RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC] 55 RenderButton { INPUT} at (9,0) size 30x3057 RenderButton {BUTTON} at (9,0) size 30x30 56 58 RenderSlider {INPUT} at (49,11) size 93x8 [color=#E6E6E659] 57 59 RenderFlexibleBox {DIV} at (0,0) size 93x8 [border: (1px solid #E6E6E659)] … … 61 63 RenderText {#text} at (0,7) size 74x15 62 64 text run at (0,7) width 74: "00:00 / 00:06" 63 RenderButton {INPUT} at (239,0) size 30x30 64 RenderButton {INPUT} at (271,0) size 30x30 65 RenderButton {BUTTON} at (239,0) size 30x30 66 RenderFlexibleBox {DIV} at (271,0) size 30x30 67 RenderButton {BUTTON} at (0,0) size 30x30 -
trunk/LayoutTests/platform/gtk/media/video-display-toggle-expected.txt
r148815 r164024 15 15 layer at (13,230) size 310x30 16 16 RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC] 17 RenderButton { INPUT} at (9,0) size 30x3017 RenderButton {BUTTON} at (9,0) size 30x30 18 18 RenderSlider {INPUT} at (49,11) size 135x8 [color=#E6E6E659] 19 19 RenderFlexibleBox {DIV} at (0,0) size 135x8 [border: (1px solid #E6E6E659)] … … 23 23 RenderText {#text} at (0,7) size 32x15 24 24 text run at (0,7) width 32: "00:06" 25 RenderButton {INPUT} at (239,0) size 30x30 26 RenderButton {INPUT} at (271,0) size 30x30 25 RenderButton {BUTTON} at (239,0) size 30x30 26 RenderFlexibleBox {DIV} at (271,0) size 30x30 27 RenderButton {BUTTON} at (0,0) size 30x30 -
trunk/LayoutTests/platform/gtk/media/video-empty-source-expected.txt
r148815 r164024 16 16 layer at (14,157) size 290x30 17 17 RenderFlexibleBox {DIV} at (5,5) size 290x30 [bgcolor=#141414CC] 18 RenderButton { INPUT} at (9,0) size 30x3018 RenderButton {BUTTON} at (9,0) size 30x30 19 19 RenderSlider {INPUT} at (49,11) size 179x8 [color=#E6E6E659] 20 20 RenderFlexibleBox {DIV} at (0,0) size 179x8 [border: (1px solid #E6E6E659)] -
trunk/LayoutTests/platform/gtk/media/video-no-audio-expected.txt
r148815 r164024 16 16 layer at (13,294) size 342x30 17 17 RenderFlexibleBox {DIV} at (5,5) size 342x30 [bgcolor=#141414CC] 18 RenderButton { INPUT} at (9,0) size 30x3018 RenderButton {BUTTON} at (9,0) size 30x30 19 19 RenderSlider {INPUT} at (49,11) size 199x8 [color=#E6E6E659] 20 20 RenderFlexibleBox {DIV} at (0,0) size 199x8 [border: (1px solid #E6E6E659)] … … 24 24 RenderText {#text} at (0,7) size 32x15 25 25 text run at (0,7) width 32: "00:09" 26 RenderButton { INPUT} at (303,0) size 30x3026 RenderButton {BUTTON} at (303,0) size 30x30 -
trunk/LayoutTests/platform/gtk/media/video-volume-slider-expected.txt
r154941 r164024 7 7 text run at (0,0) width 433: "Tests if the volume slider is rendererd properly. This test assumes the" 8 8 RenderBR {BR} at (433,14) size 0x0 9 RenderText {#text} at (0,1 7) size 453x1710 text run at (0,1 7) width 453: "volume slider is implemented and mouse over the right bottom corner of"11 RenderBR {BR} at (453,3 1) size 0x012 RenderText {#text} at (0,3 4) size 270x1713 text run at (0,3 4) width 270: "video element will show the volume slider."14 RenderBR {BR} at (270, 48) size 0x09 RenderText {#text} at (0,18) size 453x17 10 text run at (0,18) width 453: "volume slider is implemented and mouse over the right bottom corner of" 11 RenderBR {BR} at (453,32) size 0x0 12 RenderText {#text} at (0,36) size 270x17 13 text run at (0,36) width 270: "video element will show the volume slider." 14 RenderBR {BR} at (270,50) size 0x0 15 15 RenderText {#text} at (0,0) size 0x0 16 layer at (8, 59) size 320x24017 RenderVideo {VIDEO} at (0,5 1) size 320x24018 layer at (8, 59) size 320x24016 layer at (8,62) size 320x240 17 RenderVideo {VIDEO} at (0,54) size 320x240 18 layer at (8,62) size 320x240 19 19 RenderFlexibleBox {DIV} at (0,0) size 320x240 20 20 RenderBlock {DIV} at (0,200) size 320x40 21 layer at (13,26 4) size 310x3021 layer at (13,267) size 310x30 22 22 RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC] 23 RenderButton { INPUT} at (9,0) size 30x3023 RenderButton {BUTTON} at (9,0) size 30x30 24 24 RenderSlider {INPUT} at (49,11) size 135x8 [color=#E6E6E659] 25 25 RenderFlexibleBox {DIV} at (0,0) size 135x8 [border: (1px solid #E6E6E659)] … … 29 29 RenderText {#text} at (0,7) size 32x15 30 30 text run at (0,7) width 32: "00:06" 31 RenderButton {INPUT} at (239,0) size 30x30 32 RenderButton {INPUT} at (271,0) size 30x30 33 layer at (284,164) size 30x100 34 RenderBlock (positioned) zI: 2 {DIV} at (271,-100) size 30x100 31 RenderButton {BUTTON} at (239,0) size 30x30 32 RenderFlexibleBox {DIV} at (271,0) size 30x30 33 RenderButton {BUTTON} at (0,0) size 30x30 34 layer at (284,167) size 30x100 35 RenderBlock (positioned) zI: 2 {DIV} at (271,-100) size 30x100 [bgcolor=#141414CC] 35 36 RenderSlider {INPUT} at (11,10) size 8x80 [color=#E6E6E659] 36 37 RenderFlexibleBox {DIV} at (0,0) size 8x80 [border: (1px solid #E6E6E659)] 37 38 RenderBlock {DIV} at (-2,-6) size 12x92 38 RenderBlock {DIV} at (0,24) size 12x1 3[color=#FFFFFF]39 RenderBlock {DIV} at (0,24) size 12x12 [color=#FFFFFF] -
trunk/LayoutTests/platform/gtk/media/video-zoom-controls-expected.txt
r148815 r164024 14 14 layer at (65,211) size 225x45 15 15 RenderFlexibleBox {DIV} at (7,7) size 226x46 [bgcolor=#141414CC] 16 RenderButton { INPUT} at (13,0) size 46x4516 RenderButton {BUTTON} at (13,0) size 46x45 17 17 RenderSlider {INPUT} at (73,16) size 38x13 [color=#E6E6E659] 18 18 RenderFlexibleBox {DIV} at (0,0) size 38x12 [border: (1px solid #E6E6E659)] … … 22 22 RenderText {#text} at (0,11) size 108x22 23 23 text run at (0,11) width 108: "00:00 / 00:06" 24 RenderButton {INPUT} at (253,0) size 46x45 25 RenderButton {INPUT} at (301,0) size 46x45 24 RenderButton {BUTTON} at (253,0) size 46x45 25 RenderFlexibleBox {DIV} at (301,0) size 46x45 26 RenderButton {BUTTON} at (0,0) size 45x45 26 27 layer at (57,308) size 240x180 27 28 RenderVideo {VIDEO} at (45,296) size 240x180 … … 31 32 layer at (65,436) size 225x45 32 33 RenderFlexibleBox {DIV} at (7,7) size 226x46 [bgcolor=#141414CC] 33 RenderButton { INPUT} at (13,0) size 46x4534 RenderButton {BUTTON} at (13,0) size 46x45 34 35 RenderSlider {INPUT} at (73,16) size 38x13 [color=#E6E6E659] 35 36 RenderFlexibleBox {DIV} at (0,0) size 38x12 [border: (1px solid #E6E6E659)] … … 39 40 RenderText {#text} at (0,11) size 108x22 40 41 text run at (0,11) width 108: "00:00 / 00:06" 41 RenderButton {INPUT} at (253,0) size 46x45 42 RenderButton {INPUT} at (301,0) size 46x45 42 RenderButton {BUTTON} at (253,0) size 46x45 43 RenderFlexibleBox {DIV} at (301,0) size 46x45 44 RenderButton {BUTTON} at (0,0) size 45x45 -
trunk/Source/WebCore/CMakeLists.txt
r163987 r164024 7 7 "${WEBCORE_DIR}/Modules/indexeddb/leveldb" 8 8 "${WEBCORE_DIR}/Modules/indieui" 9 "${WEBCORE_DIR}/Modules/mediacontrols/" 9 10 "${WEBCORE_DIR}/Modules/mediasource" 10 11 "${WEBCORE_DIR}/Modules/mediastream" … … 185 186 Modules/indexeddb/IDBVersionChangeEvent.idl 186 187 Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl 188 189 Modules/mediacontrols/MediaControlsHost.idl 187 190 188 191 Modules/mediasource/DOMURLMediaSource.idl … … 832 835 Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp 833 836 837 Modules/mediacontrols/MediaControlsHost.cpp 838 834 839 Modules/mediasource/DOMURLMediaSource.cpp 835 840 Modules/mediasource/MediaSource.cpp … … 2984 2989 set(IDL_ATTRIBUTES_FILE ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt) 2985 2990 2986 include(${WEBCORE_DIR}/UseJSC.cmake)2987 2988 2991 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() 2989 2992 … … 3134 3137 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/css/StyleResolver.cpp UserAgentStyleSheetsData.cpp UserAgentStyleSheets.h) 3135 3138 3139 if (WebCore_USER_AGENT_SCRIPTS) 3140 # Necessary variables: 3141 # WebCore_USER_AGENT_SCRIPTS containing the JavaScript sources list 3142 # WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES containing the source file that will load the scripts to add the proper 3143 # dependency and having them built at the right moment 3144 3145 add_custom_command( 3146 OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentScriptsData.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentScripts.h 3147 MAIN_DEPENDENCY ${WEBCORE_DIR}/Scripts/make-js-file-arrays.py 3148 DEPENDS ${WebCore_USER_AGENT_SCRIPTS} 3149 COMMAND "PYTHONPATH=${WebCore_INSPECTOR_SCRIPTS_DIR}" ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/Scripts/make-js-file-arrays.py ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentScripts.h ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentScriptsData.cpp ${WebCore_USER_AGENT_SCRIPTS} 3150 VERBATIM) 3151 list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentScriptsData.cpp) 3152 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES} UserAgentScriptsData.cpp UserAgentScripts.h) 3153 endif () 3154 3136 3155 # Generate plug-in resources 3137 3156 add_custom_command( … … 3152 3171 3153 3172 3173 include(${WEBCORE_DIR}/UseJSC.cmake) 3154 3174 3155 3175 ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES(${WEBCORE_DIR}/html/HTMLTreeBuilder.cpp MathMLNames.cpp) -
trunk/Source/WebCore/ChangeLog
r164008 r164024 1 2014-02-13 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 3 [GTK] MEDIA_CONTROLS_SCRIPT support 4 https://bugs.webkit.org/show_bug.cgi?id=123097 5 6 Reviewed by Jer Noble. 7 8 WebKitGTK+ multimedia controls are now managed from Javascript 9 code. Apple controls are kept as common code and GTK+ ones are 10 subclassed for the specific behavior. 11 12 Both CMake and Autotools build support is provided. 13 14 * CMakeLists.txt: Added support to build the media controls 15 script and their associated files. 16 * GNUmakefile.am: Added support to generate the C++ code from the 17 Javascript. 18 * GNUmakefile.list.am: Added the media controls script associated 19 files. 20 * Modules/mediacontrols/MediaControlsHost.cpp: 21 * Modules/mediacontrols/MediaControlsHost.h: 22 * Modules/mediacontrols/MediaControlsHost.idl: 23 (WebCore::MediaControlsHost::supportsFullscreen): Added attribute 24 to know if the element supports fullscreen. 25 * Modules/mediacontrols/mediaControlsApple.js: 26 (Controller.prototype.handleWrapperMouseMove): 27 (Controller.prototype.handleWrapperMouseOut): 28 (Controller.prototype.updatePlaying): Use clear and 29 resetHideControlsTimer. 30 (Controller.prototype.clearHideControlsTimer): Added. 31 (Controller.prototype.resetHideControlsTimer): Added. 32 * Modules/mediacontrols/mediaControlsGtk.js: Added. 33 (createControls): Calls ControllerGtk. 34 (ControllerGtk): Calls the superclass. 35 (contains): Defines a function to know if an object is contained 36 in an array. 37 (ControllerGtk.prototype.inheritFrom): Copies the method of the 38 superclass that are not reimplemented in the subclass. 39 (ControllerGtk.prototype.createControls): Calls the superclass and 40 create the remaining needed elements. 41 (ControllerGtk.prototype.configureInlineControls): Configures the 42 controls. 43 (ControllerGtk.prototype.setStatusHidden): Redefined empty. 44 (ControllerGtk.prototype.updateTime): Writes the duration and 45 current position. As it was so far, current time also includes 46 duration. If current time is bigger than 0 we show that. 47 (ControllerGtk.prototype.showCurrentTime): Shows current time and 48 hides duration label (that is included in current time). 49 (ControllerGtk.prototype.handlePlay): Calls the superclass and 50 force showing the current time. 51 (ControllerGtk.prototype.handleTimeUpdate): Always update the 52 time. 53 (ControllerGtk.prototype.handleMuteButtonMouseOver): Shows the 54 volume slider. 55 (ControllerGtk.prototype.handleVolumeBoxMouseOut): Hides the 56 volume slider. 57 (ControllerGtk.prototype.addControls): Adds the enclosure instead 58 of the panel directly. Panel is, of course, part of the enclosure. 59 (ControllerGtk.prototype.updateReadyState): Shows the fullscreen 60 button only if fullscreen is supported. Sets the volume in up or 61 down mode depending on its position in the document. Updates the 62 volume. 63 (ControllerGtk.prototype.setControlsType): Creates the controls it 64 they were not created before. Unlike Apple ones, WebKitGTK+ 65 fullscreen and inline controls are the same. 66 (ControllerGtk.prototype.updatePlaying): Calls the superclass and 67 shows the controls if not playing. 68 (ControllerGtk.prototype.handleCaptionButtonClicked): Redefined 69 empty. To be coherent with volume, that also shows a popup, this 70 is handled with mouseover instead of click. 71 (ControllerGtk.prototype.buildCaptionMenu): Calls the superclass 72 to build the menu, sets some listeners, centers the popup with the 73 captions button, keeps the current height and sets the style to 0, 74 which is needed to animate it. 75 (ControllerGtk.prototype.destroyCaptionMenu): Hides the caption menu. 76 (ControllerGtk.prototype.showCaptionMenu): Resets the height to 77 its original. We don't animate it with CSS because we would need 78 to specify a height in the style and we don't know it in advance. 79 (ControllerGtk.prototype.hideCaptionMenu): Sets height to 0. 80 (ControllerGtk.prototype.captionMenuTransitionEnd): When the 81 captions menu transtition ends, it is destroyed. 82 (ControllerGtk.prototype.handleCaptionButtonMouseOver): Creates 83 the caption menu and shows it. 84 (ControllerGtk.prototype.handleCaptionButtonMouseOut): Hides the 85 captions menu. 86 (ControllerGtk.prototype.handleCaptionMouseOut): Hides the 87 captions menu. 88 * PlatformGTK.cmake: Added WebCore to the target link libraries 89 and initialized the variables needed at CMakelists.txt 90 * css/mediaControlsGtk.css: 91 (audio::-webkit-media-controls-panel) 92 (video::-webkit-media-controls-panel): Added transtion based on opacity. 93 (video::-webkit-media-controls-panel): Set video opacity to 0. 94 (video::-webkit-media-controls-panel.paused): Set video opacity to 1. 95 (audio::-webkit-media-controls-panel div.mute-box): Set the same 96 style as the mute button to preserve the layout. 97 (audio::-webkit-media-controls-panel div.mute-box.hidden): Sets 98 the display to none. 99 (audio::-webkit-media-controls-mute-button) 100 (video::-webkit-media-controls-mute-button): Removed the outline 101 and the margin that is managed by the mute box now. 102 (audio::-webkit-media-controls-play-button) 103 (video::-webkit-media-controls-play-button): Removed the outline. 104 (audio::-webkit-media-controls-time-remaining-display) 105 (video::-webkit-media-controls-time-remaining-display): Removed 106 the display. 107 (audio::-webkit-media-controls-current-time-display) 108 (video::-webkit-media-controls-current-time-display): Added the 109 display block. 110 (video::-webkit-media-controls-time-remaining-display): Set 111 display none. 112 (video::-webkit-media-controls-time-remaining-display.show): Set 113 display block. 114 (video::-webkit-media-controls-time-remaining-display.hidden): Set 115 display none. 116 (audio::-webkit-media-controls-timeline) 117 (video::-webkit-media-controls-timeline): Removed outline. 118 (audio::-webkit-media-controls-volume-slider-container) 119 (video::-webkit-media-controls-volume-slider-container): Set 120 overflow hidden and set a transition by height. 121 (video::-webkit-media-controls-volume-slider-container.hidden): 122 Set height 0. 123 (video::-webkit-media-controls-volume-slider-container.down): Set 124 bottom to be below the panel. Changed the border radius and 125 transition accordingly. 126 (video::-webkit-media-controls-panel .hidden.down): Sets default 127 bottom as 0. 128 (audio::-webkit-media-controls-volume-slider) 129 (video::-webkit-media-controls-volume-slider): Removed the outline. 130 (audio::-webkit-media-controls-toggle-closed-captions-button) 131 (video::-webkit-media-controls-toggle-closed-captions-button): 132 Removed the background that is painted from C++ and removed the 133 outline. 134 (video::-webkit-media-controls-closed-captions-container): 135 (video::-webkit-media-controls-closed-captions-container h3): 136 (video::-webkit-media-controls-closed-captions-container ul): 137 (video::-webkit-media-controls-closed-captions-container li): 138 (video::-webkit-media-controls-closed-captions-container li.selected): Changed 139 the style to make it more coherent with the rest of the controls. 140 (audio::-webkit-media-controls-fullscreen-button) 141 (video::-webkit-media-controls-fullscreen-button): Removed the outline. 142 (audio::-webkit-media-controls-panel button.hidden): Sets the 143 display to none. 144 * html/HTMLMediaElement.cpp: UserAgentScripts.h is not needed here 145 and build cmake build would need for changes to get this compiled. 146 * platform/gtk/RenderThemeGtk.cpp: 147 (WebCore::nodeHasPseudo): Added. Checks if a node has a certain 148 pseudo. 149 (WebCore::nodeHasClass): Added. Checks if a node has a certain 150 class. 151 (WebCore::supportsFocus): Removed some element types as outline is 152 now handled in CSS. 153 (WebCore::RenderThemeGtk::paintMediaPlayButton): Checks if the 154 play button has the class paused to show the play icon instead of 155 the pause one. 156 (WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton): 157 Added. Paints the captions icon. 158 (WebCore::RenderThemeGtk::mediaControlsScript): Added. Loads the 159 bundled scripts. 160 * platform/gtk/RenderThemeGtk.h: Added the mediaControlsScript 161 method and declared the redefinition of the method to play the 162 captions icon. 163 1 164 2014-02-11 Alexey Proskuryakov <ap@apple.com> 2 165 -
trunk/Source/WebCore/GNUmakefile.am
r163568 r164024 16 16 -I$(srcdir)/Source/WebCore/Modules/indexeddb/leveldb \ 17 17 -I$(srcdir)/Source/WebCore/Modules/indieui \ 18 -I$(srcdir)/Source/WebCore/Modules/mediacontrols \ 18 19 -I$(srcdir)/Source/WebCore/Modules/mediasource \ 19 20 -I$(srcdir)/Source/WebCore/Modules/mediastream \ … … 265 266 $(AM_V_at)perl -I $(WebCore)/bindings/scripts $(WebCore)/css/makegrammar.pl --extraDefines "$(feature_defines)" --outputDir $(GENSOURCES_WEBCORE) --bison "$(BISON)" --symbolsPrefix cssyy $< 266 267 268 USER_AGENT_SCRIPT_FILES = $(WebCore)/Modules/mediacontrols/mediaControlsApple.js $(WebCore)/Modules/mediacontrols/mediaControlsGtk.js 269 DerivedSources/WebCore/UserAgentScriptsData.cpp: DerivedSources/WebCore/UserAgentScripts.h 270 DerivedSources/WebCore/UserAgentScripts.h: PYTHONPATH=$(INSPECTOR_SCRIPTS_DIR) 271 DerivedSources/WebCore/UserAgentScripts.h: $(WebCore)/Scripts/make-js-file-arrays.py $(USER_AGENT_SCRIPT_FILES) 272 $(AM_V_GEN)$(PYTHON) $< $@ DerivedSources/WebCore/UserAgentScriptsData.cpp $(USER_AGENT_SCRIPT_FILES) 273 267 274 # user agent style sheets 268 275 USER_AGENT_STYLE_SHEETS = \ … … 399 406 $(WebCore)/Modules/geolocation \ 400 407 $(WebCore)/Modules/indexeddb \ 408 $(WebCore)/Modules/mediacontrols \ 401 409 $(WebCore)/Modules/mediasource \ 402 410 $(WebCore)/Modules/mediastream \ -
trunk/Source/WebCore/GNUmakefile.list.am
r163987 r164024 464 464 DerivedSources/WebCore/JSMediaController.cpp \ 465 465 DerivedSources/WebCore/JSMediaController.h \ 466 DerivedSources/WebCore/JSMediaControlsHost.cpp \ 467 DerivedSources/WebCore/JSMediaControlsHost.h \ 466 468 DerivedSources/WebCore/JSMediaElementAudioSourceNode.cpp \ 467 469 DerivedSources/WebCore/JSMediaElementAudioSourceNode.h \ … … 855 857 DerivedSources/WebCore/PlugInsResources.h \ 856 858 DerivedSources/WebCore/SettingsMacros.h \ 859 DerivedSources/WebCore/UserAgentScriptsData.cpp \ 860 DerivedSources/WebCore/UserAgentScripts.h \ 857 861 DerivedSources/WebCore/UserAgentStyleSheetsData.cpp \ 858 862 DerivedSources/WebCore/UserAgentStyleSheets.h \ … … 1201 1205 $(WebCore)/Modules/indexeddb/IDBVersionChangeEvent.idl \ 1202 1206 $(WebCore)/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl \ 1207 $(WebCore)/Modules/mediacontrols/MediaControlsHost.idl \ 1203 1208 $(WebCore)/Modules/mediasource/DOMURLMediaSource.idl \ 1204 1209 $(WebCore)/Modules/mediasource/MediaSource.idl \ … … 1880 1885 Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp \ 1881 1886 Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h \ 1887 Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp \ 1888 Source/WebCore/Modules/mediacontrols/MediaControlsHost.h \ 1882 1889 Source/WebCore/Modules/mediasource/MediaSource.cpp \ 1883 1890 Source/WebCore/Modules/mediasource/MediaSource.h \ -
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
r163094 r164024 154 154 } 155 155 156 bool MediaControlsHost::supportsFullscreen() 157 { 158 return m_mediaElement->supportsFullscreen(); 159 } 160 156 161 } 157 162 -
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.h
r163094 r164024 60 60 void updateTextTrackContainer(); 61 61 bool mediaPlaybackAllowsInline() const; 62 bool supportsFullscreen(); 62 63 63 64 private: -
trunk/Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl
r163094 r164024 38 38 void updateTextTrackContainer(); 39 39 readonly attribute boolean mediaPlaybackAllowsInline; 40 readonly attribute boolean supportsFullscreen; 40 41 }; -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
r163094 r164024 77 77 volumeBox: 'volume-box', 78 78 noVideo: 'no-video', 79 down: 'down', 79 80 }, 80 81 KeyCodes: { … … 573 574 { 574 575 this.showControls(); 575 if (this.hideTimer) 576 clearTimeout(this.hideTimer); 577 this.hideTimer = setTimeout(this.hideControls.bind(this), this.HideControlsDelay); 576 this.resetHideControlsTimer(); 578 577 579 578 if (!this.isDragging) … … 588 587 { 589 588 this.hideControls(); 590 if (this.hideTimer) 591 clearTimeout(this.hideTimer); 589 this.clearHideControlsTimer(); 592 590 }, 593 591 … … 865 863 866 864 this.hideControls(); 867 if (this.hideTimer) 868 clearTimeout(this.hideTimer); 869 this.hideTimer = setTimeout(this.hideControls.bind(this), this.HideControlsDelay); 865 this.resetHideControlsTimer(); 870 866 } 871 867 }, … … 1153 1149 }, 1154 1150 1151 clearHideControlsTimer: function() 1152 { 1153 if (this.hideTimer) 1154 clearTimeout(this.hideTimer); 1155 this.hideTimer = null; 1156 }, 1157 1158 resetHideControlsTimer: function() 1159 { 1160 if (this.hideTimer) 1161 clearTimeout(this.hideTimer); 1162 this.hideTimer = setTimeout(this.hideControls.bind(this), this.HideControlsDelay); 1163 }, 1155 1164 }; -
trunk/Source/WebCore/PlatformGTK.cmake
r163797 r164024 296 296 ) 297 297 298 set(WebCore_USER_AGENT_SCRIPTS 299 ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js 300 ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsGtk.js 301 ) 302 303 set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderThemeGtk.cpp) 304 298 305 list(APPEND WebCore_LIBRARIES 299 306 ${ATK_LIBRARIES} … … 456 463 ) 457 464 target_link_libraries(WebCorePlatformGTK 465 WebCore 458 466 ${WebCore_LIBRARIES} 459 467 ${GTK_LIBRARIES} -
trunk/Source/WebCore/css/mediaControlsGtk.css
r155048 r164024 80 80 border-radius: 5px; 81 81 overflow: visible; 82 transition: opacity 0.25s linear; 83 } 84 85 video::-webkit-media-controls-panel { 86 opacity: 0; 87 } 88 89 video::-webkit-media-controls-panel.show, 90 video::-webkit-media-controls-panel.paused { 91 opacity: 1; 92 } 93 94 video::-webkit-media-controls-panel div.mute-box, 95 audio::-webkit-media-controls-panel div.mute-box { 96 display: -webkit-flex; 97 -webkit-flex: none; 98 box-sizing: border-box; 99 width: 30px; 100 height: 30px; 101 margin: 0 9px 0 -7px; 102 } 103 104 video::-webkit-media-controls-panel div.mute-box.hidden, 105 audio::-webkit-media-controls-panel div.mute-box.hidden { 106 display: none; 82 107 } 83 108 … … 91 116 height: 30px; 92 117 line-height: 30px; 93 margin: 0 9px 0 -7px;118 outline: none; 94 119 } 95 120 … … 104 129 line-height: 30px; 105 130 margin: 0 9px; 131 outline: none; 106 132 } 107 133 … … 111 137 -webkit-user-select: none; 112 138 -webkit-flex: none; 113 display: block;114 139 border: none; 115 140 cursor: default; … … 131 156 text-shadow: none; 132 157 text-decoration: none; 158 } 159 160 audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display { 161 display: block; 162 } 163 164 audio::-webkit-media-controls-time-remaining-display, 165 video::-webkit-media-controls-time-remaining-display { 166 display: none; 167 } 168 169 audio::-webkit-media-controls-time-remaining-display.show, 170 video::-webkit-media-controls-time-remaining-display.show { 171 display: block; 172 } 173 174 audio::-webkit-media-controls-current-time-display.hidden, 175 video::-webkit-media-controls-current-time-display.hidden, 176 audio::-webkit-media-controls-time-remaining-display.hidden, 177 video::-webkit-media-controls-time-remaining-display.hidden { 178 display: none; 133 179 } 134 180 … … 144 190 border-radius: 4px; 145 191 color: rgba(230, 230, 230, 0.35); 192 outline: none; 146 193 } 147 194 148 195 audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container { 149 196 -webkit-appearance: media-volume-slider-container; 197 overflow: hidden; 150 198 position: absolute; 151 199 padding: 0; … … 157 205 right: 9px; 158 206 border-radius: 5px 5px 0px 0px; 207 transition: height 0.10s linear; 208 } 209 210 audio::-webkit-media-controls-volume-slider-container.hidden, 211 video::-webkit-media-controls-volume-slider-container.hidden { 212 height: 0; 213 } 214 215 audio::-webkit-media-controls-volume-slider-container.down, 216 video::-webkit-media-controls-volume-slider-container.down { 217 bottom: -100px; 218 border-radius: 0px 0px 5px 5px; 219 transition: height 0.10s linear, bottom 0.10s linear; 220 } 221 222 audio::-webkit-media-controls-panel .hidden.down, 223 video::-webkit-media-controls-panel .hidden.down { 224 bottom: 0; 159 225 } 160 226 … … 171 237 background-color: transparent; 172 238 color: rgba(230, 230, 230, 0.35); 239 outline: none; 173 240 } 174 241 … … 223 290 line-height: 30px; 224 291 margin: 0 9px 0 -7px; 225 background-repeat:no-repeat; 226 background-position:center; 227 background-image: url('data:image/svg+xml,<svg id="svg7384" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata id="metadata90"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title>Gnome Symbolic Icon Theme</dc:title></cc:Work></rdf:RDF></metadata><g id="layer9" transform="translate(-101,-357)"><path id="path12148" style="block-progression:tb;color:#bebebe;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" fill="#bebebe" d="m104.75,357.06c-2.0602,0-3.75,1.6898-3.75,3.75v4.4375c0,2.0602,1.6898,3.75,3.75,3.75h4.9375l3.75,2.6562,1.5938,1.125v-1.9688l-0.0313-2.5c1.1106-0.59715,1.9688-1.6526,1.9688-3.0625v-4.4375c0-2.0602-1.6898-3.75-3.75-3.75h-8.4688zm0,2,8.4688,0c0.9868,0,1.75,0.7632,1.75,1.75v4.4375c0,0.86273-0.63508,1.541-1.125,1.625l-0.84,0.12v0.84375,1.0312l-2.4062-1.6875-0.25-0.1875h-0.3125-5.2812c-0.9868,0-1.75-0.7632-1.75-1.75v-4.4375c0-0.9868,0.7632-1.75,1.75-1.75z"/></g></svg>'); 292 outline: none; 228 293 } 229 294 230 295 video::-webkit-media-controls-closed-captions-container { 231 296 -webkit-appearance: media-closed-captions-container; 297 display: -webkit-flex; 232 298 position: absolute; 233 display: block;234 right: 38px;235 299 bottom: 35px; 300 z-index: 2; 301 background-color: rgba(20, 20, 20, 0.8); 302 border-radius: 5px 5px 0px 0px; 303 overflow: hidden; 236 304 max-width: -webkit-calc(100% - 48px); /* right + 10px */ 237 305 max-height: -webkit-calc(100% - 35px); /* bottom + 10px */ 238 overflow-x: hidden;239 overflow-y: auto;240 background-color: rgba(20, 20, 20, 0.8);241 border-radius: 10px;242 306 cursor: default; 243 z-index: 2; 244 } 245 246 video::-webkit-media-controls-closed-captions-track-list { 247 display: block; 248 font-family: "Helvetica Bold", Helvetica; 307 font-family: -webkit-small-control; 249 308 font-size: 10pt; 309 font-weight: normal; 310 font-style: normal; 311 color: white; 250 312 -webkit-user-select: none; 251 } 252 253 video::-webkit-media-controls-closed-captions-track-list h3 { 254 margin: 1px 30px; 255 color: #757575; 256 text-shadow: 0 1px 0 black; 257 padding-top: 0px; 258 font-weight: bold; 259 font-size: 10pt; 260 } 261 262 video::-webkit-media-controls-closed-captions-track-list ul { 313 transition: height 0.10s linear; 314 } 315 316 video::-webkit-media-controls-closed-captions-container h3 { 317 margin: 1px 10px; 318 padding-top: 4px; 319 } 320 321 video::-webkit-media-controls-closed-captions-container ul { 263 322 list-style-type: none; 264 323 margin: 0 0 4px 0; 265 324 padding: 0; 266 font-weight: bold; 267 } 268 269 video::-webkit-media-controls-closed-captions-track-list li { 325 } 326 327 video::-webkit-media-controls-closed-captions-container li { 270 328 position: relative; 271 329 color: white; 272 background-image: none;273 text-shadow: 0 1px 0 black;274 330 margin: 0; 275 padding-left: 37px;276 padding-right: 35px;331 padding-left: 17px; 332 padding-right: 15px; 277 333 padding-top: 0.15em; 278 334 padding-bottom: 0.2em; … … 281 337 white-space: nowrap; 282 338 text-overflow: ellipsis; 283 border-top: 1px solid rgba(0, 0, 0, 0); 284 border-bottom: 1px solid rgba(0, 0, 0, 0); 285 } 286 video::-webkit-media-controls-closed-captions-track-list li.selected { 339 outline: none; 340 } 341 video::-webkit-media-controls-closed-captions-container li.selected { 287 342 background-color: rgba(230, 230, 230, 0.15); 288 343 } … … 298 353 line-height: 30px; 299 354 margin: 0 9px 0 -7px; 300 } 355 outline: none; 356 } 357 358 video::-webkit-media-controls-panel button.hidden, 359 audio::-webkit-media-controls-panel button.hidden { 360 display: none; 361 } -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r163983 r164024 142 142 #include "MediaControlsHost.h" 143 143 #include "ScriptGlobalObject.h" 144 #include "UserAgentScripts.h"145 144 #include <bindings/ScriptObject.h> 146 145 #endif -
trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp
r163797 r164024 37 37 #include "LocalizedStrings.h" 38 38 #include "MediaControlElements.h" 39 #include "NamedNodeMap.h" 39 40 #include "PaintInfo.h" 40 41 #include "PlatformContextCairo.h" … … 43 44 #include "StringTruncator.h" 44 45 #include "TimeRanges.h" 46 #include "UserAgentScripts.h" 45 47 #include "UserAgentStyleSheets.h" 46 48 #include <cmath> … … 50 52 #include <wtf/gobject/GUniquePtr.h> 51 53 #include <wtf/text/CString.h> 54 #include <wtf/text/StringBuilder.h> 52 55 53 56 #if ENABLE(PROGRESS_ELEMENT) … … 101 104 } 102 105 #endif 106 107 static bool nodeHasPseudo(Node* node, const char* pseudo) 108 { 109 RefPtr<Node> attributeNode = node->attributes()->getNamedItem("pseudo"); 110 111 return attributeNode ? attributeNode->nodeValue() == pseudo : false; 112 } 113 114 static bool nodeHasClass(Node* node, const char* className) 115 { 116 return node->isElementNode() ? toElement(node)->classNames().contains(className) : false; 117 } 103 118 104 119 PassRefPtr<RenderTheme> RenderThemeGtk::create() … … 140 155 case SliderHorizontalPart: 141 156 case SliderVerticalPart: 142 case MediaPlayButtonPart:143 case MediaVolumeSliderPart:144 case MediaMuteButtonPart:145 case MediaEnterFullscreenButtonPart:146 case MediaSliderPart:147 157 return true; 148 158 default: … … 526 536 if (!node) 527 537 return false; 528 if (!node->isMediaControlElement()) 538 539 if (!nodeHasPseudo(node, "-webkit-media-controls-play-button")) 529 540 return false; 530 531 bool play = mediaControlElementType(node) == MediaPlayButton; 541 bool showPlayButton = nodeHasClass(node, "paused"); 542 532 543 return paintMediaButton(renderObject, paintInfo.context, rect, 533 play? "media-playback-start-symbolic" : "media-playback-pause-symbolic",534 play? GTK_STOCK_MEDIA_PLAY : GTK_STOCK_MEDIA_PAUSE);544 showPlayButton ? "media-playback-start-symbolic" : "media-playback-pause-symbolic", 545 showPlayButton ? GTK_STOCK_MEDIA_PLAY : GTK_STOCK_MEDIA_PAUSE); 535 546 } 536 547 … … 544 555 return paintMediaButton(renderObject, paintInfo.context, rect, "media-seek-forward-symbolic", GTK_STOCK_MEDIA_FORWARD); 545 556 } 557 558 #if ENABLE(VIDEO_TRACK) 559 bool RenderThemeGtk::paintMediaToggleClosedCaptionsButton(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect) 560 { 561 return paintMediaButton(renderObject, paintInfo.context, rect, "user-invisible-symbolic", GTK_STOCK_JUSTIFY_FILL); 562 } 563 #endif 546 564 547 565 static RoundedRect::Radii borderRadiiFromStyle(RenderStyle* style) … … 727 745 #endif 728 746 729 } 747 String RenderThemeGtk::mediaControlsScript() 748 { 749 StringBuilder scriptBuilder; 750 scriptBuilder.append(mediaControlsAppleJavaScript, sizeof(mediaControlsAppleJavaScript)); 751 scriptBuilder.append(mediaControlsGtkJavaScript, sizeof(mediaControlsGtkJavaScript)); 752 return scriptBuilder.toString(); 753 } 754 } -
trunk/Source/WebCore/platform/gtk/RenderThemeGtk.h
r162139 r164024 89 89 virtual String formatMediaControlsCurrentTime(float currentTime, float duration) const; 90 90 virtual bool supportsClosedCaptioning() const override { return true; } 91 virtual String mediaControlsScript(); 91 92 92 93 #if ENABLE(FULLSCREEN_API) … … 175 176 virtual bool paintMediaVolumeSliderThumb(RenderObject*, const PaintInfo&, const IntRect&); 176 177 virtual bool paintMediaCurrentTime(RenderObject*, const PaintInfo&, const IntRect&); 178 #if ENABLE(VIDEO_TRACK) 179 virtual bool paintMediaToggleClosedCaptionsButton(RenderObject*, const PaintInfo&, const IntRect&); 180 #endif 177 181 #endif 178 182 -
trunk/Source/autotools/SetupWebKitFeatures.m4
r163749 r164024 132 132 ENABLE_MATHML=1 \ 133 133 ENABLE_MEDIA_CAPTURE=0 \ 134 ENABLE_MEDIA_CONTROLS_SCRIPT=1 \ 134 135 ENABLE_MEDIA_SOURCE=0 \ 135 136 ENABLE_MEDIA_STATISTICS=0 \ -
trunk/Source/cmake/OptionsGTK.cmake
r163749 r164024 53 53 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LLINT ON) 54 54 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CAPTURE ON) 55 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CONTROLS_SCRIPT ON) 55 56 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER ON) 56 57 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML ON) -
trunk/Source/cmake/WebKitFeatures.cmake
r163786 r164024 78 78 WEBKIT_OPTION_DEFINE(ENABLE_MATHML "Toggle MathML support" ON) 79 79 WEBKIT_OPTION_DEFINE(ENABLE_MEDIA_CAPTURE "Toggle Media Capture support" OFF) 80 WEBKIT_OPTION_DEFINE(ENABLE_MEDIA_CONTROLS_SCRIPT "Toggle definition of media controls in Javascript" OFF) 80 81 WEBKIT_OPTION_DEFINE(ENABLE_MEDIA_SOURCE "Toggle Media Source support" OFF) 81 82 WEBKIT_OPTION_DEFINE(ENABLE_MEDIA_STATISTICS "Toggle Media Statistics support" OFF) -
trunk/Source/cmakeconfig.h.cmake
r163786 r164024 70 70 #cmakedefine01 ENABLE_MATHML 71 71 #cmakedefine01 ENABLE_MEDIA_CAPTURE 72 #cmakedefine01 ENABLE_MEDIA_CONTROLS_SCRIPT 72 73 #cmakedefine01 ENABLE_MEDIA_SOURCE 73 74 #cmakedefine01 ENABLE_MEDIA_STATISTICS
Note: See TracChangeset
for help on using the changeset viewer.