⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245942 in webkit


Ignore:
Timestamp:
May 30, 2019, 7:03:59 PM (7 years ago)
Author:
dino@apple.com
Message:

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.

Source/WebCore:

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:

LayoutTests:

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:
Location:
trunk
Files:
7 edited
2 copied
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r245914 r245942  
     12019-05-30  Dean Jackson  <dino@apple.com>
     2
     3        Media documents on iPad are too wide in split screen
     4        https://bugs.webkit.org/show_bug.cgi?id=198405
     5        <rdar://problem/50974548>
     6
     7        Reviewed by Tim Horton.
     8
     9        Make old test iPhone-specific. Add an iPad-specific test.
     10        And mark all the expectations correctly.
     11
     12        * 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.
     13        * 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.
     14        * 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.
     15        * 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.
     16        * platform/ios/TestExpectations:
     17        * platform/ipad/TestExpectations:
     18        * platform/mac/TestExpectations:
     19
    1202019-05-30  Devin Rousso  <drousso@apple.com>
    221
  • trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing-expected.txt

    r245940 r245942  
    1 Testing the size of the media element in a video media document on iOS.
     1Testing the size of the media element in a video media document on iPad.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    44
    55
    6 PASS getComputedStyle(media).height became "240px"
    7 PASS getComputedStyle(media).width is "320px"
     6PASS getComputedStyle(media).width became "200px"
    87
    98PASS successfullyParsed is true
  • trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html

    r245940 r245942  
    33<meta name="viewport" content="width=device-width, initial-scale=1">
    44<body>
    5 <iframe src="../../content/test.mp4" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
     5<iframe src="../../content/test.mp4" style="position: absolute; top: 0; left: 0; width: 200px; height: 100%;"></iframe>
    66<script type="text/javascript">
    77
    8 description("Testing the size of the media element in a video media document on iOS.");
     8description("Testing the size of the media element in a video media document on iPad.");
    99
    1010window.jsTestIsAsync = true;
     
    2121    }
    2222
    23     shouldBecomeEqualToString("getComputedStyle(media).height", "240px", () => {
    24         shouldBeEqualToString("getComputedStyle(media).width", "320px");
    25 
     23    shouldBecomeEqualToString("getComputedStyle(media).width", "200px", () => {
    2624        debug("");
    2725        iframe.remove();
  • trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing-expected.txt

    • Property svn:eol-style set to native
    • Property svn:keywords set to Date Revision
    • Property svn:mime-type set to text/plain
    r245940 r245942  
    1 Testing the size of the media element in a video media document on iOS.
     1Testing the size of the media element in a video media document on iPhone.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
  • trunk/LayoutTests/media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html

    • Property svn:eol-style set to native
    • Property svn:keywords set to Date Revision
    • Property svn:mime-type set to text/html
    r245940 r245942  
    66<script type="text/javascript">
    77
    8 description("Testing the size of the media element in a video media document on iOS.");
     8description("Testing the size of the media element in a video media document on iPhone.");
    99
    1010window.jsTestIsAsync = true;
  • trunk/LayoutTests/platform/ios/TestExpectations

    r245900 r245942  
    30133013media/modern-media-controls/media-documents/media-document-audio-mac-sizing.html [ Skip ]
    30143014media/modern-media-controls/media-documents/media-document-video-mac-sizing.html [ Skip ]
     3015media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html [ Skip ]
    30153016media/modern-media-controls/pip-support [ Skip ]
    30163017media/modern-media-controls/playback-support/playback-support-button-click.html [ Skip ]
  • trunk/LayoutTests/platform/ipad/TestExpectations

    r244096 r245942  
    1919# These tests are designed for iPhone and crash on iPad
    2020media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html [ Skip ]
    21 media/modern-media-controls/media-documents/media-document-video-ios-sizing.html [ Skip ]
     21media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html [ Skip ]
     22
     23# This test is iPad-specific
     24media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html [ Pass ]
    2225
    2326webkit.org/b/194221 fast/forms/datalist/datalist-textinput-suggestions-order.html [ Failure ]
  • trunk/LayoutTests/platform/mac/TestExpectations

    r245821 r245942  
    13761376media/modern-media-controls/media-controller/ios [ Skip ]
    13771377media/modern-media-controls/media-documents/media-document-audio-ios-sizing.html [ Skip ]
    1378 media/modern-media-controls/media-documents/media-document-video-ios-sizing.html [ Skip ]
     1378media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html [ Skip ]
     1379media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html [ Skip ]
    13791380media/modern-media-controls/scrubber-support/ipad [ Skip ]
    13801381
  • trunk/Source/WebCore/ChangeLog

    r245912 r245942  
     12019-05-30  Dean Jackson  <dino@apple.com>
     2
     3        Media documents on iPad are too wide in split screen
     4        https://bugs.webkit.org/show_bug.cgi?id=198405
     5        <rdar://problem/50974548>
     6
     7        Reviewed by Tim Horton.
     8
     9        Media documents on iPad had a minimum width of 700px. This
     10        was fine in full-screen, but didn't work when then window
     11        was smaller, such as split screen or a link preview.
     12
     13        Tests: media/modern-media-controls/media-documents/media-document-video-ipad-sizing.html
     14               media/modern-media-controls/media-documents/media-document-video-iphone-sizing.html
     15
     16        * Modules/modern-media-controls/controls/media-document.css: Add a media query to
     17        detect small windows.
     18        * Modules/modern-media-controls/media/media-document-controller.js:
     19
    1202019-05-30  Andres Gonzalez  <andresg_22@apple.com>
    221
  • trunk/Source/WebCore/Modules/modern-media-controls/controls/media-document.css

    r218600 r245942  
    6161}
    6262
     63@media (max-width: 699px) {
     64    :host(.media-document.video.ipad) {
     65        min-width: 100% !important;
     66    }
     67}
     68
    6369:host(.media-document.video.iphone) {
    6470    width: 100% !important;
  • trunk/Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js

    r218600 r245942  
    4040        media.classList.add("media-document");
    4141        media.classList.add("audio");
    42         media.classList.add(window.navigator.platform === "MacIntel" ? "mac" : window.navigator.platform);
     42
     43        let deviceType = window.navigator.platform;
     44        if (deviceType == "MacIntel")
     45            deviceType = GestureRecognizer.SupportsTouches ? "ipad" : "mac";
     46
     47        media.classList.add(deviceType);
    4348
    4449        media.addEventListener("error", this);
Note: See TracChangeset for help on using the changeset viewer.