Changeset 240298 in webkit
- Timestamp:
- Jan 22, 2019 2:31:36 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r240297 r240298 1 2019-01-22 Antti Koivisto <antti@apple.com> 2 3 [iOS] Flash when swiping back to Google search result page 4 https://bugs.webkit.org/show_bug.cgi?id=193668 5 <rdar://problem/47071684> 6 7 Reviewed by Simon Fraser. 8 9 If the google page is scrolled, there is sometimes a short flash. 10 11 When restoring the page state we also restore exposedContentRect which is used to determine 12 which part of the page to create layers for. Scroll position is restored by the UI process 13 later so we rely on this to get the right layers for the initial view update. 14 15 A viewport configuration update may sometimes trample over the restored exposedContentRect, 16 moving it to top left. In this case the initial layer tree unfreeze commit may not have 17 layers to cover the actual visible view position. 18 19 * WebProcess/WebPage/WebPage.cpp: 20 (WebKit::WebPage::didCommitLoad): 21 * WebProcess/WebPage/WebPage.h: 22 * WebProcess/WebPage/ios/WebPageIOS.mm: 23 (WebKit::WebPage::restorePageState): 24 25 Set a bit to indicate we have already restored the exposedContentRect. 26 27 (WebKit::WebPage::viewportConfigurationChanged): 28 29 Only reset exposedContentRect if wasn't already set by restorePageState. 30 1 31 2019-01-22 Alex Christensen <achristensen@webkit.org> 2 32 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r240203 r240298 5605 5605 #if PLATFORM(IOS_FAMILY) 5606 5606 m_hasReceivedVisibleContentRectsAfterDidCommitLoad = false; 5607 m_hasRestoredExposedContentRectAfterDidCommitLoad = false; 5607 5608 m_scaleWasSetByUIProcess = false; 5608 5609 m_userHasChangedPageScaleFactor = false; -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r240199 r240298 1711 1711 1712 1712 WebCore::ViewportConfiguration m_viewportConfiguration; 1713 1713 1714 bool m_hasReceivedVisibleContentRectsAfterDidCommitLoad { false }; 1715 bool m_hasRestoredExposedContentRectAfterDidCommitLoad { false }; 1714 1716 bool m_scaleWasSetByUIProcess { false }; 1715 1717 bool m_userHasChangedPageScaleFactor { false }; -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r240159 r240298 347 347 if (historyItem.shouldRestoreScrollPosition()) { 348 348 m_drawingArea->setExposedContentRect(historyItem.exposedContentRect()); 349 m_hasRestoredExposedContentRectAfterDidCommitLoad = true; 349 350 scrollPosition = FloatPoint(historyItem.scrollPosition()); 350 351 } … … 2841 2842 // FIXME: We could send down the obscured margins to find a better exposed rect and unobscured rect. 2842 2843 // It is not a big deal at the moment because the tile coverage will always extend past the obscured bottom inset. 2843 m_drawingArea->setExposedContentRect(FloatRect(scrollPosition, minimumLayoutSizeInDocumentCoordinates)); 2844 if (!m_hasRestoredExposedContentRectAfterDidCommitLoad) 2845 m_drawingArea->setExposedContentRect(FloatRect(scrollPosition, minimumLayoutSizeInDocumentCoordinates)); 2844 2846 } 2845 2847 scalePage(scale, scrollPosition);
Note: See TracChangeset
for help on using the changeset viewer.