Title: [286631] trunk/Source/WebKit
Revision
286631
Author
[email protected]
Date
2021-12-07 16:44:05 -0800 (Tue, 07 Dec 2021)

Log Message

[Scroll Momentum Generator] Pages lose ability to momentum scroll after dragging between displays
https://bugs.webkit.org/show_bug.cgi?id=233948
rdar://86110813

Reviewed by Tim Horton.

This is a conservative fix for the bug. When a view moves to a new screen, WebPageProxy
needs to unregister for full speed updates using the old displayID, and register
using the new one.

Longer term, it would be better if "full speed updates" was a per-observer concept,
but that would mean registering an observer while wheel events are being received,
which needs a bit more thought.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::windowScreenDidChange):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (286630 => 286631)


--- trunk/Source/WebKit/ChangeLog	2021-12-08 00:40:21 UTC (rev 286630)
+++ trunk/Source/WebKit/ChangeLog	2021-12-08 00:44:05 UTC (rev 286631)
@@ -1,3 +1,22 @@
+2021-12-07  Simon Fraser  <[email protected]>
+
+        [Scroll Momentum Generator] Pages lose ability to momentum scroll after dragging between displays
+        https://bugs.webkit.org/show_bug.cgi?id=233948
+        rdar://86110813
+
+        Reviewed by Tim Horton.
+
+        This is a conservative fix for the bug. When a view moves to a new screen, WebPageProxy
+        needs to unregister for full speed updates using the old displayID, and register 
+        using the new one.
+
+        Longer term, it would be better if "full speed updates" was a per-observer concept,
+        but that would mean registering an observer while wheel events are being received,
+        which needs a bit more thought.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::windowScreenDidChange):
+
 2021-12-07  Cameron McCormack  <[email protected]>
 
         Move FontCache singleton and instance on WorkerGlobalScope to ThreadGlobalData

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (286630 => 286631)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-12-08 00:40:21 UTC (rev 286630)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-12-08 00:44:05 UTC (rev 286631)
@@ -3958,6 +3958,13 @@
 
 void WebPageProxy::windowScreenDidChange(PlatformDisplayID displayID, std::optional<unsigned> nominalFramesPerSecond)
 {
+#if HAVE(CVDISPLAYLINK)
+    if (hasRunningProcess() && m_displayID && m_registeredForFullSpeedUpdates)
+        process().processPool().setDisplayLinkForDisplayWantsFullSpeedUpdates(*m_process->connection(), *m_displayID, false);
+
+    m_registeredForFullSpeedUpdates = false;
+#endif
+
     m_displayID = displayID;
 
     if (!hasRunningProcess())
@@ -3965,6 +3972,9 @@
 
     send(Messages::EventDispatcher::PageScreenDidChange(m_webPageID, displayID));
     send(Messages::WebPage::WindowScreenDidChange(displayID, nominalFramesPerSecond));
+#if HAVE(CVDISPLAYLINK)
+    updateDisplayLinkFrequency();
+#endif
 }
 
 float WebPageProxy::deviceScaleFactor() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to