Title: [219625] trunk
- Revision
- 219625
- Author
- [email protected]
- Date
- 2017-07-18 13:30:45 -0700 (Tue, 18 Jul 2017)
Log Message
[macOS] Mouse pointer does not hide during fullscreen playback
https://bugs.webkit.org/show_bug.cgi?id=174638
<rdar://problem/33244399>
Patch by Antoine Quint <[email protected]> on 2017-07-18
Reviewed by Dean Jackson.
Source/WebCore:
Test: media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html
The user-agent stylesheet sets the "-webkit-cursor-visibility" to "auto-hide" for fullscreen <video>
elements. Since we reset the page styles, including UA styles, on .media-controls-container, we need
to explicitly inherit this style property from the page to ensure the mouse pointer automatically
hides in fullscreen.
* Modules/modern-media-controls/controls/media-controls.css:
(.media-controls-container):
LayoutTests:
Add a test that checks that the "-webkit-cursor-visibility" is set to "auto-hide" when
in fullscreen for the media controls container.
* media/modern-media-controls/css/webkit-cursor-visibility-auto-hide-expected.txt: Added.
* media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html: Added.
* platform/ios-simulator/TestExpectations:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (219624 => 219625)
--- trunk/LayoutTests/ChangeLog 2017-07-18 20:21:31 UTC (rev 219624)
+++ trunk/LayoutTests/ChangeLog 2017-07-18 20:30:45 UTC (rev 219625)
@@ -1,3 +1,18 @@
+2017-07-18 Antoine Quint <[email protected]>
+
+ [macOS] Mouse pointer does not hide during fullscreen playback
+ https://bugs.webkit.org/show_bug.cgi?id=174638
+ <rdar://problem/33244399>
+
+ Reviewed by Dean Jackson.
+
+ Add a test that checks that the "-webkit-cursor-visibility" is set to "auto-hide" when
+ in fullscreen for the media controls container.
+
+ * media/modern-media-controls/css/webkit-cursor-visibility-auto-hide-expected.txt: Added.
+ * media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html: Added.
+ * platform/ios-simulator/TestExpectations:
+
2017-07-18 Sam Weinig <[email protected]>
[WebIDL] Remove custom bindings for MockContentFilterSettings
Added: trunk/LayoutTests/media/modern-media-controls/css/webkit-cursor-visibility-auto-hide-expected.txt (0 => 219625)
--- trunk/LayoutTests/media/modern-media-controls/css/webkit-cursor-visibility-auto-hide-expected.txt (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/css/webkit-cursor-visibility-auto-hide-expected.txt 2017-07-18 20:30:45 UTC (rev 219625)
@@ -0,0 +1,15 @@
+Testing that control are shown in fullscreen when the controls attribute is not present.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS media.webkitDisplayingFullscreen is false
+PASS getComputedStyle(window.internals.shadowRoot(media).querySelector('.media-controls-container')).webkitCursorVisibility is "auto"
+
+PASS media.webkitDisplayingFullscreen is true
+PASS getComputedStyle(window.internals.shadowRoot(media).querySelector('.media-controls-container')).webkitCursorVisibility is "auto-hide"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html (0 => 219625)
--- trunk/LayoutTests/media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html 2017-07-18 20:30:45 UTC (rev 219625)
@@ -0,0 +1,37 @@
+<script src=""
+<script src="" type="text/_javascript_"></script>
+<body>
+<video src="" autoplay controls></video>
+<script type="text/_javascript_">
+
+window.jsTestIsAsync = true;
+
+description("Testing that control are shown in fullscreen when the controls attribute is not present.");
+
+const media = document.querySelector("video");
+
+media.addEventListener("play", () => {
+
+ shouldBeFalse("media.webkitDisplayingFullscreen");
+ shouldBeEqualToString("getComputedStyle(window.internals.shadowRoot(media).querySelector('.media-controls-container')).webkitCursorVisibility", "auto");
+ debug("");
+
+ media.addEventListener("webkitfullscreenchange", () => {
+ shouldBeTrue("media.webkitDisplayingFullscreen");
+ shouldBeEqualToString("getComputedStyle(window.internals.shadowRoot(media).querySelector('.media-controls-container')).webkitCursorVisibility", "auto-hide");
+ debug("");
+ button.remove();
+ media.remove();
+ finishJSTest();
+ });
+
+ const button = document.body.appendChild(document.createElement("div"));
+ button.setAttribute("style", "position: absolute; left: 0; top: 0;");
+ button.innerText = "Enter fullscreen";
+ button.addEventListener("click", () => media.webkitEnterFullscreen());
+ pressOnElement(button);
+});
+
+</script>
+<script src=""
+</body>
Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (219624 => 219625)
--- trunk/LayoutTests/platform/ios-simulator/TestExpectations 2017-07-18 20:21:31 UTC (rev 219624)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations 2017-07-18 20:30:45 UTC (rev 219625)
@@ -117,6 +117,7 @@
# These tests rely on fullscreen which do not use the WebKit media controls on iOS
media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-parent-element.html [ Skip ]
media/modern-media-controls/controls-visibility-support/controls-visibility-support-fullscreen-on-video.html [ Skip ]
+media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html [ Skip ]
media/modern-media-controls/placard-support/placard-support-airplay-fullscreen.html [ Skip ]
# These tests specifically test iOS-only media controls features
Modified: trunk/Source/WebCore/ChangeLog (219624 => 219625)
--- trunk/Source/WebCore/ChangeLog 2017-07-18 20:21:31 UTC (rev 219624)
+++ trunk/Source/WebCore/ChangeLog 2017-07-18 20:30:45 UTC (rev 219625)
@@ -1,3 +1,21 @@
+2017-07-18 Antoine Quint <[email protected]>
+
+ [macOS] Mouse pointer does not hide during fullscreen playback
+ https://bugs.webkit.org/show_bug.cgi?id=174638
+ <rdar://problem/33244399>
+
+ Reviewed by Dean Jackson.
+
+ Test: media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html
+
+ The user-agent stylesheet sets the "-webkit-cursor-visibility" to "auto-hide" for fullscreen <video>
+ elements. Since we reset the page styles, including UA styles, on .media-controls-container, we need
+ to explicitly inherit this style property from the page to ensure the mouse pointer automatically
+ hides in fullscreen.
+
+ * Modules/modern-media-controls/controls/media-controls.css:
+ (.media-controls-container):
+
2017-07-18 Sam Weinig <[email protected]>
[WebIDL] Remove custom bindings for MockContentFilterSettings
Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css (219624 => 219625)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css 2017-07-18 20:21:31 UTC (rev 219624)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/media-controls.css 2017-07-18 20:30:45 UTC (rev 219625)
@@ -54,6 +54,7 @@
all: initial;
display: block;
visibility: inherit;
+ -webkit-cursor-visibility: inherit;
position: relative;
will-change: z-index;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes