Title: [233780] trunk/Source/WebKit
- Revision
- 233780
- Author
- [email protected]
- Date
- 2018-07-12 13:11:30 -0700 (Thu, 12 Jul 2018)
Log Message
REGRESSION (r232356): After zooming a page in and out, it's possible to temporarily have missing tiles (google.com, apple.com)
https://bugs.webkit.org/show_bug.cgi?id=187553
<rdar://problem/41863803>
Reviewed by Simon Fraser.
We ignore zoom scale from UI process if it doesn't match the last remote layer tree transaction. However nothing
guarantees that we receive the real scale again until user interacts with the page. This means the web process
scale and the UI process scale can be wildly out of sync.
This problem becomes more likely to be visible when
- we are under memory pressure so we don't update tiles during zooming and rely on the one final update afterwards
- the page generates lots of layer tree transactions
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):
Remember the last transaction where we actually changed the page scale.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::scaleFromUIProcess const):
Only reject the UI process scale if there has been a scale changing transaction meanwhile.
The transaction id test was added in r218149 and the problem it fixed remains fixed. This change also matches better
what it was purpoted to implement.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (233779 => 233780)
--- trunk/Source/WebKit/ChangeLog 2018-07-12 19:52:23 UTC (rev 233779)
+++ trunk/Source/WebKit/ChangeLog 2018-07-12 20:11:30 UTC (rev 233780)
@@ -1,3 +1,32 @@
+2018-07-12 Antti Koivisto <[email protected]>
+
+ REGRESSION (r232356): After zooming a page in and out, it's possible to temporarily have missing tiles (google.com, apple.com)
+ https://bugs.webkit.org/show_bug.cgi?id=187553
+ <rdar://problem/41863803>
+
+ Reviewed by Simon Fraser.
+
+ We ignore zoom scale from UI process if it doesn't match the last remote layer tree transaction. However nothing
+ guarantees that we receive the real scale again until user interacts with the page. This means the web process
+ scale and the UI process scale can be wildly out of sync.
+
+ This problem becomes more likely to be visible when
+ - we are under memory pressure so we don't update tiles during zooming and rely on the one final update afterwards
+ - the page generates lots of layer tree transactions
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::willCommitLayerTree):
+
+ Remember the last transaction where we actually changed the page scale.
+
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::scaleFromUIProcess const):
+
+ Only reject the UI process scale if there has been a scale changing transaction meanwhile.
+ The transaction id test was added in r218149 and the problem it fixed remains fixed. This change also matches better
+ what it was purpoted to implement.
+
2018-07-12 Megan Gardner <[email protected]>
Keep Selections within Shadow DOM boundaries
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (233779 => 233780)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-07-12 19:52:23 UTC (rev 233779)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-07-12 20:11:30 UTC (rev 233780)
@@ -3252,6 +3252,10 @@
layerTransaction.setDynamicViewportSizeUpdateID(*m_pendingDynamicViewportSizeUpdateID);
m_pendingDynamicViewportSizeUpdateID = std::nullopt;
}
+ if (m_lastTransactionPageScaleFactor != layerTransaction.pageScaleFactor()) {
+ m_lastTransactionPageScaleFactor = layerTransaction.pageScaleFactor();
+ m_lastTransactionIDWithScaleChange = layerTransaction.transactionID();
+ }
#endif
layerTransaction.setScrollPosition(frameView->scrollPosition());
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (233779 => 233780)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-07-12 19:52:23 UTC (rev 233779)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-07-12 20:11:30 UTC (rev 233780)
@@ -1666,6 +1666,8 @@
WebCore::FloatRect m_previousExposedContentRect;
uint64_t m_currentAssistedNodeIdentifier { 0 };
std::optional<DynamicViewportSizeUpdateID> m_pendingDynamicViewportSizeUpdateID;
+ double m_lastTransactionPageScaleFactor { 0 };
+ uint64_t m_lastTransactionIDWithScaleChange { 0 };
#endif
WebCore::Timer m_layerVolatilityTimer;
Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (233779 => 233780)
--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-07-12 19:52:23 UTC (rev 233779)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm 2018-07-12 20:11:30 UTC (rev 233780)
@@ -2826,9 +2826,8 @@
std::optional<float> WebPage::scaleFromUIProcess(const VisibleContentRectUpdateInfo& visibleContentRectUpdateInfo) const
{
- auto transactionIDForLastScaleSentToUIProcess = downcast<RemoteLayerTreeDrawingArea>(*m_drawingArea).lastCommittedTransactionID();
auto transactionIDForLastScaleFromUIProcess = visibleContentRectUpdateInfo.lastLayerTreeTransactionID();
- if (transactionIDForLastScaleSentToUIProcess != transactionIDForLastScaleFromUIProcess)
+ if (m_lastTransactionIDWithScaleChange > transactionIDForLastScaleFromUIProcess)
return std::nullopt;
float scaleFromUIProcess = visibleContentRectUpdateInfo.scale();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes