<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[163821] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/163821">163821</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2014-02-10 14:30:33 -0800 (Mon, 10 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove WKPageSetVisibilityState
https://bugs.webkit.org/show_bug.cgi?id=128551
Reviewed by Anders Carlsson.
Source/WebKit2:
Made prerender state automatic. We should move this further
up into WebCore, but this requires refactoring for the Page
construction order.
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPageSetVisibilityState):
- deprecated.
* UIProcess/API/C/WKPage.cpp:
- removed WKPageSetVisibilityState.
* UIProcess/API/C/WKPage.h:
- removed WKPageSetVisibilityState.
* UIProcess/WebPageProxy.cpp:
- removed setVisibilityStatePrerender.
* UIProcess/WebPageProxy.h:
- removed setVisibilityStatePrerender.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
- removed setVisibilityStatePrerender.
- When creating a Page, automatically set the prerender state.
* WebProcess/WebPage/WebPage.h:
- removed setVisibilityStatePrerender.
* WebProcess/WebPage/WebPage.messages.in:
- removed SetVisibilityStatePrerender.
Tools:
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::initializeView):
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
- visibilityState of offs-creen WKView is automatically prerender.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::setHidden):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setPageVisibility):
(WTR::TestRunner::resetPageVisibility):
* WebKitTestRunner/TestController.cpp:
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- removed calls to WKPageSetVisibilityState.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIcWKDeprecatedFunctionscpp">trunk/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageh">trunk/Source/WebKit2/UIProcess/API/C/WKPage.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsmacPageVisibilityStateWithWindowChangesmm">trunk/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlecpp">trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleInjectedBundleh">trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp">trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllercpp">trunk/Tools/WebKitTestRunner/TestController.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestControllerh">trunk/Tools/WebKitTestRunner/TestController.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerTestInvocationcpp">trunk/Tools/WebKitTestRunner/TestInvocation.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2014-02-10 Gavin Barraclough <barraclough@apple.com>
+
+ Remove WKPageSetVisibilityState
+ https://bugs.webkit.org/show_bug.cgi?id=128551
+
+ Reviewed by Anders Carlsson.
+
+ Made prerender state automatic. We should move this further
+ up into WebCore, but this requires refactoring for the Page
+ construction order.
+
+ * Shared/API/c/WKDeprecatedFunctions.cpp:
+ (WKPageSetVisibilityState):
+ - deprecated.
+ * UIProcess/API/C/WKPage.cpp:
+ - removed WKPageSetVisibilityState.
+ * UIProcess/API/C/WKPage.h:
+ - removed WKPageSetVisibilityState.
+ * UIProcess/WebPageProxy.cpp:
+ - removed setVisibilityStatePrerender.
+ * UIProcess/WebPageProxy.h:
+ - removed setVisibilityStatePrerender.
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+ - removed setVisibilityStatePrerender.
+ - When creating a Page, automatically set the prerender state.
+ * WebProcess/WebPage/WebPage.h:
+ - removed setVisibilityStatePrerender.
+ * WebProcess/WebPage/WebPage.messages.in:
+ - removed SetVisibilityStatePrerender.
+
</ins><span class="cx"> 2014-02-10 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> IDB: storage/indexeddb/mozilla/object-store-remove-values.html fails
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIcWKDeprecatedFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -41,6 +41,8 @@
</span><span class="cx"> extern "C" {
</span><span class="cx"> WK_EXPORT bool WKArrayIsMutable(WKArrayRef array);
</span><span class="cx">
</span><ins>+WK_EXPORT void WKPageSetVisibilityState(WKPageRef, WKPageVisibilityState, bool);
+
</ins><span class="cx"> WK_EXPORT bool WKDictionaryAddItem(WKMutableDictionaryRef dictionary, WKStringRef key, WKTypeRef item);
</span><span class="cx"> WK_EXPORT bool WKDictionaryIsMutable(WKDictionaryRef dictionary);
</span><span class="cx"> WK_EXPORT void WKDictionaryRemoveItem(WKMutableDictionaryRef dictionary, WKStringRef key);
</span><span class="lines">@@ -55,6 +57,10 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WKPageSetVisibilityState(WKPageRef, WKPageVisibilityState, bool)
+{
+}
+
</ins><span class="cx"> bool WKDictionaryIsMutable(WKDictionaryRef dictionaryRef)
</span><span class="cx"> {
</span><span class="cx"> return toImpl(dictionaryRef)->isMutable();
</span><span class="lines">@@ -70,7 +76,6 @@
</span><span class="cx"> toImpl(dictionaryRef)->remove(toImpl(keyRef)->string());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -436,12 +436,6 @@
</span><span class="cx"> toImpl(pageRef)->listenForLayoutMilestones(toLayoutMilestones(milestones));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WKPageSetVisibilityState(WKPageRef pageRef, WKPageVisibilityState state, bool)
-{
- if (state == kWKPageVisibilityStatePrerender)
- toImpl(pageRef)->setVisibilityStatePrerender();
-}
-
</del><span class="cx"> bool WKPageHasHorizontalScrollbar(WKPageRef pageRef)
</span><span class="cx"> {
</span><span class="cx"> return toImpl(pageRef)->hasHorizontalScrollbar();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.h (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.h        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.h        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -155,8 +155,6 @@
</span><span class="cx">
</span><span class="cx"> WK_EXPORT void WKPageListenForLayoutMilestones(WKPageRef page, WKLayoutMilestones milestones);
</span><span class="cx">
</span><del>-WK_EXPORT void WKPageSetVisibilityState(WKPageRef page, WKPageVisibilityState state, bool isInitialState);
-
</del><span class="cx"> WK_EXPORT bool WKPageHasHorizontalScrollbar(WKPageRef page);
</span><span class="cx"> WK_EXPORT bool WKPageHasVerticalScrollbar(WKPageRef page);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -1743,13 +1743,6 @@
</span><span class="cx"> m_process->send(Messages::WebPage::ListenForLayoutMilestones(milestones), m_pageID);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::setVisibilityStatePrerender()
-{
- if (!isValid())
- return;
- m_process->send(Messages::WebPage::SetVisibilityStatePrerender(), m_pageID);
-}
-
</del><span class="cx"> void WebPageProxy::setSuppressScrollbarAnimations(bool suppressAnimations)
</span><span class="cx"> {
</span><span class="cx"> if (!isValid())
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -591,7 +591,6 @@
</span><span class="cx">
</span><span class="cx"> void listenForLayoutMilestones(WebCore::LayoutMilestones);
</span><span class="cx">
</span><del>- void setVisibilityStatePrerender();
</del><span class="cx"> void didUpdateViewState() { m_waitingForDidUpdateViewState = false; }
</span><span class="cx">
</span><span class="cx"> bool hasHorizontalScrollbar() const { return m_mainFrameHasHorizontalScrollbar; }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -384,7 +384,11 @@
</span><span class="cx">
</span><span class="cx"> setMemoryCacheMessagesEnabled(parameters.areMemoryCacheClientCallsEnabled);
</span><span class="cx">
</span><ins>+ // If the page is created off-screen, its visibilityState should be prerender.
</ins><span class="cx"> m_page->setViewState(m_viewState);
</span><ins>+ if (!isVisible())
+ m_page->setIsPrerender();
+
</ins><span class="cx"> updateIsInWindow(true);
</span><span class="cx">
</span><span class="cx"> setMinimumLayoutSize(parameters.minimumLayoutSize);
</span><span class="lines">@@ -3720,12 +3724,6 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPage::setVisibilityStatePrerender()
-{
- if (m_page)
- m_page->setIsPrerender();
-}
-
</del><span class="cx"> void WebPage::setScrollingPerformanceLoggingEnabled(bool enabled)
</span><span class="cx"> {
</span><span class="cx"> m_scrollingPerformanceLoggingEnabled = enabled;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -638,7 +638,6 @@
</span><span class="cx"> void numWheelEventHandlersChanged(unsigned);
</span><span class="cx"> void recomputeShortCircuitHorizontalWheelEventsState();
</span><span class="cx">
</span><del>- void setVisibilityStatePrerender();
</del><span class="cx"> void updateVisibilityState(bool isInitialState = false);
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -312,8 +312,6 @@
</span><span class="cx"> HandleAlternativeTextUIResult(String result)
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- SetVisibilityStatePrerender()
-
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> WillStartUserTriggeredZooming();
</span><span class="cx"> DidFinishScrolling(WebCore::FloatPoint contentOffset);
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Tools/ChangeLog        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-02-10 Gavin Barraclough <barraclough@apple.com>
+
+ Remove WKPageSetVisibilityState
+ https://bugs.webkit.org/show_bug.cgi?id=128551
+
+ Reviewed by Anders Carlsson.
+
+ * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
+ (TestWebKitAPI::PageVisibilityStateWithWindowChanges::initializeView):
+ (TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
+ - visibilityState of offs-creen WKView is automatically prerender.
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::setHidden):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setPageVisibility):
+ (WTR::TestRunner::resetPageVisibility):
+ * WebKitTestRunner/TestController.cpp:
+ * WebKitTestRunner/TestController.h:
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ - removed calls to WKPageSetVisibilityState.
+
</ins><span class="cx"> 2014-02-10 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GLIB] Add GUniqueOutPtr and use it instead of GOwnPtr
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsmacPageVisibilityStateWithWindowChangesmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -77,14 +77,13 @@
</span><span class="cx"> virtual void initializeView(WKView *) override;
</span><span class="cx"> virtual void teardownView(WebView *) override;
</span><span class="cx"> virtual void teardownView(WKView *) override;
</span><del>- virtual void setPrerender(WebView *);
- virtual void setPrerender(WKView *);
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> void PageVisibilityStateWithWindowChanges::initializeView(WebView *webView)
</span><span class="cx"> {
</span><span class="cx"> // Released in teardownView.
</span><span class="cx"> webView.UIDelegate = [[PageVisibilityStateDelegate alloc] init];
</span><ins>+ [webView _setVisibilityState:WebPageVisibilityStatePrerender isInitialState:YES];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PageVisibilityStateWithWindowChanges::teardownView(WebView *webView)
</span><span class="lines">@@ -94,11 +93,6 @@
</span><span class="cx"> [uiDelegate release];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PageVisibilityStateWithWindowChanges::setPrerender(WebView *webView)
-{
- [webView _setVisibilityState:WebPageVisibilityStatePrerender isInitialState:YES];
-}
-
</del><span class="cx"> void PageVisibilityStateWithWindowChanges::initializeView(WKView *wkView)
</span><span class="cx"> {
</span><span class="cx"> WKPageUIClientV0 uiClient;
</span><span class="lines">@@ -115,23 +109,13 @@
</span><span class="cx"> // We do not need to teardown the WKPageUIClient.
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PageVisibilityStateWithWindowChanges::setPrerender(WKView *wkView)
-{
- WKPageSetVisibilityState(wkView.pageRef, kWKPageVisibilityStatePrerender, true);
-}
</del><span class="cx">
</span><del>-
</del><span class="cx"> template <typename View>
</span><span class="cx"> void PageVisibilityStateWithWindowChanges::runTest(View view)
</span><span class="cx"> {
</span><span class="cx"> // This WebView does not have a window and superview. PageVisibility should be "hidden".
</span><span class="cx"> EXPECT_NULL([view window]);
</span><span class="cx"> EXPECT_NULL([view superview]);
</span><del>- EXPECT_JS_EQ(view, "document.visibilityState", "hidden");
- EXPECT_JS_EQ(view, "document.hidden", "true");
-
- // Mark the page as being a "prerender".
- setPrerender(view);
</del><span class="cx"> EXPECT_JS_EQ(view, "document.visibilityState", "prerender");
</span><span class="cx"> EXPECT_JS_EQ(view, "document.hidden", "true");
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -465,17 +465,13 @@
</span><span class="cx"> WKBundlePostMessage(m_bundle, messageName.get(), messageBody.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InjectedBundle::setVisibilityState(WKPageVisibilityState visibilityState, bool isInitialState)
</del><ins>+void InjectedBundle::setHidden(bool hidden)
</ins><span class="cx"> {
</span><del>- WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetVisibilityState"));
</del><ins>+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetHidden"));
</ins><span class="cx"> WKRetainPtr<WKMutableDictionaryRef> messageBody(AdoptWK, WKMutableDictionaryCreate());
</span><span class="cx">
</span><del>- WKRetainPtr<WKStringRef> visibilityStateKeyWK(AdoptWK, WKStringCreateWithUTF8CString("visibilityState"));
- WKRetainPtr<WKUInt64Ref> visibilityStateWK(AdoptWK, WKUInt64Create(visibilityState));
- WKDictionarySetItem(messageBody.get(), visibilityStateKeyWK.get(), visibilityStateWK.get());
-
- WKRetainPtr<WKStringRef> isInitialKeyWK(AdoptWK, WKStringCreateWithUTF8CString("isInitialState"));
- WKRetainPtr<WKBooleanRef> isInitialWK(AdoptWK, WKBooleanCreate(isInitialState));
</del><ins>+ WKRetainPtr<WKStringRef> isInitialKeyWK(AdoptWK, WKStringCreateWithUTF8CString("hidden"));
+ WKRetainPtr<WKBooleanRef> isInitialWK(AdoptWK, WKBooleanCreate(hidden));
</ins><span class="cx"> WKDictionarySetItem(messageBody.get(), isInitialKeyWK.get(), isInitialWK.get());
</span><span class="cx">
</span><span class="cx"> WKBundlePostMessage(m_bundle, messageName.get(), messageBody.get());
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleInjectedBundleh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> void setCustomPolicyDelegate(bool enabled, bool permissive);
</span><span class="cx">
</span><span class="cx"> // Page Visibility.
</span><del>- void setVisibilityState(WKPageVisibilityState, bool isInitialState);
</del><ins>+ void setHidden(bool);
</ins><span class="cx">
</span><span class="cx"> // Work queue.
</span><span class="cx"> bool shouldProcessWorkQueue() const;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleTestRunnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -485,19 +485,12 @@
</span><span class="cx">
</span><span class="cx"> void TestRunner::setPageVisibility(JSStringRef state)
</span><span class="cx"> {
</span><del>- WKPageVisibilityState visibilityState = kWKPageVisibilityStateVisible;
-
- if (JSStringIsEqualToUTF8CString(state, "hidden"))
- visibilityState = kWKPageVisibilityStateHidden;
- else if (JSStringIsEqualToUTF8CString(state, "prerender"))
- visibilityState = kWKPageVisibilityStatePrerender;
-
- InjectedBundle::shared().setVisibilityState(visibilityState, false);
</del><ins>+ InjectedBundle::shared().setHidden(JSStringIsEqualToUTF8CString(state, "hidden") || JSStringIsEqualToUTF8CString(state, "prerender"));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TestRunner::resetPageVisibility()
</span><span class="cx"> {
</span><del>- InjectedBundle::shared().setVisibilityState(kWKPageVisibilityStateVisible, true);
</del><ins>+ InjectedBundle::shared().setHidden(false);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> typedef WTF::HashMap<unsigned, JSValueRef> CallbackMap;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.cpp        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -1166,12 +1166,6 @@
</span><span class="cx"> m_policyDelegatePermissive = permissive;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void TestController::setVisibilityState(WKPageVisibilityState visibilityState, bool isInitialState)
-{
- setHidden(visibilityState != kWKPageVisibilityStateVisible);
- WKPageSetVisibilityState(m_mainWebView->page(), visibilityState, isInitialState);
-}
-
</del><span class="cx"> void TestController::decidePolicyForGeolocationPermissionRequestIfPossible()
</span><span class="cx"> {
</span><span class="cx"> if (!m_isGeolocationPermissionSet)
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestController.h (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestController.h        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Tools/WebKitTestRunner/TestController.h        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> void setCustomPolicyDelegate(bool enabled, bool permissive);
</span><span class="cx">
</span><span class="cx"> // Page Visibility.
</span><del>- void setVisibilityState(WKPageVisibilityState, bool isInitialState);
</del><ins>+ void setHidden(bool);
</ins><span class="cx">
</span><span class="cx"> bool resetStateToConsistentValues();
</span><span class="cx"> void resetPreferencesToConsistentValues();
</span><span class="lines">@@ -164,8 +164,6 @@
</span><span class="cx"> static void runModal(WKPageRef, const void* clientInfo);
</span><span class="cx"> static void runModal(PlatformWebView*);
</span><span class="cx">
</span><del>- void setHidden(bool);
-
</del><span class="cx"> static const char* libraryPathForTesting();
</span><span class="cx"> static const char* platformLibraryPathForTesting();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerTestInvocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (163820 => 163821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2014-02-10 22:27:10 UTC (rev 163820)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp        2014-02-10 22:30:33 UTC (rev 163821)
</span><span class="lines">@@ -543,19 +543,15 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (WKStringIsEqualToUTF8CString(messageName, "SetVisibilityState")) {
</del><ins>+ if (WKStringIsEqualToUTF8CString(messageName, "SetHidden")) {
</ins><span class="cx"> ASSERT(WKGetTypeID(messageBody) == WKDictionaryGetTypeID());
</span><span class="cx"> WKDictionaryRef messageBodyDictionary = static_cast<WKDictionaryRef>(messageBody);
</span><span class="cx">
</span><del>- WKRetainPtr<WKStringRef> visibilityStateKeyWK(AdoptWK, WKStringCreateWithUTF8CString("visibilityState"));
- WKUInt64Ref visibilityStateWK = static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, visibilityStateKeyWK.get()));
- WKPageVisibilityState visibilityState = static_cast<WKPageVisibilityState>(WKUInt64GetValue(visibilityStateWK));
</del><ins>+ WKRetainPtr<WKStringRef> isInitialKeyWK(AdoptWK, WKStringCreateWithUTF8CString("hidden"));
+ WKBooleanRef hiddenWK = static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(messageBodyDictionary, isInitialKeyWK.get()));
+ bool hidden = WKBooleanGetValue(hiddenWK);
</ins><span class="cx">
</span><del>- WKRetainPtr<WKStringRef> isInitialKeyWK(AdoptWK, WKStringCreateWithUTF8CString("isInitialState"));
- WKBooleanRef isInitialWK = static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(messageBodyDictionary, isInitialKeyWK.get()));
- bool isInitialState = WKBooleanGetValue(isInitialWK);
-
- TestController::shared().setVisibilityState(visibilityState, isInitialState);
</del><ins>+ TestController::shared().setHidden(hidden);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>