Title: [286733] branches/safari-612.4.2.1-branch/Source/WebKit
Revision
286733
Author
alanc...@apple.com
Date
2021-12-08 13:26:29 -0800 (Wed, 08 Dec 2021)

Log Message

Cherry-pick r286631. rdar://problem/85928816

    [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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286631 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog (286732 => 286733)


--- branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog	2021-12-08 21:26:26 UTC (rev 286732)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog	2021-12-08 21:26:29 UTC (rev 286733)
@@ -1,3 +1,46 @@
+2021-12-08  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r286631. rdar://problem/85928816
+
+    [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):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-12-07  Simon Fraser  <simon.fra...@apple.com>
+
+            [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-06  Alan Coon  <alanc...@apple.com>
 
         Cherry-pick r286566. rdar://problem/85928816

Modified: branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (286732 => 286733)


--- branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-12-08 21:26:26 UTC (rev 286732)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-12-08 21:26:29 UTC (rev 286733)
@@ -4002,6 +4002,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())
@@ -4009,6 +4016,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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to