⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286631 in webkit


Ignore:
Timestamp:
Dec 7, 2021, 4:44:05 PM (5 years ago)
Author:
Simon Fraser
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):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r286625 r286631  
     12021-12-07  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [Scroll Momentum Generator] Pages lose ability to momentum scroll after dragging between displays
     4        https://bugs.webkit.org/show_bug.cgi?id=233948
     5        rdar://86110813
     6
     7        Reviewed by Tim Horton.
     8
     9        This is a conservative fix for the bug. When a view moves to a new screen, WebPageProxy
     10        needs to unregister for full speed updates using the old displayID, and register
     11        using the new one.
     12
     13        Longer term, it would be better if "full speed updates" was a per-observer concept,
     14        but that would mean registering an observer while wheel events are being received,
     15        which needs a bit more thought.
     16
     17        * UIProcess/WebPageProxy.cpp:
     18        (WebKit::WebPageProxy::windowScreenDidChange):
     19
    1202021-12-07  Cameron McCormack  <heycam@apple.com>
    221
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r286602 r286631  
    39593959void WebPageProxy::windowScreenDidChange(PlatformDisplayID displayID, std::optional<unsigned> nominalFramesPerSecond)
    39603960{
     3961#if HAVE(CVDISPLAYLINK)
     3962    if (hasRunningProcess() && m_displayID && m_registeredForFullSpeedUpdates)
     3963        process().processPool().setDisplayLinkForDisplayWantsFullSpeedUpdates(*m_process->connection(), *m_displayID, false);
     3964
     3965    m_registeredForFullSpeedUpdates = false;
     3966#endif
     3967
    39613968    m_displayID = displayID;
    39623969
     
    39663973    send(Messages::EventDispatcher::PageScreenDidChange(m_webPageID, displayID));
    39673974    send(Messages::WebPage::WindowScreenDidChange(displayID, nominalFramesPerSecond));
     3975#if HAVE(CVDISPLAYLINK)
     3976    updateDisplayLinkFrequency();
     3977#endif
    39683978}
    39693979
Note: See TracChangeset for help on using the changeset viewer.