Bug 139437

Summary: Enable automatic optimized fullscreen mode.
Product: WebKit Reporter: Jeremy Jones <jeremyj-wk>
Component: MediaAssignee: Jeremy Jones <jeremyj-wk>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, commit-queue, eric.carlson, esprehn+autocc, glenn, gyuyoung.kim, jer.noble, philipj, sergio, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: Unspecified   
Attachments:
Description Flags
Patch
eric.carlson: review+
Patch for landing. none

Jeremy Jones
Reported 2014-12-09 02:34:02 PST
Enable automatic optimized fullscreen mode.
Attachments
Patch (8.06 KB, patch)
2014-12-09 02:50 PST, Jeremy Jones
eric.carlson: review+
Patch for landing. (8.26 KB, patch)
2014-12-09 11:43 PST, Jeremy Jones
no flags
Jeremy Jones
Comment 1 2014-12-09 02:35:11 PST
Jeremy Jones
Comment 2 2014-12-09 02:50:35 PST
Eric Carlson
Comment 3 2014-12-09 07:10:36 PST
Comment on attachment 242900 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=242900&action=review r=me but this needs a thumbs-up from a WK2 reviewer as well. > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:244 > + if (_page->videoFullscreenManager()->mode() & WebCore::HTMLMediaElement::VideoFullscreenModeOptimized) > return true; > > return false; Nit: this could be simplified to "return _page->videoFullscreenManager()->mode() & WebCore::HTMLMediaElement::VideoFullscreenModeOptimized" > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:255 > + if (_page->videoFullscreenManager()->willAutomaticallyEnterOptimizedMode()) > + return true; > + > + return false; Nit: this could be simplified to "return _page->videoFullscreenManager()->willAutomaticallyEnterOptimizedMode()" > Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm:191 > + if ([m_webView _willAutomaticallyEnterOptimizedVideoMode]) > + return true; > + > + return false; This could be simplified as well, but I think it is clearer as-is.
Jeremy Jones
Comment 4 2014-12-09 10:58:24 PST
(In reply to comment #3) > Comment on attachment 242900 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=242900&action=review > > r=me but this needs a thumbs-up from a WK2 reviewer as well. > > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:244 > > + if (_page->videoFullscreenManager()->mode() & WebCore::HTMLMediaElement::VideoFullscreenModeOptimized) > > return true; > > > > return false; > > Nit: this could be simplified to "return > _page->videoFullscreenManager()->mode() & > WebCore::HTMLMediaElement::VideoFullscreenModeOptimized" Done. > > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:255 > > + if (_page->videoFullscreenManager()->willAutomaticallyEnterOptimizedMode()) > > + return true; > > + > > + return false; > > Nit: this could be simplified to "return > _page->videoFullscreenManager()->willAutomaticallyEnterOptimizedMode()" Done. > > > Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm:191 > > + if ([m_webView _willAutomaticallyEnterOptimizedVideoMode]) > > + return true; > > + > > + return false; > > This could be simplified as well, but I think it is clearer as-is. Left as-is.
Simon Fraser (smfr)
Comment 5 2014-12-09 11:05:26 PST
Comment on attachment 242900 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=242900&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:238 > + if (!_page || !_page->videoFullscreenManager()) Can _page actually be null? When does this happen? > Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm:189 > + if ([m_webView _isPlayingFullscreenOptimizedVideo]) > + return true; > + > + if ([m_webView _willAutomaticallyEnterOptimizedVideoMode]) > + return true; _willAutomaticallyEnterOptimizedVideoMode is confusing. Isn't this really "playing fullscreen video" && "supports optimized fullscreen"?
Jeremy Jones
Comment 6 2014-12-09 11:43:11 PST
Created attachment 242951 [details] Patch for landing.
Jeremy Jones
Comment 7 2014-12-09 11:45:29 PST
(In reply to comment #5) > Comment on attachment 242900 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=242900&action=review > > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:238 > > + if (!_page || !_page->videoFullscreenManager()) > > Can _page actually be null? When does this happen? > > > Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm:189 > > + if ([m_webView _isPlayingFullscreenOptimizedVideo]) > > + return true; > > + > > + if ([m_webView _willAutomaticallyEnterOptimizedVideoMode]) > > + return true; > > _willAutomaticallyEnterOptimizedVideoMode is confusing. > > Isn't this really "playing fullscreen video" && "supports optimized > fullscreen"? Changed these to _isShowingVideoOptimized and _mayAutomaticallyShowVideoOptimized
WebKit Commit Bot
Comment 8 2014-12-09 13:54:11 PST
Comment on attachment 242951 [details] Patch for landing. Clearing flags on attachment: 242951 Committed r177039: <http://trac.webkit.org/changeset/177039>
Note You need to log in before you can comment on or make changes to this bug.