[webkit-changes] [WebKit/WebKit] 15cb0c: [UI-side compositing] Legacy scrollbars do not fla...

Nikos Mouchtaris noreply at github.com
Fri Apr 7 12:20:20 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 15cb0cae9dcf910ce6862066f42cb29fa9e09741
      https://github.com/WebKit/WebKit/commit/15cb0cae9dcf910ce6862066f42cb29fa9e09741
  Author: Nikolaos Mouchtaris <nmouchtaris at apple.com>
  Date:   2023-04-07 (Fri, 07 Apr 2023)

  Changed paths:
    M Source/WebCore/page/EventHandler.cpp
    M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
    M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
    M Source/WebCore/page/scrolling/ScrollingCoordinator.h
    M Source/WebCore/page/scrolling/ScrollingStateNode.h
    M Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
    M Source/WebCore/page/scrolling/mac/ScrollerMac.h
    M Source/WebCore/page/scrolling/mac/ScrollerMac.mm
    M Source/WebCore/page/scrolling/mac/ScrollerPairMac.h
    M Source/WebCore/page/scrolling/mac/ScrollerPairMac.mm
    M Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  [UI-side compositing] Legacy scrollbars do not flash grey when hovered over
https://bugs.webkit.org/show_bug.cgi?id=254721
rdar://107447969

Reviewed by Simon Fraser.

For legacy scrollbars we need to call NSScrollerImp functions to notify them when a mouse
is hovering over them. The approach in this patch is to plumb a pair of bits representing
if a mouse is in the vertical or horizontal scrollbar through the scrolling tree, which
eventually calls into the scroller imp of ScrollerMac. Since this is only needed for legacy
scrollbars return early in ScrollerMac::mouseEntered/ExitedScrollbar if the style is not
legacy.

* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::updateLastScrollbarUnderMouse):
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::mouseDidEnterScrollbar):
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h:
* Source/WebCore/page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::mouseDidEnterScrollbar):
* Source/WebCore/page/scrolling/ScrollingStateNode.h:
* Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setMouseDidEnterScrollbar):
* Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::mouseDidEnterScrollbar const):
* Source/WebCore/page/scrolling/mac/ScrollerPairMac.h:
* Source/WebCore/page/scrolling/mac/ScrollerPairMac.mm:
(WebCore::ScrollerPairMac::mouseEnteredScrollbar):
(WebCore::ScrollerPairMac::mouseExitedScrollbar):
* Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
(WebCore::ScrollingTreeScrollingNodeDelegateMac::updateFromStateNode):
* Source/WebCore/platform/ScrollbarsController.h:
* Source/WebCore/platform/mac/NSScrollerImpDetails.mm:
(WebCore::ScrollerStyle::recommendedScrollerStyle):
* Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/262721@main




More information about the webkit-changes mailing list