Title: [196514] trunk/Source/WebKit2
Revision
196514
Author
bda...@apple.com
Date
2016-02-12 14:34:42 -0800 (Fri, 12 Feb 2016)

Log Message

REGRESSION: Link preview is slow and unreliable
https://bugs.webkit.org/show_bug.cgi?id=154197
-and corresponding-
rdar://problem/24428064

Reviewed by Tim Horton.

This patch rolls http://trac.webkit.org/changeset/187471 back in. That was 
how we fixed this problem ages ago. We rolled it out because it very 
mysteriously seemed to cause a memory regression, but we want to track that 
separately and not leave this performance regression in its place in the 
meantime.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateViewState):
(WebKit::WebPageProxy::dispatchViewStateChange):
(WebKit::WebPageProxy::updateActivityToken):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (196513 => 196514)


--- trunk/Source/WebKit2/ChangeLog	2016-02-12 22:32:44 UTC (rev 196513)
+++ trunk/Source/WebKit2/ChangeLog	2016-02-12 22:34:42 UTC (rev 196514)
@@ -1,3 +1,22 @@
+2016-02-12  Beth Dakin  <bda...@apple.com>
+
+        REGRESSION: Link preview is slow and unreliable
+        https://bugs.webkit.org/show_bug.cgi?id=154197
+        -and corresponding-
+        rdar://problem/24428064
+
+        Reviewed by Tim Horton.
+
+        This patch rolls http://trac.webkit.org/changeset/187471 back in. That was 
+        how we fixed this problem ages ago. We rolled it out because it very 
+        mysteriously seemed to cause a memory regression, but we want to track that 
+        separately and not leave this performance regression in its place in the 
+        meantime.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::updateViewState):
+        (WebKit::WebPageProxy::dispatchViewStateChange):
+        (WebKit::WebPageProxy::updateActivityToken):
+
 2016-02-12  Anders Carlsson  <ander...@apple.com>
 
         Get rid of a 6 year old compiler workaround

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (196513 => 196514)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-02-12 22:32:44 UTC (rev 196513)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-02-12 22:34:42 UTC (rev 196514)
@@ -1362,10 +1362,8 @@
         m_viewState |= ViewState::IsVisible;
     if (flagsToUpdate & ViewState::IsVisibleOrOccluded && m_pageClient.isViewVisibleOrOccluded())
         m_viewState |= ViewState::IsVisibleOrOccluded;
-    if (flagsToUpdate & ViewState::IsInWindow && m_pageClient.isViewInWindow()) {
+    if (flagsToUpdate & ViewState::IsInWindow && m_pageClient.isViewInWindow())
         m_viewState |= ViewState::IsInWindow;
-        m_viewWasEverInWindow = true;
-    }
     if (flagsToUpdate & ViewState::IsVisuallyIdle && m_pageClient.isVisuallyIdle())
         m_viewState |= ViewState::IsVisuallyIdle;
 }
@@ -1433,8 +1431,9 @@
     updateViewState(m_potentiallyChangedViewStateFlags);
     ViewState::Flags changed = m_viewState ^ previousViewState;
 
+    bool isNowInWindow = (changed & ViewState::IsInWindow) && isInWindow();
     // We always want to wait for the Web process to reply if we've been in-window before and are coming back in-window.
-    if (m_viewWasEverInWindow && (changed & ViewState::IsInWindow) && isInWindow() && m_drawingArea->hasVisibleContent())
+    if (m_viewWasEverInWindow && isNowInWindow && m_drawingArea->hasVisibleContent())
         m_viewStateChangeWantsSynchronousReply = true;
 
     // Don't wait synchronously if the view state is not visible. (This matters in particular on iOS, where a hidden page may be suspended.)
@@ -1469,6 +1468,7 @@
 
     m_potentiallyChangedViewStateFlags = ViewState::NoFlags;
     m_viewStateChangeWantsSynchronousReply = false;
+    m_viewWasEverInWindow |= isNowInWindow;
 }
 
 void WebPageProxy::updateActivityToken()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to