WebKit Bugzilla
Attachment 359733 Details for
Bug 193668
: [iOS] Flash when swiping back to Google search result page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
exposed-rect-restore.patch (text/plain), 4.33 KB, created by
Antti Koivisto
on 2019-01-22 07:15:04 PST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-01-22 07:15:04 PST
Size:
4.33 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 240251) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,33 @@ >+2019-01-22 Antti Koivisto <antti@apple.com> >+ >+ [iOS] Flash when swiping back to Google search result page >+ https://bugs.webkit.org/show_bug.cgi?id=193668 >+ <rdar://problem/47071684> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-22 Oriol Brufau <obrufau@igalia.com> > > [css-logical] Implement flow-relative margin, padding and border shorthands >Index: Source/WebKit/WebProcess/WebPage/WebPage.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.cpp (revision 240249) >+++ Source/WebKit/WebProcess/WebPage/WebPage.cpp (working copy) >@@ -5604,6 +5604,7 @@ void WebPage::didCommitLoad(WebFrame* fr > } > #if PLATFORM(IOS_FAMILY) > m_hasReceivedVisibleContentRectsAfterDidCommitLoad = false; >+ m_hasRestoredExposedContentRectAfterDidCommitLoad = false; > m_scaleWasSetByUIProcess = false; > m_userHasChangedPageScaleFactor = false; > m_estimatedLatency = Seconds(1.0 / 60); >Index: Source/WebKit/WebProcess/WebPage/WebPage.h >=================================================================== >--- Source/WebKit/WebProcess/WebPage/WebPage.h (revision 240249) >+++ Source/WebKit/WebProcess/WebPage/WebPage.h (working copy) >@@ -1710,7 +1710,9 @@ private: > 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 }; >Index: Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >=================================================================== >--- Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (revision 240249) >+++ Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (working copy) >@@ -346,6 +346,7 @@ void WebPage::restorePageState(const His > 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)); >@@ -2840,7 +2841,8 @@ void WebPage::viewportConfigurationChang > > // 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); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193668
: 359733 |
359736