From: bfulgham@apple.com Date: Fri, 1 Aug 2014 17:38:53 +0000 (+0000) Subject: [Mac] Fullscreen mode for some applications shows only a black screen. X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=e48a3bb72f40336838e2f7639fbf4273f1f26fab [Mac] Fullscreen mode for some applications shows only a black screen. https://bugs.webkit.org/show_bug.cgi?id=135493 Reviewed by Jer Noble. In some applications, the window hosting the WKView is an InProcess layer hosting mode. The fullscreen window created by the WKFullScreenWindowController defaults to an OutOfProcess mode. When this kind of mismatch is encountered, the WK2 layer in the UI process is supposed to send a message back to the WebProcess indicating that the layer hosting mode of the containing window is different, so that the WebProcess can adjust its logic accordingly. Unfortunately, the notification that this had happened was not getting sent to the WebProcess due to an optimization in window state change logic (see Bug 135509 for details). The fix is to check layer hosting mode state when a WKView is added to a window, and notify the WebProcess when it needs to change state to match. * UIProcess/API/mac/WKView.mm: (-[WKView viewDidMoveToWindow]): When moving to a new window, always call 'layerHostingModeDidChange' to pick up any changes in the layer hosting mode. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171920 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 7c1d7f46473f..327dbbfa02dc 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,30 @@ +2014-08-01 Brent Fulgham + + [Mac] Fullscreen mode for some applications shows only a black screen. + https://bugs.webkit.org/show_bug.cgi?id=135493 + + + Reviewed by Jer Noble. + + In some applications, the window hosting the WKView is an InProcess layer hosting mode. + The fullscreen window created by the WKFullScreenWindowController defaults to an + OutOfProcess mode. + + When this kind of mismatch is encountered, the WK2 layer in the UI process is supposed + to send a message back to the WebProcess indicating that the layer hosting mode of the + containing window is different, so that the WebProcess can adjust its logic accordingly. + Unfortunately, the notification that this had happened was not getting sent to the + WebProcess due to an optimization in window state change logic (see Bug 135509 for + details). + + The fix is to check layer hosting mode state when a WKView is added to a window, and + notify the WebProcess when it needs to change state to match. + + + * UIProcess/API/mac/WKView.mm: + (-[WKView viewDidMoveToWindow]): When moving to a new window, always call + 'layerHostingModeDidChange' to pick up any changes in the layer hosting mode. + 2014-08-01 Carlos Garcia Campos [CMake] GTK and EFL are using PROJECT_VERSION_PATCH to define the micro version diff --git a/Source/WebKit2/UIProcess/API/mac/WKView.mm b/Source/WebKit2/UIProcess/API/mac/WKView.mm index c8dd8bf25f6c..5c9768a2b20e 100644 --- a/Source/WebKit2/UIProcess/API/mac/WKView.mm +++ b/Source/WebKit2/UIProcess/API/mac/WKView.mm @@ -2506,6 +2506,9 @@ static void* keyValueObservingContext = &keyValueObservingContext; [self _updateWindowAndViewFrames]; + // FIXME(135509) This call becomes unnecessary once 135509 is fixed; remove. + _data->_page->layerHostingModeDidChange(); + if (!_data->_flagsChangedEventMonitor) { _data->_flagsChangedEventMonitor = [NSEvent addLocalMonitorForEventsMatchingMask:NSFlagsChangedMask handler:^(NSEvent *flagsChangedEvent) { [self _postFakeMouseMovedEventForFlagsChangedEvent:flagsChangedEvent];