<!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>[161223] trunk/Source</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/161223">161223</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2014-01-02 14:06:14 -0800 (Thu, 02 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge didMoveOnscreen / page visibility to isVisible
https://bugs.webkit.org/show_bug.cgi?id=126268
Reviewed by Tim Horton.
The onscreen state most closely tracks view visibility (though currently
also tracks a mix of in-window state). Make more consistent, simplify,
and move all animation suspension logic to Page, so it can be controlled
by the PageThrottler.
Source/WebCore:
* WebCore.exp.in:
* page/EventHandler.cpp:
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
* page/FrameView.cpp:
(WebCore::FrameView::shouldSetCursor):
* page/Page.cpp:
(WebCore::Page::Page):
- initialize new variables.
(WebCore::Page::setIsVisible):
- merge setVisibilityState, didMoveOnscreen, willMoveOffscreen.
(WebCore::Page::setIsPrerender):
- switches visibility state from hidden to prerender.
(WebCore::Page::visibilityState):
- computed from m_isVisible, m_isPrerender.
(WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
- m_visibilityState -> m_isVisible.
* page/Page.h:
- remove didMoveOnscreen/willMoveOffscreen
m_isOnscreen & m_visibilityState -> m_isVisible & m_isPrerender
setVisibilityState -> setIsVisible & setIsPrerender.
(WebCore::Page::isVisible):
- isOnscreen -> isVisible.
Source/WebKit/blackberry:
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
- setVisibilityState -> setIsVisible.
Source/WebKit/efl:
* ewk/ewk_view.cpp:
(ewk_view_visibility_state_set):
- setVisibilityState -> setIsVisible/setIsPrerender.
Source/WebKit/gtk:
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::setPageVisibility):
- setVisibilityState -> setIsVisible/setIsPrerender.
Source/WebKit/mac:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _updateVisibilityState]):
- _setVisibilityState:isInitialState: -> _setIsVisibile:isInitialState:.
(-[WebView _setIsVisible:isInitialState:]):
- added.
(-[WebView _setVisibilityState:isInitialState:]):
- setVisibilityState -> setIsVisible/setIsPrerender.
(-[WebView viewWillMoveToWindow:]):
(-[WebView viewDidMoveToWindow]):
- remove redundant calls to willMoveOffscreen/didMoveOnscreen
(this is handled by _updateVisibilityState).
Source/WebKit2:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setViewIsVisible):
- updateVisibilityState -> setIsVisible.
(WebKit::WebPage::setIsInWindow):
- remove redundant willMoveOffscreen/didMoveOnscreen calls - this is handled
by setIsVisible.
(WebKit::WebPage::setMayStartMediaWhenInWindow):
- isOnscreen -> isInWindow. We start media when the view is in a window, not
when the view is visible.
(WebKit::WebPage::setVisibilityStatePrerender):
- setVisibilityState -> setIsPrerender.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebKitblackberryApiWebPagecpp">trunk/Source/WebKit/blackberry/Api/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKitblackberryChangeLog">trunk/Source/WebKit/blackberry/ChangeLog</a></li>
<li><a href="#trunkSourceWebKiteflChangeLog">trunk/Source/WebKit/efl/ChangeLog</a></li>
<li><a href="#trunkSourceWebKiteflewkewk_viewcpp">trunk/Source/WebKit/efl/ewk/ewk_view.cpp</a></li>
<li><a href="#trunkSourceWebKitgtkChangeLog">trunk/Source/WebKit/gtk/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitgtkWebCoreSupportDumpRenderTreeSupportGtkcpp">trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContexth">trunk/Source/WebKit2/UIProcess/WebContext.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebCore/ChangeLog        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2014-01-02 Gavin Barraclough <barraclough@apple.com>
+
+ Merge didMoveOnscreen / page visibility to isVisible
+ https://bugs.webkit.org/show_bug.cgi?id=126268
+
+ Reviewed by Tim Horton.
+
+ The onscreen state most closely tracks view visibility (though currently
+ also tracks a mix of in-window state). Make more consistent, simplify,
+ and move all animation suspension logic to Page, so it can be controlled
+ by the PageThrottler.
+
+ * WebCore.exp.in:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
+ * page/FrameView.cpp:
+ (WebCore::FrameView::shouldSetCursor):
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ - initialize new variables.
+ (WebCore::Page::setIsVisible):
+ - merge setVisibilityState, didMoveOnscreen, willMoveOffscreen.
+ (WebCore::Page::setIsPrerender):
+ - switches visibility state from hidden to prerender.
+ (WebCore::Page::visibilityState):
+ - computed from m_isVisible, m_isPrerender.
+ (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
+ - m_visibilityState -> m_isVisible.
+ * page/Page.h:
+ - remove didMoveOnscreen/willMoveOffscreen
+ m_isOnscreen & m_visibilityState -> m_isVisible & m_isPrerender
+ setVisibilityState -> setIsVisible & setIsPrerender.
+ (WebCore::Page::isVisible):
+ - isOnscreen -> isVisible.
+
</ins><span class="cx"> 2014-01-02 Oliver Hunt <oliver@apple.com>
</span><span class="cx">
</span><span class="cx"> Update bindings test results
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -962,17 +962,17 @@
</span><span class="cx"> __ZN7WebCore4Page11PageClientsC1Ev
</span><span class="cx"> __ZN7WebCore4Page11PageClientsD1Ev
</span><span class="cx"> __ZN7WebCore4Page12setGroupNameERKN3WTF6StringE
</span><ins>+__ZN7WebCore4Page12setIsVisibleEbb
</ins><span class="cx"> __ZN7WebCore4Page12setThrottledEb
</span><span class="cx"> __ZN7WebCore4Page13rangeOfStringERKN3WTF6StringEPNS_5RangeEj
</span><span class="cx"> __ZN7WebCore4Page13setIsInWindowEb
</span><span class="cx"> __ZN7WebCore4Page13setPaginationERKNS_10PaginationE
</span><ins>+__ZN7WebCore4Page14setIsPrerenderEv
</ins><span class="cx"> __ZN7WebCore4Page14setMediaVolumeEf
</span><span class="cx"> __ZN7WebCore4Page15addSchedulePairEN3WTF10PassRefPtrINS1_12SchedulePairEEE
</span><del>-__ZN7WebCore4Page15didMoveOnscreenEv
</del><span class="cx"> __ZN7WebCore4Page16countFindMatchesERKN3WTF6StringEjj
</span><span class="cx"> __ZN7WebCore4Page16setCanStartMediaEb
</span><span class="cx"> __ZN7WebCore4Page16setDefersLoadingEb
</span><del>-__ZN7WebCore4Page17willMoveOffscreenEv
</del><span class="cx"> __ZN7WebCore4Page18removeSchedulePairEN3WTF10PassRefPtrINS1_12SchedulePairEEE
</span><span class="cx"> __ZN7WebCore4Page18setPageScaleFactorEfRKNS_8IntPointE
</span><span class="cx"> __ZN7WebCore4Page19addFooterWithHeightEi
</span><span class="lines">@@ -2770,10 +2770,6 @@
</span><span class="cx"> __ZN7WebCore5Frame26sendOrientationChangeEventEi
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
-__ZN7WebCore4Page18setVisibilityStateENS_19PageVisibilityStateEb
-#endif
-
</del><span class="cx"> #if USE(PLUGIN_HOST_PROCESS)
</span><span class="cx"> __ZN3JSC13RuntimeMethod11getCallDataEPNS_6JSCellERNS_8CallDataE
</span><span class="cx"> __ZN3JSC13RuntimeMethod14finishCreationERNS_2VMERKN3WTF6StringE
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -2836,7 +2836,7 @@
</span><span class="cx"> if (!view)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (!m_frame.page() || !m_frame.page()->isOnscreen() || !m_frame.page()->focusController().isActive())
</del><ins>+ if (!m_frame.page() || !m_frame.page()->isVisible() || !m_frame.page()->focusController().isActive())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> bool shiftKey;
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -1691,7 +1691,7 @@
</span><span class="cx"> bool FrameView::shouldSetCursor() const
</span><span class="cx"> {
</span><span class="cx"> Page* page = frame().page();
</span><del>- return page && page->isOnscreen() && page->focusController().isActive();
</del><ins>+ return page && page->isVisible() && page->focusController().isActive();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect)
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebCore/page/Page.cpp        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -171,11 +171,9 @@
</span><span class="cx"> , m_minimumTimerInterval(Settings::defaultMinDOMTimerInterval())
</span><span class="cx"> , m_timerAlignmentInterval(Settings::defaultDOMTimerAlignmentInterval())
</span><span class="cx"> , m_isEditable(false)
</span><del>- , m_isOnscreen(true)
</del><span class="cx"> , m_isInWindow(true)
</span><del>-#if ENABLE(PAGE_VISIBILITY_API)
- , m_visibilityState(PageVisibilityStateVisible)
-#endif
</del><ins>+ , m_isVisible(true)
+ , m_isPrerender(false)
</ins><span class="cx"> , m_requestedLayoutMilestones(0)
</span><span class="cx"> , m_headerHeight(0)
</span><span class="cx"> , m_footerHeight(0)
</span><span class="lines">@@ -874,30 +872,6 @@
</span><span class="cx"> return contentRenderer ? contentRenderer->columnCount(contentRenderer->columnInfo()) : 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Page::didMoveOnscreen()
-{
- m_isOnscreen = true;
-
- for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
- if (FrameView* frameView = frame->view())
- frameView->didMoveOnscreen();
- }
-
- resumeScriptedAnimations();
-}
-
-void Page::willMoveOffscreen()
-{
- m_isOnscreen = false;
-
- for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
- if (FrameView* frameView = frame->view())
- frameView->willMoveOffscreen();
- }
-
- suspendScriptedAnimations();
-}
-
</del><span class="cx"> void Page::setIsInWindow(bool isInWindow)
</span><span class="cx"> {
</span><span class="cx"> if (m_isInWindow == isInWindow)
</span><span class="lines">@@ -1235,21 +1209,37 @@
</span><span class="cx"> CachedImage::resumeAnimatingImagesForLoader(frame->document()->cachedResourceLoader());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
-void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitialState)
</del><ins>+void Page::setIsVisible(bool isVisible, bool isInitialState)
</ins><span class="cx"> {
</span><del>-#if !ENABLE(PAGE_VISIBILITY_API)
- UNUSED_PARAM(isInitialState);
-#else
</del><span class="cx"> // FIXME: The visibility state should be stored on the top-level document.
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=116769
</span><span class="cx">
</span><del>- if (m_visibilityState == visibilityState)
</del><ins>+ if (m_isVisible == isVisible)
</ins><span class="cx"> return;
</span><del>- if (m_visibilityState == PageVisibilityStatePrerender && visibilityState == PageVisibilityStateHidden)
- return;
- m_visibilityState = visibilityState;
</del><ins>+ m_isVisible = isVisible;
</ins><span class="cx">
</span><ins>+ if (isVisible) {
+ m_isPrerender = false;
+
+ for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
+ if (FrameView* frameView = frame->view())
+ frameView->didMoveOnscreen();
+ }
+
+ resumeScriptedAnimations();
+
+ if (FrameView* view = mainFrame().view())
+ view->show();
+
+ unthrottleTimers();
+
+ if (m_settings->hiddenPageCSSAnimationSuspensionEnabled())
+ mainFrame().animation().resumeAnimations();
+
+ resumeAnimatingImages();
+ }
+
+#if ENABLE(PAGE_VISIBILITY_API)
</ins><span class="cx"> if (!isInitialState) {
</span><span class="cx"> Vector<Ref<Document>> documents;
</span><span class="cx"> for (Frame* frame = m_mainFrame.get(); frame; frame = frame->tree().traverseNext())
</span><span class="lines">@@ -1258,26 +1248,42 @@
</span><span class="cx"> for (size_t i = 0, size = documents.size(); i < size; ++i)
</span><span class="cx"> documents[i]->visibilityStateChanged();
</span><span class="cx"> }
</span><ins>+#else
+ UNUSED_PARAM(isInitialState);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- if (visibilityState == WebCore::PageVisibilityStateHidden) {
</del><ins>+ if (!isVisible) {
</ins><span class="cx"> if (m_pageThrottler->shouldThrottleTimers())
</span><span class="cx"> throttleTimers();
</span><ins>+
</ins><span class="cx"> if (m_settings->hiddenPageCSSAnimationSuspensionEnabled())
</span><span class="cx"> mainFrame().animation().suspendAnimations();
</span><del>- } else {
- unthrottleTimers();
- if (m_settings->hiddenPageCSSAnimationSuspensionEnabled())
- mainFrame().animation().resumeAnimations();
- resumeAnimatingImages();
</del><ins>+
+ for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
+ if (FrameView* frameView = frame->view())
+ frameView->willMoveOffscreen();
+ }
+
+ suspendScriptedAnimations();
+
+ if (FrameView* view = mainFrame().view())
+ view->hide();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><del>-#endif // ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
</del><span class="cx">
</span><ins>+void Page::setIsPrerender()
+{
+ m_isPrerender = true;
+}
+
</ins><span class="cx"> #if ENABLE(PAGE_VISIBILITY_API)
</span><span class="cx"> PageVisibilityState Page::visibilityState() const
</span><span class="cx"> {
</span><del>- return m_visibilityState;
</del><ins>+ if (m_isVisible)
+ return PageVisibilityStateVisible;
+ if (m_isPrerender)
+ return PageVisibilityStatePrerender;
+ return PageVisibilityStateHidden;
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -1535,7 +1541,7 @@
</span><span class="cx"> #if (ENABLE_PAGE_VISIBILITY_API)
</span><span class="cx"> void Page::hiddenPageCSSAnimationSuspensionStateChanged()
</span><span class="cx"> {
</span><del>- if (m_visibilityState == WebCore::PageVisibilityStateHidden) {
</del><ins>+ if (!m_isVisible) {
</ins><span class="cx"> if (m_settings->hiddenPageCSSAnimationSuspensionEnabled())
</span><span class="cx"> mainFrame().animation().suspendAnimations();
</span><span class="cx"> else
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebCore/page/Page.h        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -294,9 +294,9 @@
</span><span class="cx"> unsigned pageCount() const;
</span><span class="cx">
</span><span class="cx"> // Notifications when the Page starts and stops being presented via a native window.
</span><del>- void didMoveOnscreen();
- void willMoveOffscreen();
- bool isOnscreen() const { return m_isOnscreen; }
</del><ins>+ void setIsVisible(bool isVisible, bool isInitial);
+ void setIsPrerender();
+ bool isVisible() const { return m_isVisible; }
</ins><span class="cx">
</span><span class="cx"> // Notification that this Page was moved into or out of a native window.
</span><span class="cx"> void setIsInWindow(bool);
</span><span class="lines">@@ -355,9 +355,6 @@
</span><span class="cx"> #if ENABLE(PAGE_VISIBILITY_API)
</span><span class="cx"> PageVisibilityState visibilityState() const;
</span><span class="cx"> #endif
</span><del>-#if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
- void setVisibilityState(PageVisibilityState, bool);
-#endif
</del><span class="cx"> void resumeAnimatingImages();
</span><span class="cx">
</span><span class="cx"> void addLayoutMilestones(LayoutMilestones);
</span><span class="lines">@@ -525,13 +522,10 @@
</span><span class="cx"> double m_timerAlignmentInterval;
</span><span class="cx">
</span><span class="cx"> bool m_isEditable;
</span><del>- bool m_isOnscreen;
</del><span class="cx"> bool m_isInWindow;
</span><ins>+ bool m_isVisible;
+ bool m_isPrerender;
</ins><span class="cx">
</span><del>-#if ENABLE(PAGE_VISIBILITY_API)
- PageVisibilityState m_visibilityState;
-#endif
-
</del><span class="cx"> LayoutMilestones m_requestedLayoutMilestones;
</span><span class="cx">
</span><span class="cx"> int m_headerHeight;
</span></span></pre></div>
<a id="trunkSourceWebKitblackberryApiWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -3118,7 +3118,8 @@
</span><span class="cx">
</span><span class="cx"> static bool s_initialVisibilityState = true;
</span><span class="cx">
</span><del>- m_page->setVisibilityState(m_visible && m_activationState == ActivationActive ? PageVisibilityStateVisible : PageVisibilityStateHidden, s_initialVisibilityState);
</del><ins>+ m_page->setIsVisible(m_visible && m_activationState == ActivationActive, s_initialVisibilityState);
+
</ins><span class="cx"> s_initialVisibilityState = false;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitblackberryChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/blackberry/ChangeLog (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/blackberry/ChangeLog        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebKit/blackberry/ChangeLog        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-01-02 Gavin Barraclough <barraclough@apple.com>
+
+ Merge didMoveOnscreen / page visibility to isVisible
+ https://bugs.webkit.org/show_bug.cgi?id=126268
+
+ Reviewed by Tim Horton.
+
+ The onscreen state most closely tracks view visibility (though currently
+ also tracks a mix of in-window state). Make more consistent, simplify,
+ and move all animation suspension logic to Page, so it can be controlled
+ by the PageThrottler.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::setPageVisibilityState):
+ - setVisibilityState -> setIsVisible.
+
</ins><span class="cx"> 2013-12-30 Gyuyoung Kim <gyuyoung.kim@samsung.com>
</span><span class="cx">
</span><span class="cx"> Cleanup static_cast<HTMLFormElement*> by using toHTMLFormElement()
</span></span></pre></div>
<a id="trunkSourceWebKiteflChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ChangeLog (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ChangeLog        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebKit/efl/ChangeLog        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-01-02 Gavin Barraclough <barraclough@apple.com>
+
+ Merge didMoveOnscreen / page visibility to isVisible
+ https://bugs.webkit.org/show_bug.cgi?id=126268
+
+ Reviewed by Tim Horton.
+
+ The onscreen state most closely tracks view visibility (though currently
+ also tracks a mix of in-window state). Make more consistent, simplify,
+ and move all animation suspension logic to Page, so it can be controlled
+ by the PageThrottler.
+
+ * ewk/ewk_view.cpp:
+ (ewk_view_visibility_state_set):
+ - setVisibilityState -> setIsVisible/setIsPrerender.
+
</ins><span class="cx"> 2013-12-29 Ryuan Choi <ryuan.choi@samsung.com>
</span><span class="cx">
</span><span class="cx"> [EFL] Remove ewk_view_tiled
</span></span></pre></div>
<a id="trunkSourceWebKiteflewkewk_viewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -4238,7 +4238,9 @@
</span><span class="cx"> if (pageVisibilityState == EWK_PAGE_VISIBILITY_STATE_UNLOADED)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- priv->page->setVisibilityState(static_cast<WebCore::PageVisibilityState>(pageVisibilityState), initialState);
</del><ins>+ priv->page->setIsVisible(pageVisibilityState == EWK_PAGE_VISIBILITY_STATE_VISIBLE, initialState);
+ if (pageVisibilityState == EWK_PAGE_VISIBILITY_STATE_PRERENDER)
+ priv->page->setIsPrerender();
</ins><span class="cx">
</span><span class="cx"> return true;
</span><span class="cx"> #else
</span></span></pre></div>
<a id="trunkSourceWebKitgtkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/ChangeLog (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/ChangeLog        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebKit/gtk/ChangeLog        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-01-02 Gavin Barraclough <barraclough@apple.com>
+
+ Merge didMoveOnscreen / page visibility to isVisible
+ https://bugs.webkit.org/show_bug.cgi?id=126268
+
+ Reviewed by Tim Horton.
+
+ The onscreen state most closely tracks view visibility (though currently
+ also tracks a mix of in-window state). Make more consistent, simplify,
+ and move all animation suspension logic to Page, so it can be controlled
+ by the PageThrottler.
+
+ * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+ (DumpRenderTreeSupportGtk::setPageVisibility):
+ - setVisibilityState -> setIsVisible/setIsPrerender.
+
</ins><span class="cx"> 2014-01-02 Zan Dobersek <zdobersek@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] Fix mismatched header guards in private WK1 header files
</span></span></pre></div>
<a id="trunkSourceWebKitgtkWebCoreSupportDumpRenderTreeSupportGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -699,6 +699,8 @@
</span><span class="cx"> if (!page)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- page->setVisibilityState(visibilityState, isInitialState);
</del><ins>+ page->setIsVisible(visibilityState == PageVisibilityStateVisible, isInitialState);
+ if (visibilityState == PageVisibilityStatePrerender)
+ page->setIsPrerender();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-01-02 Gavin Barraclough <barraclough@apple.com>
+
+ Merge didMoveOnscreen / page visibility to isVisible
+ https://bugs.webkit.org/show_bug.cgi?id=126268
+
+ Reviewed by Tim Horton.
+
+ The onscreen state most closely tracks view visibility (though currently
+ also tracks a mix of in-window state). Make more consistent, simplify,
+ and move all animation suspension logic to Page, so it can be controlled
+ by the PageThrottler.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:]):
+ (-[WebView _updateVisibilityState]):
+ - _setVisibilityState:isInitialState: -> _setIsVisibile:isInitialState:.
+ (-[WebView _setIsVisible:isInitialState:]):
+ - added.
+ (-[WebView _setVisibilityState:isInitialState:]):
+ - setVisibilityState -> setIsVisible/setIsPrerender.
+ (-[WebView viewWillMoveToWindow:]):
+ (-[WebView viewDidMoveToWindow]):
+ - remove redundant calls to willMoveOffscreen/didMoveOnscreen
+ (this is handled by _updateVisibilityState).
+
</ins><span class="cx"> 2013-12-23 Oliver Hunt <oliver@apple.com>
</span><span class="cx">
</span><span class="cx"> Refactor PutPropertySlot to be aware of custom properties
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -507,21 +507,6 @@
</span><span class="cx"> | (milestones & DidHitRelevantRepaintedObjectsAreaThreshold ? WebDidHitRelevantRepaintedObjectsAreaThreshold : 0);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static PageVisibilityState core(WebPageVisibilityState visibilityState)
-{
- switch (visibilityState) {
- case WebPageVisibilityStateVisible:
- return PageVisibilityStateVisible;
- case WebPageVisibilityStateHidden:
- return PageVisibilityStateHidden;
- case WebPageVisibilityStatePrerender:
- return PageVisibilityStatePrerender;
- }
-
- ASSERT_NOT_REACHED();
- return PageVisibilityStateVisible;
-}
-
</del><span class="cx"> static WebPageVisibilityState kit(PageVisibilityState visibilityState)
</span><span class="cx"> {
</span><span class="cx"> switch (visibilityState) {
</span><span class="lines">@@ -1050,7 +1035,7 @@
</span><span class="cx"> [self _registerDraggedTypes];
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- [self _setVisibilityState:([self _isViewVisible] ? WebPageVisibilityStateVisible : WebPageVisibilityStateHidden) isInitialState:YES];
</del><ins>+ [self _setIsVisible:[self _isViewVisible] isInitialState:YES];
</ins><span class="cx">
</span><span class="cx"> WebPreferences *prefs = [self preferences];
</span><span class="cx"> [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_preferencesChangedNotification:)
</span><span class="lines">@@ -4009,7 +3994,7 @@
</span><span class="cx"> - (void)_updateVisibilityState
</span><span class="cx"> {
</span><span class="cx"> if (_private && _private->page)
</span><del>- [self _setVisibilityState:([self _isViewVisible] ? WebPageVisibilityStateVisible : WebPageVisibilityStateHidden) isInitialState:NO];
</del><ins>+ [self _setIsVisible:[self _isViewVisible] isInitialState:NO];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_updateActiveState
</span><span class="lines">@@ -4374,14 +4359,21 @@
</span><span class="cx"> return WebPageVisibilityStateVisible;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)_setVisibilityState:(WebPageVisibilityState)visibilityState isInitialState:(BOOL)isInitialState
</del><ins>+- (void)_setIsVisible:(BOOL)isVisible isInitialState:(BOOL)isInitialState
</ins><span class="cx"> {
</span><del>-#if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
</del><span class="cx"> if (_private->page)
</span><del>- _private->page->setVisibilityState(core(visibilityState), isInitialState);
-#endif
</del><ins>+ _private->page->setIsVisible(isVisible, isInitialState);
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)_setVisibilityState:(WebPageVisibilityState)visibilityState isInitialState:(BOOL)isInitialState
+{
+ if (_private->page) {
+ _private->page->setIsVisible(visibilityState == WebPageVisibilityStateVisible, isInitialState);
+ if (visibilityState == WebPageVisibilityStatePrerender)
+ _private->page->setIsPrerender();
+ }
+}
+
</ins><span class="cx"> - (void)_setPaginationBehavesLikeColumns:(BOOL)behavesLikeColumns
</span><span class="cx"> {
</span><span class="cx"> Page* page = core(self);
</span><span class="lines">@@ -5283,7 +5275,6 @@
</span><span class="cx"> WKSetNSWindowShouldPostEventNotifications(window, YES);
</span><span class="cx"> } else {
</span><span class="cx"> _private->page->setCanStartMedia(false);
</span><del>- _private->page->willMoveOffscreen();
</del><span class="cx"> _private->page->setIsInWindow(false);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5305,7 +5296,6 @@
</span><span class="cx">
</span><span class="cx"> if ([self window]) {
</span><span class="cx"> _private->page->setCanStartMedia(true);
</span><del>- _private->page->didMoveOnscreen();
</del><span class="cx"> _private->page->setIsInWindow(true);
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-01-02 Gavin Barraclough <barraclough@apple.com>
+
+ Merge didMoveOnscreen / page visibility to isVisible
+ https://bugs.webkit.org/show_bug.cgi?id=126268
+
+ Reviewed by Tim Horton.
+
+ The onscreen state most closely tracks view visibility (though currently
+ also tracks a mix of in-window state). Make more consistent, simplify,
+ and move all animation suspension logic to Page, so it can be controlled
+ by the PageThrottler.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+ (WebKit::WebPage::setViewIsVisible):
+ - updateVisibilityState -> setIsVisible.
+ (WebKit::WebPage::setIsInWindow):
+ - remove redundant willMoveOffscreen/didMoveOnscreen calls - this is handled
+ by setIsVisible.
+ (WebKit::WebPage::setMayStartMediaWhenInWindow):
+ - isOnscreen -> isInWindow. We start media when the view is in a window, not
+ when the view is visible.
+ (WebKit::WebPage::setVisibilityStatePrerender):
+ - setVisibilityState -> setIsPrerender.
+
</ins><span class="cx"> 2013-12-23 Oliver Hunt <oliver@apple.com>
</span><span class="cx">
</span><span class="cx"> Refactor PutPropertySlot to be aware of custom properties
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.h (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.h        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx"> class WebNetworkInfoManagerProxy;
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><del>-struct NetworkProcessCreationParameters;
</del><ins>+struc t NetworkProcessCreationParameters;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> class WebContext : public API::ObjectImpl<API::Object::Type::Context>, private IPC::MessageReceiver
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (161222 => 161223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-01-02 21:34:51 UTC (rev 161222)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-01-02 22:06:14 UTC (rev 161223)
</span><span class="lines">@@ -425,7 +425,7 @@
</span><span class="cx"> WebProcess::shared().eventDispatcher().addScrollingTreeForPage(this);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- updateVisibilityState(true);
</del><ins>+ m_page->setIsVisible(m_viewState & ViewState::IsVisible, true);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebPage::~WebPage()
</span><span class="lines">@@ -1922,20 +1922,12 @@
</span><span class="cx">
</span><span class="cx"> void WebPage::setViewIsVisible(bool isVisible)
</span><span class="cx"> {
</span><del>- if (!isVisible) {
- m_drawingArea->suspendPainting();
- m_page->suspendScriptedAnimations();
- } else {
</del><ins>+ if (isVisible)
</ins><span class="cx"> m_drawingArea->resumePainting();
</span><del>- // FIXME: this seems redundant; for the view to be visible the window must be visible too!
- // refactoring for now, will change the logic later.
- if (m_windowIsVisible) {
- m_page->resumeScriptedAnimations();
- m_page->resumeAnimatingImages();
- }
- }
</del><ins>+ else
+ m_drawingArea->suspendPainting();
</ins><span class="cx">
</span><del>- updateVisibilityState();
</del><ins>+ m_page->setIsVisible(m_viewState & ViewState::IsVisible, false);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPage::setDrawsBackground(bool drawsBackground)
</span><span class="lines">@@ -2059,7 +2051,6 @@
</span><span class="cx"> if (!isInWindow) {
</span><span class="cx"> m_setCanStartMediaTimer.stop();
</span><span class="cx"> m_page->setCanStartMedia(false);
</span><del>- m_page->willMoveOffscreen();
</del><span class="cx">
</span><span class="cx"> if (pageWasInWindow)
</span><span class="cx"> WebProcess::shared().pageWillLeaveWindow(m_pageID);
</span><span class="lines">@@ -2070,8 +2061,6 @@
</span><span class="cx"> if (m_mayStartMediaWhenInWindow)
</span><span class="cx"> m_setCanStartMediaTimer.startOneShot(0);
</span><span class="cx">
</span><del>- m_page->didMoveOnscreen();
-
</del><span class="cx"> if (!pageWasInWindow)
</span><span class="cx"> WebProcess::shared().pageDidEnterWindow(m_pageID);
</span><span class="cx"> }
</span><span class="lines">@@ -3538,7 +3527,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> m_mayStartMediaWhenInWindow = mayStartMedia;
</span><del>- if (m_mayStartMediaWhenInWindow && m_page->isOnscreen())
</del><ins>+ if (m_mayStartMediaWhenInWindow && m_page->isInWindow())
</ins><span class="cx"> m_setCanStartMediaTimer.startOneShot(0);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3707,49 +3696,10 @@
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPage::updateVisibilityState(bool isInitialState)
-{
- bool isVisible = m_viewState & ViewState::IsVisible;
- if (!m_page)
- return;
-
-#if ENABLE(PAGE_VISIBILITY_API)
-
- FrameView* view = m_page->mainFrame().view();
-
- if (isVisible) {
- m_page->didMoveOnscreen();
- if (view)
- view->show();
- }
-
- PageVisibilityState state = isVisible ? PageVisibilityStateVisible : PageVisibilityStateHidden;
- m_page->setVisibilityState(state, isInitialState);
-
- if (!isVisible) {
- m_page->willMoveOffscreen();
- if (view)
- view->hide();
- }
-
-#elif ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
-
- PageVisibilityState state = isVisible ? PageVisibilityStateVisible : PageVisibilityStateHidden;
- m_page->setVisibilityState(state, isInitialState);
-
-#else
- UNUSED_PARAM(isVisible);
- UNUSED_PARAM(isInitialState);
-#endif
-}
-
</del><span class="cx"> void WebPage::setVisibilityStatePrerender()
</span><span class="cx"> {
</span><del>-#if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
- if (!m_page)
- return;
- m_page->setVisibilityState(PageVisibilityStatePrerender, true);
-#endif
</del><ins>+ if (m_page)
+ m_page->setIsPrerender();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPage::setThrottled(bool isThrottled)
</span></span></pre>
</div>
</div>
</body>
</html>