Diff
Modified: trunk/LayoutTests/ChangeLog (245941 => 245942)
--- trunk/LayoutTests/ChangeLog 2019-05-31 01:08:30 UTC (rev 245941)
+++ trunk/LayoutTests/ChangeLog 2019-05-31 02:03:59 UTC (rev 245942)
@@ -1,3 +1,22 @@
+2019-05-30 Dean Jackson <[email protected]>
+
+ Media documents on iPad are too wide in split screen
+ https://bugs.webkit.org/show_bug.cgi?id=198405
+ <rdar://problem/50974548>
+
+ Reviewed by Tim Horton.
+
+ Make old test iPhone-specific. Add an iPad-specific test.
+ And mark all the expectations correctly.
+
+ * media/modern-media-controls/media-documents/media-document-video-ipad-sizing-expected.txt: Copied from LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt.
+ * media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html: Copied from LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html.
+ * media/modern-media-controls/media-documents/media-document-video-iphone-sizing-expected.txt: Renamed from LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt.
+ * media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html: Renamed from LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html.
+ * platform/ios/TestExpectations:
+ * platform/ipad/TestExpectations:
+ * platform/mac/TestExpectations:
+
2019-05-30 Devin Rousso <[email protected]>
Web Inspector: Audit: there should be a default test for WebInspectorAudit.Resources functionality
Deleted: trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt (245941 => 245942)
--- trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt 2019-05-31 01:08:30 UTC (rev 245941)
+++ trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt 2019-05-31 02:03:59 UTC (rev 245942)
@@ -1,12 +0,0 @@
-Testing the size of the media element in a video media document on iOS.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS getComputedStyle(media).height became "240px"
-PASS getComputedStyle(media).width is "320px"
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html (245941 => 245942)
--- trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html 2019-05-31 01:08:30 UTC (rev 245941)
+++ trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html 2019-05-31 02:03:59 UTC (rev 245942)
@@ -1,35 +0,0 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
-<script src=""
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<body>
-<iframe src="" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
-<script type="text/_javascript_">
-
-description("Testing the size of the media element in a video media document on iOS.");
-
-window.jsTestIsAsync = true;
-
-let media;
-
-(function runTestIfReady() {
- const iframe = document.querySelector("iframe");
- media = iframe.contentDocument.querySelector("video");
-
- if (!media) {
- setTimeout(runTestIfReady);
- return;
- }
-
- shouldBecomeEqualToString("getComputedStyle(media).height", "240px", () => {
- shouldBeEqualToString("getComputedStyle(media).width", "320px");
-
- debug("");
- iframe.remove();
- finishJSTest();
- });
-
-})();
-
-</script>
-<script src=""
-</body>
Copied: trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing-expected.txt (from rev 245940, trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt) (0 => 245942)
--- trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing-expected.txt (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing-expected.txt 2019-05-31 02:03:59 UTC (rev 245942)
@@ -0,0 +1,11 @@
+Testing the size of the media element in a video media document on iPad.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS getComputedStyle(media).width became "200px"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Copied: trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html (from rev 245940, trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html) (0 => 245942)
--- trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html 2019-05-31 02:03:59 UTC (rev 245942)
@@ -0,0 +1,33 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<script src=""
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<body>
+<iframe src="" style="position: absolute; top: 0; left: 0; width: 200px; height: 100%;"></iframe>
+<script type="text/_javascript_">
+
+description("Testing the size of the media element in a video media document on iPad.");
+
+window.jsTestIsAsync = true;
+
+let media;
+
+(function runTestIfReady() {
+ const iframe = document.querySelector("iframe");
+ media = iframe.contentDocument.querySelector("video");
+
+ if (!media) {
+ setTimeout(runTestIfReady);
+ return;
+ }
+
+ shouldBecomeEqualToString("getComputedStyle(media).width", "200px", () => {
+ debug("");
+ iframe.remove();
+ finishJSTest();
+ });
+
+})();
+
+</script>
+<script src=""
+</body>
Copied: trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing-expected.txt (from rev 245940, trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt) (0 => 245942)
--- trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing-expected.txt (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing-expected.txt 2019-05-31 02:03:59 UTC (rev 245942)
@@ -0,0 +1,12 @@
+Testing the size of the media element in a video media document on iPhone.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS getComputedStyle(media).height became "240px"
+PASS getComputedStyle(media).width is "320px"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Property changes: trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing-expected.txt
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:keywords
+Date Revision
\ No newline at end of property
Added: svn:mime-type
+text/plain
\ No newline at end of property
Copied: trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html (from rev 245940, trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html) (0 => 245942)
--- trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html 2019-05-31 02:03:59 UTC (rev 245942)
@@ -0,0 +1,35 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<script src=""
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<body>
+<iframe src="" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
+<script type="text/_javascript_">
+
+description("Testing the size of the media element in a video media document on iPhone.");
+
+window.jsTestIsAsync = true;
+
+let media;
+
+(function runTestIfReady() {
+ const iframe = document.querySelector("iframe");
+ media = iframe.contentDocument.querySelector("video");
+
+ if (!media) {
+ setTimeout(runTestIfReady);
+ return;
+ }
+
+ shouldBecomeEqualToString("getComputedStyle(media).height", "240px", () => {
+ shouldBeEqualToString("getComputedStyle(media).width", "320px");
+
+ debug("");
+ iframe.remove();
+ finishJSTest();
+ });
+
+})();
+
+</script>
+<script src=""
+</body>
Property changes: trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:keywords
+Date Revision
\ No newline at end of property
Added: svn:mime-type
+text/html
\ No newline at end of property
Modified: trunk/LayoutTests/platform/ios/TestExpectations (245941 => 245942)
--- trunk/LayoutTests/platform/ios/TestExpectations 2019-05-31 01:08:30 UTC (rev 245941)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2019-05-31 02:03:59 UTC (rev 245942)
@@ -3012,6 +3012,7 @@
media/modern-media-controls/media-controller/media-controller-space-bar-toggle-playback.html [ Skip ]
media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html [ Skip ]
media/modern-media-controls/media-documents/media-document-video-mac-sizing.html [ Skip ]
+media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html [ Skip ]
media/modern-media-controls/pip-support [ Skip ]
media/modern-media-controls/playback-support/playback-support-button-click.html [ Skip ]
media/modern-media-controls/scrubber-support/scrubber-support-click.html [ Skip ]
Modified: trunk/LayoutTests/platform/ipad/TestExpectations (245941 => 245942)
--- trunk/LayoutTests/platform/ipad/TestExpectations 2019-05-31 01:08:30 UTC (rev 245941)
+++ trunk/LayoutTests/platform/ipad/TestExpectations 2019-05-31 02:03:59 UTC (rev 245942)
@@ -18,8 +18,11 @@
# These tests are designed for iPhone and crash on iPad
media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html [ Skip ]
-media/modern-media-controls/media-documents/media-document-video-ios-sizing.html [ Skip ]
+media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html [ Skip ]
+# This test is iPad-specific
+media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html [ Pass ]
+
webkit.org/b/194221 fast/forms/datalist/datalist-textinput-suggestions-order.html [ Failure ]
webkit.org/b/194221 fast/forms/datalist/datalist-show-hide.html [ Skip ]
Modified: trunk/LayoutTests/platform/mac/TestExpectations (245941 => 245942)
--- trunk/LayoutTests/platform/mac/TestExpectations 2019-05-31 01:08:30 UTC (rev 245941)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2019-05-31 02:03:59 UTC (rev 245942)
@@ -1375,7 +1375,8 @@
media/modern-media-controls/placard-support/ipad [ Skip ]
media/modern-media-controls/media-controller/ios [ Skip ]
media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html [ Skip ]
-media/modern-media-controls/media-documents/media-document-video-ios-sizing.html [ Skip ]
+media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html [ Skip ]
+media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html [ Skip ]
media/modern-media-controls/scrubber-support/ipad [ Skip ]
# These tests are timing-related and can fail due to performance issues on bots
Modified: trunk/Source/WebCore/ChangeLog (245941 => 245942)
--- trunk/Source/WebCore/ChangeLog 2019-05-31 01:08:30 UTC (rev 245941)
+++ trunk/Source/WebCore/ChangeLog 2019-05-31 02:03:59 UTC (rev 245942)
@@ -1,3 +1,22 @@
+2019-05-30 Dean Jackson <[email protected]>
+
+ Media documents on iPad are too wide in split screen
+ https://bugs.webkit.org/show_bug.cgi?id=198405
+ <rdar://problem/50974548>
+
+ Reviewed by Tim Horton.
+
+ Media documents on iPad had a minimum width of 700px. This
+ was fine in full-screen, but didn't work when then window
+ was smaller, such as split screen or a link preview.
+
+ Tests: media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html
+ media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html
+
+ * Modules/modern-media-controls/controls/media-document.css: Add a media query to
+ detect small windows.
+ * Modules/modern-media-controls/media/media-document-controller.js:
+
2019-05-30 Andres Gonzalez <[email protected]>
Inserting a newline in contenteditable causes two characters to be added instead of one
Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/media-document.css (245941 => 245942)
--- trunk/Source/WebCore/Modules/modern-media-controls/controls/media-document.css 2019-05-31 01:08:30 UTC (rev 245941)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/media-document.css 2019-05-31 02:03:59 UTC (rev 245942)
@@ -60,6 +60,12 @@
min-width: 700px !important;
}
+@media (max-width: 699px) {
+ :host(.media-document.video.ipad) {
+ min-width: 100% !important;
+ }
+}
+
:host(.media-document.video.iphone) {
width: 100% !important;
}
Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js (245941 => 245942)
--- trunk/Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js 2019-05-31 01:08:30 UTC (rev 245941)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js 2019-05-31 02:03:59 UTC (rev 245942)
@@ -39,8 +39,13 @@
const media = mediaController.media;
media.classList.add("media-document");
media.classList.add("audio");
- media.classList.add(window.navigator.platform === "MacIntel" ? "mac" : window.navigator.platform);
+ let deviceType = window.navigator.platform;
+ if (deviceType == "MacIntel")
+ deviceType = GestureRecognizer.SupportsTouches ? "ipad" : "mac";
+
+ media.classList.add(deviceType);
+
media.addEventListener("error", this);
media.addEventListener("play", this);
}