Title: [244253] trunk
- Revision
- 244253
- Author
- [email protected]
- Date
- 2019-04-15 00:11:11 -0700 (Mon, 15 Apr 2019)
Log Message
Ensure iOS layout traits are used for media controls in modern compatibility mode
https://bugs.webkit.org/show_bug.cgi?id=196812
<rdar://problem/47460637>
Reviewed by Dean Jackson.
Source/WebCore:
Test: media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html
Instead of looking at the UA string, check whether we support touches which is the correct indicator of whether we should
be using the iOS layout traits for media controls.
* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype.get layoutTraits):
LayoutTests:
Add a new test that enforces modern compatibility mode and checks that the iOS controls are used.
* media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode-expected.txt: Added.
* media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (244252 => 244253)
--- trunk/LayoutTests/ChangeLog 2019-04-15 06:25:36 UTC (rev 244252)
+++ trunk/LayoutTests/ChangeLog 2019-04-15 07:11:11 UTC (rev 244253)
@@ -1,3 +1,16 @@
+2019-04-11 Antoine Quint <[email protected]>
+
+ Ensure iOS layout traits are used for media controls in modern compatibility mode
+ https://bugs.webkit.org/show_bug.cgi?id=196812
+ <rdar://problem/47460637>
+
+ Reviewed by Dean Jackson.
+
+ Add a new test that enforces modern compatibility mode and checks that the iOS controls are used.
+
+ * media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode-expected.txt: Added.
+ * media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html: Added.
+
2019-04-14 Fujii Hironori <[email protected]>
[WinCairo][WKL] Unreviewed test gardening.
Added: trunk/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode-expected.txt (0 => 244253)
--- trunk/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode-expected.txt (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode-expected.txt 2019-04-15 07:11:11 UTC (rev 244253)
@@ -0,0 +1,10 @@
+Testing we use the iOS media controls when in modern compatibility mode on iOS.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS window.internals.shadowRoot(media).querySelector('.media-controls').classList.contains('ios') is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html (0 => 244253)
--- trunk/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html 2019-04-15 07:11:11 UTC (rev 244253)
@@ -0,0 +1,20 @@
+<!DOCTYPE html><!-- webkit-test-runner [ shouldUseModernCompatibilityMode=true ] -->
+<script src=""
+<script src="" type="text/_javascript_"></script>
+<body>
+<video src="" style="width: 320px; height: 240px;" controls autoplay plays-inline></video>
+<script type="text/_javascript_">
+
+window.jsTestIsAsync = true;
+
+description("Testing we use the iOS media controls when in modern compatibility mode on iOS.");
+
+const media = document.querySelector("video");
+media.addEventListener("play", () => {
+ shouldBeTrue("window.internals.shadowRoot(media).querySelector('.media-controls').classList.contains('ios')");
+ finishJSTest();
+});
+
+</script>
+<script src=""
+</body>
Modified: trunk/Source/WebCore/ChangeLog (244252 => 244253)
--- trunk/Source/WebCore/ChangeLog 2019-04-15 06:25:36 UTC (rev 244252)
+++ trunk/Source/WebCore/ChangeLog 2019-04-15 07:11:11 UTC (rev 244253)
@@ -1,3 +1,19 @@
+2019-04-11 Antoine Quint <[email protected]>
+
+ Ensure iOS layout traits are used for media controls in modern compatibility mode
+ https://bugs.webkit.org/show_bug.cgi?id=196812
+ <rdar://problem/47460637>
+
+ Reviewed by Dean Jackson.
+
+ Test: media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html
+
+ Instead of looking at the UA string, check whether we support touches which is the correct indicator of whether we should
+ be using the iOS layout traits for media controls.
+
+ * Modules/modern-media-controls/media/media-controller.js:
+ (MediaController.prototype.get layoutTraits):
+
2019-04-14 Rob Buis <[email protected]>
Link prefetch not useful for top-level navigation
Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js (244252 => 244253)
--- trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js 2019-04-15 06:25:36 UTC (rev 244252)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js 2019-04-15 07:11:11 UTC (rev 244253)
@@ -99,7 +99,7 @@
if (this.host && this.host.compactMode)
return LayoutTraits.Compact;
- let traits = window.navigator.platform === "MacIntel" ? LayoutTraits.macOS : LayoutTraits.iOS;
+ let traits = GestureRecognizer.SupportsTouches ? LayoutTraits.iOS : LayoutTraits.macOS;
if (this.isFullscreen)
return traits | LayoutTraits.Fullscreen;
return traits;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes