Diff
Modified: trunk/LayoutTests/ChangeLog (188181 => 188182)
--- trunk/LayoutTests/ChangeLog 2015-08-08 01:13:48 UTC (rev 188181)
+++ trunk/LayoutTests/ChangeLog 2015-08-08 02:14:43 UTC (rev 188182)
@@ -1,3 +1,15 @@
+2015-08-07 James Craig <jcr...@apple.com>
+
+ REGRESSION(r184722) AX: WebKit video playback toolbar removed from DOM; no longer accessible to VoiceOver
+ https://bugs.webkit.org/show_bug.cgi?id=145684
+
+ Reviewed by Dean Jackson.
+
+ * http/tests/contentextensions/text-track-blocked-expected.txt: Minor update to test case expectation.
+ * media/video-controls-show-on-kb-or-ax-event-expected.txt: Added.
+ * media/video-controls-show-on-kb-or-ax-event.html: New test validates video controls can be displayed without the need for a mouse.
+ * platform/mac/media/track/track-cue-rendering-horizontal-expected.txt: Minor update to test case expectation.
+
2015-08-07 Myles C. Maxfield <mmaxfi...@apple.com>
[Mac] Test gardening
Modified: trunk/LayoutTests/http/tests/contentextensions/text-track-blocked-expected.txt (188181 => 188182)
--- trunk/LayoutTests/http/tests/contentextensions/text-track-blocked-expected.txt 2015-08-08 01:13:48 UTC (rev 188181)
+++ trunk/LayoutTests/http/tests/contentextensions/text-track-blocked-expected.txt 2015-08-08 02:14:43 UTC (rev 188182)
@@ -14,3 +14,5 @@
RenderVideo {VIDEO} at (0,18) size 320x240
layer at (8,26) size 320x240
RenderFlexibleBox {DIV} at (0,0) size 320x240
+layer at (8,256) size 320x10
+ RenderButton {BUTTON} at (0,230) size 320x10 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
Added: trunk/LayoutTests/media/video-controls-show-on-kb-or-ax-event-expected.txt (0 => 188182)
--- trunk/LayoutTests/media/video-controls-show-on-kb-or-ax-event-expected.txt (rev 0)
+++ trunk/LayoutTests/media/video-controls-show-on-kb-or-ax-event-expected.txt 2015-08-08 02:14:43 UTC (rev 188182)
@@ -0,0 +1,6 @@
+This tests that, after the video controls fade out, they can be shown when VoiceOver or a keyboard user clicks the hidden "Show Controls" button.
+
+PASS
+
+
+
Added: trunk/LayoutTests/media/video-controls-show-on-kb-or-ax-event.html (0 => 188182)
--- trunk/LayoutTests/media/video-controls-show-on-kb-or-ax-event.html (rev 0)
+++ trunk/LayoutTests/media/video-controls-show-on-kb-or-ax-event.html 2015-08-08 02:14:43 UTC (rev 188182)
@@ -0,0 +1,42 @@
+<body>
+<p>
+ This tests that, after the video controls fade out, they can be shown when VoiceOver or a keyboard user clicks the hidden "Show Controls" button.
+</p>
+<p id="result">
+ FAIL: Test did not run.<br>
+</p>
+<video id="video" controls autoplay _onplaying_="playing()" src=""
+<script>
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ }
+
+ function playing() {
+
+ // Mouse over the video then mouse out to hide controls more quickly.
+ eventSender.mouseMoveTo(100,100);
+ eventSender.mouseMoveTo(1,1);
+
+ setTimeout(function() {
+ var result = document.getElementById("result");
+ result.innerHTML = "";
+ var root = internals.shadowRoot(document.getElementById("video"))
+
+ var button = root.firstChild.querySelector('button');
+ if (button) {
+ button.focus();
+ eventSender.keyDown(' '); // Use keyboard to press the selected button.
+ } else {
+ result.innerHTML += 'FAIL: "Show Controls" button is not available.<br>';
+ }
+
+ // Verifies the toolbar is back in the DOM.
+ var controls = root.firstChild.querySelector('[role="toolbar"]');
+ result.innerHTML += controls ? 'PASS': 'FAIL: Test ending, but toolbar is not visible.';
+
+ testRunner.notifyDone();
+ }, 300) // Wait for video toolbar to hide.
+ }
+</script>
+</body>
Modified: trunk/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt (188181 => 188182)
--- trunk/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt 2015-08-08 01:13:48 UTC (rev 188181)
+++ trunk/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt 2015-08-08 02:14:43 UTC (rev 188182)
@@ -60,3 +60,5 @@
RenderInline {SPAN} at (0,0) size 275x14 [bgcolor=#000000CC]
RenderText {#text} at (0,0) size 275x14
text run at (0,0) width 275: "Cue 6: should be on top of bottom positioned cue 5."
+layer at (8,238) size 320x10
+ RenderButton {BUTTON} at (0,230) size 320x10 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
Modified: trunk/Source/WebCore/ChangeLog (188181 => 188182)
--- trunk/Source/WebCore/ChangeLog 2015-08-08 01:13:48 UTC (rev 188181)
+++ trunk/Source/WebCore/ChangeLog 2015-08-08 02:14:43 UTC (rev 188182)
@@ -1,3 +1,32 @@
+2015-08-07 James Craig <jcr...@apple.com>
+
+ REGRESSION(r184722) AX: WebKit video playback toolbar removed from DOM; no longer accessible to VoiceOver
+ https://bugs.webkit.org/show_bug.cgi?id=145684
+
+ Reviewed by Dean Jackson.
+
+ Updated Apple Video controls to add an invisible but focusable button that allows VoiceOver
+ users (and when unblocked, keyboard users) to re-display the video controls.
+
+ Test: media/video-controls-show-on-kb-or-ax-event.html
+
+ * English.lproj/mediaControlsLocalizedStrings.js:
+ * Modules/mediacontrols/mediaControlsApple.css:
+ (audio::-webkit-media-show-controls):
+ (video::-webkit-media-show-controls):
+ * Modules/mediacontrols/mediaControlsApple.js:
+ (Controller.prototype.createControls):
+ (Controller.prototype.handleFullscreenChange):
+ (Controller.prototype.handleShowControlsClick):
+ (Controller.prototype.handleWrapperMouseMove):
+ (Controller.prototype.updateForShowingControls):
+ (Controller.prototype.showControls):
+ (Controller.prototype.hideControls):
+ (Controller.prototype.setNeedsUpdateForDisplayedWidth):
+ * Modules/mediacontrols/mediaControlsiOS.css:
+ (audio::-webkit-media-show-controls):
+ (video::-webkit-media-show-controls):
+
2015-08-07 Alex Christensen <achristen...@webkit.org>
Build more testing binaries with CMake on Windows
Modified: trunk/Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js (188181 => 188182)
--- trunk/Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js 2015-08-08 01:13:48 UTC (rev 188181)
+++ trunk/Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js 2015-08-08 02:14:43 UTC (rev 188182)
@@ -27,6 +27,7 @@
'Remaining': 'Remaining',
'Rewind': 'Rewind',
'Rewind ##sec## Seconds': 'Rewind ##sec## Seconds',
+ 'Show Controls': 'Show Controls',
'Stalled': 'Stalled',
'Start Playback': 'Start Playback',
'Subtitles': 'Subtitles',
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css (188181 => 188182)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css 2015-08-08 01:13:48 UTC (rev 188181)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css 2015-08-08 02:14:43 UTC (rev 188182)
@@ -106,6 +106,22 @@
opacity: 1;
}
+audio::-webkit-media-show-controls {
+ display: none !important;
+}
+video::-webkit-media-show-controls {
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ display: block;
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 10px;
+ opacity: 0;
+ -webkit-appearance: none;
+}
+
video::-webkit-media-controls-panel-background-container,
audio::-webkit-media-controls-panel-background-container {
position: absolute;
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (188181 => 188182)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-08-08 01:13:48 UTC (rev 188181)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-08-08 02:14:43 UTC (rev 188182)
@@ -495,6 +495,14 @@
wirelessTargetPicker.setAttribute('aria-label', this.UIString('Choose Wireless Display'));
this.listenFor(wirelessTargetPicker, 'click', this.handleWirelessPickerButtonClicked);
+ // Show controls button is an accessibility workaround since the controls are now removed from the DOM. http://webkit.org/b/145684
+ var showControlsButton = this.showControlsButton = document.createElement('button');
+ showControlsButton.setAttribute('pseudo', '-webkit-media-show-controls');
+ showControlsButton.hidden = true;
+ showControlsButton.setAttribute('aria-label', this.UIString('Show Controls'));
+ this.listenFor(showControlsButton, 'click', this.handleShowControlsClick);
+ this.base.appendChild(showControlsButton);
+
if (!Controller.gSimulateWirelessPlaybackTarget)
wirelessTargetPicker.classList.add(this.ClassNames.hidden);
},
@@ -794,6 +802,15 @@
}
},
+ handleShowControlsClick: function(event)
+ {
+ if (!this.video.controls && !this.isFullScreen())
+ return;
+
+ if (this.controlsAreHidden())
+ this.showControls(true);
+ },
+
handleWrapperMouseMove: function(event)
{
if (!this.video.controls && !this.isFullScreen())
@@ -1405,7 +1422,7 @@
}
},
- showControls: function()
+ showControls: function(focusControls)
{
this.updateShouldListenForPlaybackTargetAvailabilityEvent();
if (!this.video.controls && !this.isFullScreen())
@@ -1415,7 +1432,10 @@
if (this.shouldHaveControls() && !this.controls.panel.parentElement) {
this.base.appendChild(this.controls.inlinePlaybackPlaceholder);
this.base.appendChild(this.controls.panel);
+ if (focusControls)
+ this.controls.playButton.focus();
}
+ this.showControlsButton.hidden = true;
},
hideControls: function()
@@ -1428,6 +1448,7 @@
this.controls.panel.classList.remove(this.ClassNames.show);
if (this.controls.panelBackground)
this.controls.panelBackground.classList.remove(this.ClassNames.show);
+ this.showControlsButton.hidden = false;
},
setNeedsUpdateForDisplayedWidth: function()
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css (188181 => 188182)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css 2015-08-08 01:13:48 UTC (rev 188181)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css 2015-08-08 02:14:43 UTC (rev 188182)
@@ -132,6 +132,22 @@
opacity: 1;
}
+audio::-webkit-media-show-controls {
+ display: none !important;
+}
+video::-webkit-media-show-controls {
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ display: block;
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 10px;
+ opacity: 0;
+ -webkit-appearance: none;
+}
+
audio::-webkit-media-controls-panel,
video::-webkit-media-controls-panel {
box-sizing: border-box;