Title: [240423] branches/safari-607-branch/Source/WebKit
- Revision
- 240423
- Author
- [email protected]
- Date
- 2019-01-23 22:42:38 -0800 (Wed, 23 Jan 2019)
Log Message
Cherry-pick r240298. rdar://problem/47494772
[iOS] Flash when swiping back to Google search result page
https://bugs.webkit.org/show_bug.cgi?id=193668
<rdar://problem/47071684>
Reviewed by Simon Fraser.
If the google page is scrolled, there is sometimes a short flash.
When restoring the page state we also restore exposedContentRect which is used to determine
which part of the page to create layers for. Scroll position is restored by the UI process
later so we rely on this to get the right layers for the initial view update.
A viewport configuration update may sometimes trample over the restored exposedContentRect,
moving it to top left. In this case the initial layer tree unfreeze commit may not have
layers to cover the actual visible view position.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::restorePageState):
Set a bit to indicate we have already restored the exposedContentRect.
(WebKit::WebPage::viewportConfigurationChanged):
Only reset exposedContentRect if wasn't already set by restorePageState.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-607-branch/Source/WebKit/ChangeLog (240422 => 240423)
--- branches/safari-607-branch/Source/WebKit/ChangeLog 2019-01-24 06:42:35 UTC (rev 240422)
+++ branches/safari-607-branch/Source/WebKit/ChangeLog 2019-01-24 06:42:38 UTC (rev 240423)
@@ -1,5 +1,70 @@
2019-01-23 Alan Coon <[email protected]>
+ Cherry-pick r240298. rdar://problem/47494772
+
+ [iOS] Flash when swiping back to Google search result page
+ https://bugs.webkit.org/show_bug.cgi?id=193668
+ <rdar://problem/47071684>
+
+ Reviewed by Simon Fraser.
+
+ If the google page is scrolled, there is sometimes a short flash.
+
+ When restoring the page state we also restore exposedContentRect which is used to determine
+ which part of the page to create layers for. Scroll position is restored by the UI process
+ later so we rely on this to get the right layers for the initial view update.
+
+ A viewport configuration update may sometimes trample over the restored exposedContentRect,
+ moving it to top left. In this case the initial layer tree unfreeze commit may not have
+ layers to cover the actual visible view position.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::didCommitLoad):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::restorePageState):
+
+ Set a bit to indicate we have already restored the exposedContentRect.
+
+ (WebKit::WebPage::viewportConfigurationChanged):
+
+ Only reset exposedContentRect if wasn't already set by restorePageState.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-01-22 Antti Koivisto <[email protected]>
+
+ [iOS] Flash when swiping back to Google search result page
+ https://bugs.webkit.org/show_bug.cgi?id=193668
+ <rdar://problem/47071684>
+
+ Reviewed by Simon Fraser.
+
+ If the google page is scrolled, there is sometimes a short flash.
+
+ When restoring the page state we also restore exposedContentRect which is used to determine
+ which part of the page to create layers for. Scroll position is restored by the UI process
+ later so we rely on this to get the right layers for the initial view update.
+
+ A viewport configuration update may sometimes trample over the restored exposedContentRect,
+ moving it to top left. In this case the initial layer tree unfreeze commit may not have
+ layers to cover the actual visible view position.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::didCommitLoad):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::restorePageState):
+
+ Set a bit to indicate we have already restored the exposedContentRect.
+
+ (WebKit::WebPage::viewportConfigurationChanged):
+
+ Only reset exposedContentRect if wasn't already set by restorePageState.
+
+2019-01-23 Alan Coon <[email protected]>
+
Cherry-pick r240178. rdar://problem/47494727
Regression(PSON) Content blockers are sometimes lost on back navigation cross-site
Modified: branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp (240422 => 240423)
--- branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2019-01-24 06:42:35 UTC (rev 240422)
+++ branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2019-01-24 06:42:38 UTC (rev 240423)
@@ -5587,6 +5587,7 @@
}
#if PLATFORM(IOS_FAMILY)
m_hasReceivedVisibleContentRectsAfterDidCommitLoad = false;
+ m_hasRestoredExposedContentRectAfterDidCommitLoad = false;
m_scaleWasSetByUIProcess = false;
m_userHasChangedPageScaleFactor = false;
m_estimatedLatency = Seconds(1.0 / 60);
Modified: branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/WebPage.h (240422 => 240423)
--- branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-01-24 06:42:35 UTC (rev 240422)
+++ branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-01-24 06:42:38 UTC (rev 240423)
@@ -1709,7 +1709,9 @@
RefPtr<WebCore::SecurityOrigin> m_potentialTapSecurityOrigin;
WebCore::ViewportConfiguration m_viewportConfiguration;
+
bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad { false };
+ bool m_hasRestoredExposedContentRectAfterDidCommitLoad { false };
bool m_scaleWasSetByUIProcess { false };
bool m_userHasChangedPageScaleFactor { false };
bool m_hasStablePageScaleFactor { true };
Modified: branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (240422 => 240423)
--- branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2019-01-24 06:42:35 UTC (rev 240422)
+++ branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2019-01-24 06:42:38 UTC (rev 240423)
@@ -345,6 +345,7 @@
Optional<FloatPoint> scrollPosition;
if (historyItem.shouldRestoreScrollPosition()) {
m_drawingArea->setExposedContentRect(historyItem.exposedContentRect());
+ m_hasRestoredExposedContentRectAfterDidCommitLoad = true;
scrollPosition = FloatPoint(historyItem.scrollPosition());
}
send(Messages::WebPageProxy::RestorePageState(scrollPosition, frameView.scrollOrigin(), historyItem.obscuredInsets(), boundedScale));
@@ -2839,7 +2840,8 @@
// FIXME: We could send down the obscured margins to find a better exposed rect and unobscured rect.
// It is not a big deal at the moment because the tile coverage will always extend past the obscured bottom inset.
- m_drawingArea->setExposedContentRect(FloatRect(scrollPosition, minimumLayoutSizeInDocumentCoordinates));
+ if (!m_hasRestoredExposedContentRectAfterDidCommitLoad)
+ m_drawingArea->setExposedContentRect(FloatRect(scrollPosition, minimumLayoutSizeInDocumentCoordinates));
}
scalePage(scale, scrollPosition);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes