Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8e1ad9587c9f263cd3aa535c00c161bf31b69ea3
      
https://github.com/WebKit/WebKit/commit/8e1ad9587c9f263cd3aa535c00c161bf31b69ea3
  Author: Fujii Hironori <[email protected]>
  Date:   2026-02-05 (Thu, 05 Feb 2026)

  Changed paths:
    M Source/WTF/wtf/PlatformUse.h
    M Source/WebCore/Headers.cmake
    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
    A Source/WebCore/page/scrolling/coordinated/ScrollerCoordinated.cpp
    A Source/WebCore/page/scrolling/coordinated/ScrollerCoordinated.h
    A Source/WebCore/page/scrolling/coordinated/ScrollerPairCoordinated.cpp
    A Source/WebCore/page/scrolling/coordinated/ScrollerPairCoordinated.h
    A 
Source/WebCore/page/scrolling/coordinated/ScrollingStateScrollingNodeCoordinated.cpp
    M 
Source/WebCore/page/scrolling/coordinated/ScrollingTreeScrollingNodeDelegateCoordinated.cpp
    M 
Source/WebCore/page/scrolling/coordinated/ScrollingTreeScrollingNodeDelegateCoordinated.h
    M Source/WebCore/platform/Adwaita.cmake
    M Source/WebCore/platform/ScrollableArea.cpp
    M Source/WebCore/platform/ScrollableArea.h
    M Source/WebCore/platform/Scrollbar.cpp
    M Source/WebCore/platform/ScrollbarTheme.h
    M Source/WebCore/platform/ScrollbarsController.h
    M Source/WebCore/platform/SourcesAdwaita.txt
    M Source/WebCore/platform/TextureMapper.cmake
    A Source/WebCore/platform/adwaita/AdwaitaScrollbarPainter.cpp
    A Source/WebCore/platform/adwaita/AdwaitaScrollbarPainter.h
    M Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp
    M Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.h
    A Source/WebCore/platform/adwaita/ScrollerImpAdwaita.h
    M Source/WebCore/platform/generic/ScrollbarsControllerGeneric.cpp
    M Source/WebCore/platform/generic/ScrollbarsControllerGeneric.h
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h
    M Source/WebKit/SourcesGTK.txt
    M Source/WebKit/SourcesWPE.txt
    M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
    A 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ScrollbarsControllerCoordinated.cpp
    A 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ScrollbarsControllerCoordinated.h

  Log Message:
  -----------
  [GTK][WPE][Coordinated Graphics] Paint scrollbars in the scrolling thread for 
async scrolling
https://bugs.webkit.org/show_bug.cgi?id=305561

Reviewed by Carlos Garcia Campos.

Scrollbars weren't updated for wheel event async scrolling while the main
thread was blocked because scrollbar layers were painted in the main thread.

Paint scrollbars in the scrolling thread for composited layers. Extracted the
scrollbar painting code from ScrollbarThemeAdwaita.cpp to 
AdwaitaScrollbarPainter.cpp
to make it thread-safe.

Added a new ScrollbarsController implementation ScrollbarsControllerCoordinated
based on Cocoa's RemoteScrollbarsController. Since
WebChromeClient::ensureScrollbarsController dynamically switches between
ScrollbarsControllerCoordinated and ScrollbarsControllerGeneric, they should
work properly even if it is created after Scrollbar is created. Fixed
ScrollbarsControllerGeneric to check scrollbars are already created.

PlayStation port is using Coordinated Graphics, but not using
ScrollbarThemeAdwaita. Added a new macro
USE_COORDINATED_GRAPHICS_ASYNC_SCROLLBAR to preserve the original behavior.

* Source/WTF/wtf/PlatformUse.h:
* Source/WebCore/Headers.cmake:
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::setHoveredAndPressedScrollbarParts):
(WebCore::AsyncScrollingCoordinator::setScrollbarOpacity):
(WebCore::AsyncScrollingCoordinator::setScrollingNodeScrollableAreaGeometry):
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h:
* Source/WebCore/page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::setHoveredAndPressedScrollbarParts):
(WebCore::ScrollingCoordinator::setScrollbarOpacity):
* Source/WebCore/page/scrolling/ScrollingStateNode.h:
* Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setScrollbarOpacity):
* Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::verticalScrollerImp const):
(WebCore::ScrollingStateScrollingNode::horizontalScrollerImp const):
(WebCore::ScrollingStateScrollingNode::scrollbarOpacity const):
* Source/WebCore/page/scrolling/coordinated/ScrollerCoordinated.cpp: Added.
(WebCore::ScrollerCoordinated::ScrollerCoordinated):
(WebCore::ScrollerCoordinated::setScrollerImp):
(WebCore::ScrollerCoordinated::setHostLayer):
(WebCore::ScrollerCoordinated::updateValues):
(WebCore::ScrollerCoordinated::setHoveredAndPressedParts):
(WebCore::ScrollerCoordinated::setEnabled):
(WebCore::ScrollerCoordinated::setOverlayScrollbarEnabled):
(WebCore::ScrollerCoordinated::setUseDarkAppearance):
(WebCore::ScrollerCoordinated::setOpacity):
(WebCore::ScrollerCoordinated::setScrollbarLayoutDirection):
* Source/WebCore/page/scrolling/coordinated/ScrollerCoordinated.h: Added.
* Source/WebCore/page/scrolling/coordinated/ScrollerPairCoordinated.cpp: Added.
(WebCore::ScrollerPairCoordinated::ScrollerPairCoordinated):
(WebCore::ScrollerPairCoordinated::updateValues):
(WebCore::ScrollerPairCoordinated::valuesForOrientation):
* Source/WebCore/page/scrolling/coordinated/ScrollerPairCoordinated.h: Added.
(WebCore::ScrollerPairCoordinated::create):
(WebCore::ScrollerPairCoordinated::verticalScroller):
(WebCore::ScrollerPairCoordinated::horizontalScroller):
* 
Source/WebCore/page/scrolling/coordinated/ScrollingStateScrollingNodeCoordinated.cpp:
 Copied from 
Source/WebCore/page/scrolling/coordinated/ScrollingTreeScrollingNodeDelegateCoordinated.h.
(WebCore::ScrollingStateScrollingNode::setScrollerImpsFromScrollbars):
* 
Source/WebCore/page/scrolling/coordinated/ScrollingTreeScrollingNodeDelegateCoordinated.cpp:
(WebCore::ScrollingTreeScrollingNodeDelegateCoordinated::ScrollingTreeScrollingNodeDelegateCoordinated):
(WebCore::ScrollingTreeScrollingNodeDelegateCoordinated::updateVisibleLengths):
(WebCore::ScrollingTreeScrollingNodeDelegateCoordinated::updateFromStateNode):
* 
Source/WebCore/page/scrolling/coordinated/ScrollingTreeScrollingNodeDelegateCoordinated.h:
* Source/WebCore/platform/Adwaita.cmake:
* Source/WebCore/platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollbarOpacity const):
* Source/WebCore/platform/ScrollableArea.h:
* Source/WebCore/platform/Scrollbar.cpp:
(WebCore::Scrollbar::setHoveredPart):
(WebCore::Scrollbar::setPressedPart):
(WebCore::Scrollbar::supportsUpdateOnSecondaryThread const):
* Source/WebCore/platform/ScrollbarTheme.h:
(WebCore::ScrollbarTheme::isScrollbarThemeAdwaita const):
* Source/WebCore/platform/ScrollbarsController.h:
(WebCore::ScrollbarsController::isScrollbarsControllerCoordinated const):
(WebCore::ScrollbarsController::hoveredPartChanged):
(WebCore::ScrollbarsController::pressedPartChanged):
(WebCore::ScrollbarsController::scrollbarOpacityChanged):
* Source/WebCore/platform/SourcesAdwaita.txt:
* Source/WebCore/platform/TextureMapper.cmake:
* Source/WebCore/platform/adwaita/AdwaitaScrollbarPainter.cpp: Copied from 
Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp.
(WebCore::AdwaitaScrollbarPainter::paint):
* Source/WebCore/platform/adwaita/AdwaitaScrollbarPainter.h: Added.
* Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp:
(WebCore::ScrollbarThemeAdwaita::paint):
(WebCore::ScrollbarThemeAdwaita::scrollerImpForScrollbar):
(): Deleted.
* Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.h:
(isType):
* Source/WebCore/platform/adwaita/ScrollerImpAdwaita.h: Copied from 
Source/WebCore/page/scrolling/coordinated/ScrollingTreeScrollingNodeDelegateCoordinated.h.
(WebCore::ScrollerImpAdwaita::paint):
* Source/WebCore/platform/generic/ScrollbarsControllerGeneric.cpp:
(WebCore::ScrollbarsControllerGeneric::ScrollbarsControllerGeneric):
(WebCore::ScrollbarsControllerGeneric::updateOverlayScrollbarsOpacity):
* Source/WebCore/platform/generic/ScrollbarsControllerGeneric.h:
* 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.cpp:
(WebCore::CoordinatedPlatformLayer::setContentsScrollbarImageForScrolling):
(WebCore::CoordinatedPlatformLayer::flushCompositingState):
* 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayer.h:
* Source/WebKit/SourcesGTK.txt:
* Source/WebKit/SourcesWPE.txt:
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::ensureScrollbarsController const):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:
* 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ScrollbarsControllerCoordinated.cpp:
 Added.
(WebKit::ScrollbarsControllerCoordinated::ScrollbarsControllerCoordinated):
(WebKit::ScrollbarsControllerCoordinated::scrollbarLayoutDirectionChanged):
(WebKit::ScrollbarsControllerCoordinated::shouldDrawIntoScrollbarLayer const):
(WebKit::ScrollbarsControllerCoordinated::updateScrollbarEnabledState):
(WebKit::ScrollbarsControllerCoordinated::updateScrollbarStyle):
(WebKit::ScrollbarsControllerCoordinated::scrollbarOpacityChanged):
(WebKit::ScrollbarsControllerCoordinated::hoveredPartChanged):
(WebKit::ScrollbarsControllerCoordinated::pressedPartChanged):
* 
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ScrollbarsControllerCoordinated.h:
 Added.
(isType):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to