WebKit Bugzilla
Attachment 371015 Details for
Bug 198405
: Media documents on iPad are too wide in split screen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198405-20190531115907.patch (text/plain), 14.06 KB, created by
Dean Jackson
on 2019-05-30 18:59:09 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dean Jackson
Created:
2019-05-30 18:59:09 PDT
Size:
14.06 KB
patch
obsolete
>Subversion Revision: 245869 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index cce9f6e29450c090df37dc92cfed55160cf847d0..83c854d2c3c76a96f4e604df8e4f9c7f3f174042 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2019-05-30 Dean Jackson <dino@apple.com> >+ >+ Media documents on iPad are too wide in split screen >+ https://bugs.webkit.org/show_bug.cgi?id=198405 >+ <rdar://problem/50974548> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-29 Geoffrey Garen <ggaren@apple.com> > > WeakPtr breaks vtables when upcasting to base classes >diff --git a/Source/WebCore/Modules/modern-media-controls/controls/media-document.css b/Source/WebCore/Modules/modern-media-controls/controls/media-document.css >index 3f81ccef520b632bab62bd16deffad4a989c20fb..2d383f4e7152238e4e523c5e240a4a3a15986c66 100644 >--- a/Source/WebCore/Modules/modern-media-controls/controls/media-document.css >+++ b/Source/WebCore/Modules/modern-media-controls/controls/media-document.css >@@ -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; > } >diff --git a/Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js b/Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js >index 8bf275d700404c3620d13570ed849a70402edf60..83b2744aa10730ada19dfea7dc40adbb506b71da 100644 >--- a/Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js >+++ b/Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js >@@ -39,7 +39,12 @@ class MediaDocumentController > 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); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 1e9023737da75e99b4089d4e389e40df6618e678..d705e295a4384ea178f339178f9fd2194e71e726 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,22 @@ >+2019-05-30 Dean Jackson <dino@apple.com> >+ >+ Media documents on iPad are too wide in split screen >+ https://bugs.webkit.org/show_bug.cgi?id=198405 >+ <rdar://problem/50974548> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-29 Antti Koivisto <antti@apple.com> > > Scrolling node ordering wrong when a layer has both positioning and fixed/sticky node >diff --git a/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt b/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt >deleted file mode 100644 >index 6c54dfcec131cefb6354b1be1581850ded5743ed..0000000000000000000000000000000000000000 >--- a/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing-expected.txt >+++ /dev/null >@@ -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 >- >diff --git a/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html b/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html >deleted file mode 100644 >index e1cb81a66576a30b82bdb27fd70be87158499249..0000000000000000000000000000000000000000 >--- a/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ios-sizing.html >+++ /dev/null >@@ -1,35 +0,0 @@ >-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >-<script src="../../../resources/js-test-pre.js"></script> >-<meta name="viewport" content="width=device-width, initial-scale=1"> >-<body> >-<iframe src="../../content/test.mp4" 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="../../../resources/js-test-post.js"></script> >-</body> >diff --git a/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing-expected.txt b/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..45fd2efea15486d2fbc53625b7b9ab3a1cf676be >--- /dev/null >+++ b/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing-expected.txt >@@ -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 >+ >diff --git a/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html b/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2b180c120daa5eeef98ef3d5feec54ef7c94b3d6 >--- /dev/null >+++ b/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html >@@ -0,0 +1,33 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<script src="../../../resources/js-test-pre.js"></script> >+<meta name="viewport" content="width=device-width, initial-scale=1"> >+<body> >+<iframe src="../../content/test.mp4" 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="../../../resources/js-test-post.js"></script> >+</body> >diff --git a/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing-expected.txt b/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..cd7ae71f7e2100a9fdbea3446e532dcfa1678583 >--- /dev/null >+++ b/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing-expected.txt >@@ -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 >+ >diff --git a/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html b/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html >new file mode 100644 >index 0000000000000000000000000000000000000000..4ed31c26d947b3cca371ee3ccf0188f71f9cbd38 >--- /dev/null >+++ b/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+<script src="../../../resources/js-test-pre.js"></script> >+<meta name="viewport" content="width=device-width, initial-scale=1"> >+<body> >+<iframe src="../../content/test.mp4" 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="../../../resources/js-test-post.js"></script> >+</body> >diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations >index b5bf208c44ff671ebe74b91a0837937c79790071..4403cff8db110c47ef77865cc819a9e56fc1efca 100644 >--- a/LayoutTests/platform/ios/TestExpectations >+++ b/LayoutTests/platform/ios/TestExpectations >@@ -3009,6 +3009,7 @@ media/modern-media-controls/media-controller/media-controller-click-on-video-bac > 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 ] >diff --git a/LayoutTests/platform/ipad/TestExpectations b/LayoutTests/platform/ipad/TestExpectations >index 1467c3085ce0ee87e824eccf32a8edb7d5693eda..7a84021a98f04a832da40a39e53bbd5c0c8d36ba 100644 >--- a/LayoutTests/platform/ipad/TestExpectations >+++ b/LayoutTests/platform/ipad/TestExpectations >@@ -18,7 +18,10 @@ fast/visual-viewport/ios/caret-after-focus-in-fixed.html [ Skip ] > > # 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 ] >diff --git a/LayoutTests/platform/mac/TestExpectations b/LayoutTests/platform/mac/TestExpectations >index 2cc9aac0f04f8bd84c8896d71643886e2a4293e1..e284d8ccf00a09cf261199f933ce9b768f3fb0cc 100644 >--- a/LayoutTests/platform/mac/TestExpectations >+++ b/LayoutTests/platform/mac/TestExpectations >@@ -1375,7 +1375,8 @@ media/modern-media-controls/ios-inline-media-controls [ Skip ] > 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
thorton
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198405
: 371015