diff options
author | joepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | 2013-01-28 22:38:26 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-08 17:35:16 +0200 |
commit | 412ec5284b300668101a1db137e08a729008d164 (patch) | |
tree | be76826e8200e642448c585bad98fc74e60486d9 /Source/JavaScriptCore/API/JSProfilerPrivate.cpp | |
parent | 0dd9e57645d192fca388abe8f04e93ca7bef6ad6 (diff) | |
download | qtwebkit-412ec5284b300668101a1db137e08a729008d164.tar.gz |
[Mac] Update PageVisibilityState when WebView is hidden / visible
https://bugs.webkit.org/show_bug.cgi?id=107509
Source/WebKit/mac:
Reviewed by NOBODY (OOPS!).
* WebView/WebView.mm:
* WebView/WebViewPrivate.h:
(-[WebView _commonInitializationWithFrameName:groupName:]):
Set the initial visibility of the page.
(-[WebView addWindowObserversForWindow:]):
(-[WebView removeWindowObservers]):
(-[WebView _isViewVisible]):
(-[WebView _updateVisibilityState]):
(-[WebView viewDidMoveToWindow]):
(-[WebView _windowVisibilityChanged:]):
Update visibility state in the same ways WK2 does. This involves
listening for some new NSWindow delegates.
Tools:
Add a test that PageVisibility of WK1 WebViews and WK2 WKViews
automatically changes between hidden and visible as the view is added
and removed from window, or when it is in a window that changes
visibility, for instance by minimizing / deminimizing.
Reviewed by NOBODY (OOPS!).
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.html: Added.
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: Added.
(-[PageVisibilityStateDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
(runJavaScriptAlert):
(PageVisibilityStateWithWindowChanges):
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::initializeView):
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::deinitializeView):
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
(TestWebKitAPI::TEST_F):
Test visibility state of a page in a WebView/WKView with different window states.
* TestWebKitAPI/mac/WebKitAgnosticTest.h:
* TestWebKitAPI/mac/WebKitAgnosticTest.mm:
(TestWebKitAPI::WebKitAgnosticTest::deinitializeView):
(TestWebKitAPI::WebKitAgnosticTest::runWebKit1Test):
(TestWebKitAPI::WebKitAgnosticTest::runWebKit2Test):
Add a WK1 and WK2 deinitializeView to balance initializeView.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change-Id: Ie9ef191e55f69ee32b01a0e7220820be038ac8a4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/API/JSProfilerPrivate.cpp')
0 files changed, 0 insertions, 0 deletions