Changeset 164782 in webkit
- Timestamp:
- Feb 27, 2014 1:16:18 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r164770 r164782 1 2014-02-27 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 3 [GTK] Improve JavaScript multimedia controls 4 https://bugs.webkit.org/show_bug.cgi?id=129044 5 6 Reviewed by Jer Noble. 7 8 * media/controls-without-preload.html: Fixed. 9 * platform/gtk/accessibility/media-controls-panel-title-expected.txt: 10 * platform/gtk/accessibility/media-controls-panel-title.html: 11 * platform/gtk/accessibility/media-emits-object-replacement-expected.txt: 12 * platform/gtk/media/video-volume-slider-expected.png: 13 * platform/gtk/media/video-volume-slider-expected.txt: 14 * platform/gtk/media/video-zoom-controls-expected.txt: Rebaseline. 15 1 16 2014-02-26 Ryosuke Niwa <rniwa@webkit.org> 2 17 -
trunk/LayoutTests/media/controls-without-preload.html
r120416 r164782 10 10 function start() 11 11 { 12 internals.suspendAnimations(); 12 13 setSrcByTagName("video", findMediaFile("video", "content/test")); 13 14 video = document.getElementsByTagName('video')[0]; -
trunk/LayoutTests/platform/gtk/accessibility/media-controls-panel-title-expected.txt
r158841 r164782 10 10 PASS element.title is 'AXTitle: ' 11 11 PASS element.role is 'AXRole: AXToolbar' 12 PASS element.title is 'AXTitle: video playback'12 PASS element.title is 'AXTitle: Video Playback' 13 13 PASS element.role is 'AXRole: AXEmbedded' 14 14 PASS element.title is 'AXTitle: ' 15 15 PASS element.role is 'AXRole: AXToolbar' 16 PASS element.title is 'AXTitle: audio playback'16 PASS element.title is 'AXTitle: Audio Playback' 17 17 PASS successfullyParsed is true 18 18 -
trunk/LayoutTests/platform/gtk/accessibility/media-controls-panel-title.html
r158841 r164782 24 24 element = element.childAtIndex(0); 25 25 shouldBe("element.role", "'AXRole: AXToolbar'"); 26 shouldBe("element.title", "'AXTitle: video playback'");26 shouldBe("element.title", "'AXTitle: Video Playback'"); 27 27 28 28 // Audio element. … … 32 32 element = element.childAtIndex(0); 33 33 shouldBe("element.role", "'AXRole: AXToolbar'"); 34 shouldBe("element.title", "'AXTitle: audio playback'");34 shouldBe("element.title", "'AXTitle: Audio Playback'"); 35 35 } 36 36 -
trunk/LayoutTests/platform/gtk/accessibility/media-emits-object-replacement-expected.txt
r160323 r164782 7 7 AXRole: AXEmbedded 8 8 AXRole: AXToolbar 9 AXRole: AX Toolbar10 AXRole: AXButton11 AXRole: AXSlider9 AXRole: AXButton 10 AXRole: AXSlider 11 AXRole: AXTimer AXValue: 00:00 12 12 AXRole: AXGroup AXValue: <\n> 13 13 AXRole: AXSection AXValue: a <obj> b 14 14 AXRole: AXEmbedded 15 15 AXRole: AXToolbar 16 AXRole: AX Toolbar17 AXRole: AXButton18 AXRole: AXSlider16 AXRole: AXButton 17 AXRole: AXSlider 18 AXRole: AXTimer AXValue: 00:00 19 19 AXRole: AXSection AXValue: End of test 20 20 This tests ensures that if video or audio tags are used, they will emit an object replacement character in a range for string operation. -
trunk/LayoutTests/platform/gtk/media/video-volume-slider-expected.txt
r164024 r164782 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 8) size 453x1710 text run at (0,1 8) width 453: "volume slider is implemented and mouse over the right bottom corner of"11 RenderBR {BR} at (453,3 2) size 0x012 RenderText {#text} at (0,3 6) size 270x1713 text run at (0,3 6) width 270: "video element will show the volume slider."14 RenderBR {BR} at (270, 50) size 0x09 RenderText {#text} at (0,17) size 453x17 10 text run at (0,17) width 453: "volume slider is implemented and mouse over the right bottom corner of" 11 RenderBR {BR} at (453,31) size 0x0 12 RenderText {#text} at (0,34) size 270x17 13 text run at (0,34) width 270: "video element will show the volume slider." 14 RenderBR {BR} at (270,48) size 0x0 15 15 RenderText {#text} at (0,0) size 0x0 16 layer at (8, 62) size 320x24017 RenderVideo {VIDEO} at (0,5 4) size 320x24018 layer at (8, 62) size 320x24016 layer at (8,59) size 320x240 17 RenderVideo {VIDEO} at (0,51) size 320x240 18 layer at (8,59) 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 7) size 310x3021 layer at (13,264) size 310x30 22 22 RenderFlexibleBox {DIV} at (5,5) size 310x30 [bgcolor=#141414CC] 23 23 RenderButton {BUTTON} at (9,0) size 30x30 … … 32 32 RenderFlexibleBox {DIV} at (271,0) size 30x30 33 33 RenderButton {BUTTON} at (0,0) size 30x30 34 layer at (284,16 7) size 30x10035 Render Block (positioned)zI: 2 {DIV} at (271,-100) size 30x100 [bgcolor=#141414CC]34 layer at (284,164) size 30x100 35 RenderFlexibleBox zI: 2 {DIV} at (271,-100) size 30x100 [bgcolor=#141414CC] 36 36 RenderSlider {INPUT} at (11,10) size 8x80 [color=#E6E6E659] 37 37 RenderFlexibleBox {DIV} at (0,0) size 8x80 [border: (1px solid #E6E6E659)] -
trunk/LayoutTests/platform/gtk/media/video-zoom-controls-expected.txt
r164024 r164782 16 16 RenderButton {BUTTON} at (13,0) size 46x45 17 17 RenderSlider {INPUT} at (73,16) size 38x13 [color=#E6E6E659] 18 RenderFlexibleBox {DIV} at (0,0) size 38x12 [border: (1 px solid #E6E6E659)]19 RenderBlock {DIV} at (1,-3) size 5 7x1818 RenderFlexibleBox {DIV} at (0,0) size 38x12 [border: (1.50px solid #E6E6E659)] 19 RenderBlock {DIV} at (1,-3) size 56x18 20 20 RenderBlock {DIV} at (-11,0) size 19x18 [color=#FFFFFF] 21 21 RenderBlock {DIV} at (133,0) size 109x45 [color=#FFFFFF] … … 34 34 RenderButton {BUTTON} at (13,0) size 46x45 35 35 RenderSlider {INPUT} at (73,16) size 38x13 [color=#E6E6E659] 36 RenderFlexibleBox {DIV} at (0,0) size 38x12 [border: (1 px solid #E6E6E659)]37 RenderBlock {DIV} at (1,-3) size 5 7x1836 RenderFlexibleBox {DIV} at (0,0) size 38x12 [border: (1.50px solid #E6E6E659)] 37 RenderBlock {DIV} at (1,-3) size 56x18 38 38 RenderBlock {DIV} at (-11,0) size 19x18 [color=#FFFFFF] 39 39 RenderBlock {DIV} at (133,0) size 109x45 [color=#FFFFFF] -
trunk/Source/WebCore/ChangeLog
r164780 r164782 1 2014-02-27 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 3 [GTK] Improve JavaScript multimedia controls 4 https://bugs.webkit.org/show_bug.cgi?id=129044 5 6 Reviewed by Jer Noble. 7 8 After webkit.org/b/123097 a follow up was needed to improve 9 accessibily and some other cosmetic problems, like cleaner CSS and 10 new missing baselines. 11 12 No new tests because of no new functionality. 13 14 * Modules/mediacontrols/mediaControlsApple.js: 15 Added hiding class name. 16 * Modules/mediacontrols/mediaControlsGtk.js: 17 (ControllerGtk.prototype.createControls): Set remaining time as 18 hidden by default and turned volumebox hidden into hiding. 19 (ControllerGtk.prototype.updateTime): Simplified the hiding and 20 showing by removing the show class and using hidden only. 21 (ControllerGtk.prototype.handleMuteButtonMouseOver): 22 (ControllerGtk.prototype.handleVolumeBoxMouseOut): Turned hidden 23 into hiding. 24 (ControllerGtk.prototype.updateReadyState): Changed coding style 25 and added down class for the panel too. 26 (ControllerGtk.prototype.updatePlaying): Change for coding style 27 coherence. 28 (ControllerGtk.prototype.handleCaptionButtonClicked): Call 29 handleCaptionButtonShowMenu. 30 (ControllerGtk.prototype.handleCaptionButtonMouseOver): Call 31 handleCaptionButtonShowMenu. 32 (ControllerGtk.prototype.handleCaptionButtonShowMenu): Created 33 with the former behavior of handleCaptionButtonMouseOver. 34 * css/mediaControlsGtk.css: 35 (.hidden): Set display none for all objects with hidden class. 36 (audio::-webkit-media-controls-panel *:focus): 37 (audio::-webkit-media-controls-panel.down *:focus): Added gradient 38 for the active and focus status. 39 (audio::-webkit-media-controls-time-remaining-display) 40 (video::-webkit-media-controls-time-remaining-display): Set 41 display block. 42 (audio::-webkit-media-controls-volume-slider-container) 43 (video::-webkit-media-controls-volume-slider-container): Set 44 display flex. 45 (video::-webkit-media-controls-volume-slider-container.hiding): 46 Changed from hidden. 47 (video::-webkit-media-controls-panel .hiding.down): Changed from 48 hidden. 49 * platform/gtk/RenderThemeGtk.cpp: 50 (WebCore::RenderThemeGtk::paintMediaButton): Returning true to 51 allow CSS painting the gradient. 52 1 53 2014-02-27 Zan Dobersek <zdobersek@igalia.com> 2 54 -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
r164661 r164782 70 70 exit: 'exit', 71 71 hidden: 'hidden', 72 hiding: 'hiding', 72 73 list: 'list', 73 74 muteBox: 'mute-box', -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsGtk.js
r164711 r164782 25 25 26 26 this.controls.currentTime.classList.add(this.ClassNames.hidden); 27 this.controls.remainingTime.classList.add(this.ClassNames.hidden); 27 28 28 29 this.controls.volumeBox.setAttribute('pseudo', '-webkit-media-controls-volume-slider-container'); 29 this.controls.volumeBox.classList.add(this.ClassNames.hid den);30 this.controls.volumeBox.classList.add(this.ClassNames.hiding); 30 31 31 32 this.listenFor(this.controls.muteBox, 'mouseout', this.handleVolumeBoxMouseOut); … … 66 67 this.controls.currentTime.innerText = this.formatTime(currentTime); 67 68 this.controls.timeline.value = currentTime; 68 if (duration === Infinity || duration === NaN) {69 this.controls.remainingTime.classList. remove(this.ClassNames.show);70 }else {69 if (duration === Infinity || duration === NaN) 70 this.controls.remainingTime.classList.add(this.ClassNames.hidden); 71 else { 71 72 this.controls.currentTime.innerText += " / " + this.formatTime(duration); 72 73 this.controls.remainingTime.innerText = this.formatTime(duration); 73 this.controls.remainingTime.classList.add(this.ClassNames.show); 74 if (this.controls.currentTime.classList.contains(this.ClassNames.hidden)) 75 this.controls.remainingTime.classList.remove(this.ClassNames.hidden); 74 76 } 75 77 … … 97 99 handleMuteButtonMouseOver: function(event) 98 100 { 99 this.controls.volumeBox.classList.remove(this.ClassNames.hid den);101 this.controls.volumeBox.classList.remove(this.ClassNames.hiding); 100 102 }, 101 103 102 104 handleVolumeBoxMouseOut: function(event) 103 105 { 104 this.controls.volumeBox.classList.add(this.ClassNames.hid den);106 this.controls.volumeBox.classList.add(this.ClassNames.hiding); 105 107 }, 106 108 … … 112 114 updateReadyState: function() 113 115 { 114 if (this.host.supportsFullscreen && this.video.videoTracks.length) {116 if (this.host.supportsFullscreen && this.video.videoTracks.length) 115 117 this.controls.fullscreenButton.classList.remove(this.ClassNames.hidden); 118 else 119 this.controls.fullscreenButton.classList.add(this.ClassNames.hidden); 120 if (this.video.offsetTop + this.controls.enclosure.offsetTop < 105) { 121 this.controls.volumeBox.classList.add(this.ClassNames.down); 122 this.controls.panel.classList.add(this.ClassNames.down); 116 123 } else { 117 this.controls.fullscreenButton.classList.add(this.ClassNames.hidden); 124 this.controls.volumeBox.classList.remove(this.ClassNames.down); 125 this.controls.panel.classList.remove(this.ClassNames.down); 118 126 } 119 if (this.video.offsetTop + this.controls.enclosure.offsetTop < 105)120 this.controls.volumeBox.classList.add(this.ClassNames.down);121 else122 this.controls.volumeBox.classList.remove(this.ClassNames.down);123 127 this.updateVolume(); 124 128 }, … … 136 140 { 137 141 Controller.prototype.updatePlaying.apply(this, arguments); 138 if (!this.canPlay()) {142 if (!this.canPlay()) 139 143 this.showControls(); 140 }141 144 }, 142 145 143 146 handleCaptionButtonClicked: function(event) 144 147 { 145 // Handled with mouseover and mouseout.148 this.handleCaptionButtonShowMenu(event) 146 149 }, 147 150 … … 187 190 handleCaptionButtonMouseOver: function(event) 188 191 { 192 this.handleCaptionButtonShowMenu(event); 193 }, 194 195 handleCaptionButtonShowMenu: function(event) 196 { 189 197 if (!this.captionMenu) 190 198 this.buildCaptionMenu(); -
trunk/Source/WebCore/css/mediaControlsGtk.css
r164024 r164782 28 28 /* These are based on the Chromium media controls */ 29 29 30 .hidden { 31 display: none !important; 32 } 33 34 video::-webkit-media-controls-panel *:active, 35 video::-webkit-media-controls-panel *:focus, 36 audio::-webkit-media-controls-panel *:active, 37 audio::-webkit-media-controls-panel *:focus { 38 background-image: linear-gradient(rgba(0, 0, 0, .05), rgba(255, 255, 255, .05)) !important; 39 } 40 41 audio::-webkit-media-controls-panel.down *:active, 42 audio::-webkit-media-controls-panel.down *:focus { 43 background-image: linear-gradient(rgba(255, 255, 255, .05), rgba(0, 0, 0, .05)) !important; 44 } 45 30 46 body:-webkit-full-page-media { 31 47 background-color: rgb(0, 0, 0); … … 87 103 } 88 104 105 audio::-webkit-media-controls-panel, 106 video:-webkit-full-page-media::-webkit-media-controls-panel.no-video, 107 video::-webkit-media-controls-panel:hover, 89 108 video::-webkit-media-controls-panel.show, 90 109 video::-webkit-media-controls-panel.paused { … … 100 119 height: 30px; 101 120 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;107 121 } 108 122 … … 137 151 -webkit-user-select: none; 138 152 -webkit-flex: none; 153 display: block; 139 154 border: none; 140 155 cursor: default; … … 156 171 text-shadow: none; 157 172 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;179 173 } 180 174 … … 195 189 audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container { 196 190 -webkit-appearance: media-volume-slider-container; 191 display: -webkit-flex; 197 192 overflow: hidden; 198 193 position: absolute; … … 208 203 } 209 204 210 audio::-webkit-media-controls-volume-slider-container.hid den,211 video::-webkit-media-controls-volume-slider-container.hid den{205 audio::-webkit-media-controls-volume-slider-container.hiding, 206 video::-webkit-media-controls-volume-slider-container.hiding { 212 207 height: 0; 213 208 } … … 220 215 } 221 216 222 audio::-webkit-media-controls-panel .hid den.down,223 video::-webkit-media-controls-panel .hid den.down {217 audio::-webkit-media-controls-panel .hiding.down, 218 video::-webkit-media-controls-panel .hiding.down { 224 219 bottom: 0; 225 220 } … … 355 350 outline: none; 356 351 } 357 358 video::-webkit-media-controls-panel button.hidden,359 audio::-webkit-media-controls-panel button.hidden {360 display: none;361 } -
trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp
r164277 r164782 514 514 gtkTextDirection(renderObject->style().direction()), gtkIconState(this, renderObject), iconRect.width()); 515 515 paintGdkPixbuf(context, icon.get(), iconRect); 516 return false;516 return true; 517 517 } 518 518
Note: See TracChangeset
for help on using the changeset viewer.