Title: [189081] trunk/Source/WebKit2
- Revision
- 189081
- Author
- [email protected]
- Date
- 2015-08-27 19:11:36 -0700 (Thu, 27 Aug 2015)
Log Message
Video full-screen shouldn't use the DynamicSizeWithMinimumViewSize layout mode
https://bugs.webkit.org/show_bug.cgi?id=148553
Reviewed by Zalan Bujtas.
* UIProcess/API/mac/WKView.mm:
(-[WKView _supportsArbitraryLayoutModes]):
(-[WKView _updateSupportsArbitraryLayoutModes]):
(-[WKView _didCommitLoadForMainFrame]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Deleted.
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Deleted.
It's not OK to just randomly change the layout mode, because the client
can change it or its properties out from under us, and also because we
weren't resetting it to whatever the client had specified.
I recently implemented a better way to override layout modes, for PDF,
so use that here. Also, we shouldn't use DynamicSizeWithMinimumViewSize,
we should just use the "normal" mode (ViewSize), since we've already ensured
a minimum size by setting contentMinSize.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (189080 => 189081)
--- trunk/Source/WebKit2/ChangeLog 2015-08-28 01:43:14 UTC (rev 189080)
+++ trunk/Source/WebKit2/ChangeLog 2015-08-28 02:11:36 UTC (rev 189081)
@@ -1,3 +1,30 @@
+2015-08-27 Timothy Horton <[email protected]>
+
+ Video full-screen shouldn't use the DynamicSizeWithMinimumViewSize layout mode
+ https://bugs.webkit.org/show_bug.cgi?id=148553
+
+ Reviewed by Zalan Bujtas.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView _supportsArbitraryLayoutModes]):
+ (-[WKView _updateSupportsArbitraryLayoutModes]):
+ (-[WKView _didCommitLoadForMainFrame]):
+ * UIProcess/API/mac/WKViewInternal.h:
+ * UIProcess/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::beganEnterFullScreen):
+ (WebKit::PageClientImpl::beganExitFullScreen):
+ * UIProcess/mac/WKFullScreenWindowController.mm:
+ (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Deleted.
+ (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Deleted.
+ It's not OK to just randomly change the layout mode, because the client
+ can change it or its properties out from under us, and also because we
+ weren't resetting it to whatever the client had specified.
+
+ I recently implemented a better way to override layout modes, for PDF,
+ so use that here. Also, we shouldn't use DynamicSizeWithMinimumViewSize,
+ we should just use the "normal" mode (ViewSize), since we've already ensured
+ a minimum size by setting contentMinSize.
+
2015-08-27 Alexey Proskuryakov <[email protected]>
pluginInfo.clientLoadPolicy is used uninitialized in WebContent process
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (189080 => 189081)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-08-28 01:43:14 UTC (rev 189080)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm 2015-08-28 02:11:36 UTC (rev 189081)
@@ -3901,6 +3901,9 @@
- (BOOL)_supportsArbitraryLayoutModes
{
+ if ([_data->_fullScreenWindowController isFullScreen])
+ return NO;
+
WebPageProxy* page = _data->_page.get();
if (!page)
return YES;
@@ -3916,7 +3919,7 @@
return YES;
}
-- (void)_didCommitLoadForMainFrame
+- (void)_updateSupportsArbitraryLayoutModes
{
if (![self _supportsArbitraryLayoutModes]) {
WKLayoutMode oldRequestedLayoutMode = _data->_lastRequestedLayoutMode;
@@ -3934,6 +3937,11 @@
}
}
+- (void)_didCommitLoadForMainFrame
+{
+ [self _updateSupportsArbitraryLayoutModes];
+}
+
- (void)_didFinishLoadForMainFrame
{
if (_data->_gestureController)
Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (189080 => 189081)
--- trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h 2015-08-28 01:43:14 UTC (rev 189080)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h 2015-08-28 02:11:36 UTC (rev 189081)
@@ -161,4 +161,6 @@
- (void)_updateViewExposedRect;
- (CALayer *)_rootLayer;
+- (void)_updateSupportsArbitraryLayoutModes;
+
@end
Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (189080 => 189081)
--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm 2015-08-28 01:43:14 UTC (rev 189080)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm 2015-08-28 02:11:36 UTC (rev 189081)
@@ -708,11 +708,13 @@
void PageClientImpl::beganEnterFullScreen(const IntRect& initialFrame, const IntRect& finalFrame)
{
[m_wkView._fullScreenWindowController beganEnterFullScreenWithInitialFrame:initialFrame finalFrame:finalFrame];
+ [m_wkView _updateSupportsArbitraryLayoutModes];
}
void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntRect& finalFrame)
{
[m_wkView._fullScreenWindowController beganExitFullScreenWithInitialFrame:initialFrame finalFrame:finalFrame];
+ [m_wkView _updateSupportsArbitraryLayoutModes];
}
#endif // ENABLE(FULLSCREEN_API)
Modified: trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm (189080 => 189081)
--- trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2015-08-28 01:43:14 UTC (rev 189080)
+++ trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm 2015-08-28 02:11:36 UTC (rev 189081)
@@ -301,8 +301,6 @@
[_webViewPlaceholder setExitWarningVisible:YES];
[_webViewPlaceholder setTarget:self];
- [_webView _setLayoutMode:kWKLayoutModeDynamicSizeWithMinimumViewSize];
-
NSSize minContentSize = self.window.contentMinSize;
minContentSize.width = minVideoWidth;
self.window.contentMinSize = minContentSize;
@@ -392,7 +390,6 @@
makeResponderFirstResponderIfDescendantOfView(_webView.window, firstResponder, _webView);
[[_webView window] makeKeyAndOrderFront:self];
- [_webView _setLayoutMode:kWKLayoutModeViewSize];
// These messages must be sent after the swap or flashing will occur during forceRepaint:
[self _manager]->didExitFullScreen();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes