Changeset 117326 in webkit
- Timestamp:
- May 16, 2012 12:55:05 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r117325 r117326 1 2012-05-16 Jer Noble <jer.noble@apple.com> 2 3 <video> elements with no video tracks report false for webkitSupportsFullscreen. 4 https://bugs.webkit.org/show_bug.cgi?id=86650 5 6 Reviewed by Eric Carlson. 7 8 Fix media-fullscreen.js to support the new FULLSCREEN_API events, if present. 9 Fix the media-fullscreen-inline.html test and unskip on Lion. 10 11 * media/media-fullscreen-inline-expected.txt: 12 * media/media-fullscreen-inline.html: 13 * media/media-fullscreen.js: 14 (fullscreenchange): 15 (loadedmetadata): 16 (addEventListeners): 17 * platform/mac-lion/Skipped: 18 1 19 2012-05-16 Marcelo Lira <marcelo.lira@openbossa.org> 2 20 -
trunk/LayoutTests/media/media-fullscreen-inline-expected.txt
r54143 r117326 15 15 * event handler triggered by user gesture 16 16 17 *** Creating <video> element with "content/silence.mpg" in the document, should NOT support fullscreen because it is an audio-only <video> element18 EVENT(loadstart)19 EVENT(durationchange)20 EVENT(canplaythrough)21 * event handler NOT triggered by a user gesture22 EXPECTED (mediaElement.webkitSupportsFullscreen == 'false') OK23 EXPECTED (mediaElement.webkitDisplayingFullscreen == 'false') OK24 TEST(mediaElement.webkitEnterFullScreen()) THROWS(DOMException.INVALID_STATE_ERR) OK25 * clicking on button26 EVENT(mouseup)27 * event handler triggered by user gesture28 TEST(mediaElement.webkitEnterFullScreen()) THROWS(DOMException.INVALID_STATE_ERR) OK29 30 17 *** Creating <video> element with "content/test.mp4" in the document, should support fullscreen because it is a <video> element with video media 31 18 EVENT(loadstart) … … 40 27 * event handler triggered by user gesture 41 28 RUN(mediaElement.webkitEnterFullScreen()) 42 EVENT(webkit beginfullscreen)29 EVENT(webkitfullscreenchange) 43 30 EXPECTED (mediaElement.webkitDisplayingFullscreen == 'true') OK 44 31 RUN(mediaElement.webkitExitFullScreen()) 45 EVENT(webkit endfullscreen)32 EVENT(webkitfullscreenchange) 46 33 47 34 END OF TEST -
trunk/LayoutTests/media/media-fullscreen-inline.html
r79630 r117326 19 19 inline : true, 20 20 type : 'audio', 21 },22 {23 url : "content/silence.mpg",24 description : "because it is an audio-only <video> element",25 supportsFS : false,26 inline : true,27 type : 'video',28 21 }, 29 22 { -
trunk/LayoutTests/media/media-fullscreen.js
r54143 r117326 26 26 eventSender.mouseDown(); 27 27 eventSender.mouseUp(); 28 } 29 30 function fullscreenchange() 31 { 32 if (document.webkitIsFullScreen) 33 beginfullscreen(); 34 else 35 endfullscreen(); 28 36 } 29 37 … … 115 123 waitForEvent('webkitbeginfullscreen', beginfullscreen); 116 124 waitForEvent('webkitendfullscreen', endfullscreen); 125 waitForEvent('webkitfullscreenchange', fullscreenchange); 117 126 } 118 127 -
trunk/LayoutTests/platform/mac-lion/Skipped
r117163 r117326 73 73 media/controls-without-preload.html 74 74 media/media-document-audio-repaint.html 75 media/media-fullscreen-inline.html76 75 media/media-fullscreen-not-in-document.html 77 76 media/video-canvas-alpha.html -
trunk/Source/WebCore/ChangeLog
r117323 r117326 1 2012-05-16 Jer Noble <jer.noble@apple.com> 2 3 <video> elements with no video tracks report false for webkitSupportsFullscreen. 4 https://bugs.webkit.org/show_bug.cgi?id=86650 5 6 Reviewed by Eric Carlson. 7 8 No new tests; updated media/media-fullscreen-inline.html. 9 10 With the new Full Screen API, the restriction that only video elements with 11 video tracks can enter full screen seems arbitrary. Some media types will 12 occasionally determine they have video tracks long after loadedmetadata, which 13 breaks websites who check for webkitSupportsFullscreen(). Relax the restriction 14 on webkitSupportsFullscreen() for ports where the Full Screen API is enabled and 15 supported so as to no longer require hasVideo(). 16 17 * html/HTMLVideoElement.cpp: 18 (WebCore::HTMLVideoElement::supportsFullscreen): 19 1 20 2012-05-16 Andreas Kling <kling@webkit.org> 2 21 -
trunk/Source/WebCore/html/HTMLVideoElement.cpp
r117195 r117326 141 141 return false; 142 142 143 if (!player() || !player()->supportsFullscreen() || !player()->hasVideo())143 if (!player() || !player()->supportsFullscreen()) 144 144 return false; 145 145 146 // Check with the platform client.147 146 #if ENABLE(FULLSCREEN_API) 147 // If the full screen API is enabled and is supported for the current element 148 // do not require that the player has a video track to enter full screen. 148 149 if (page->chrome()->client()->supportsFullScreenForElement(this, false)) 149 150 return true; 150 151 #endif 152 153 if (!player()->hasVideo()) 154 return false; 151 155 152 156 return page->chrome()->client()->supportsFullscreenForNode(this);
Note: See TracChangeset
for help on using the changeset viewer.