Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: fdbd1e818def7f92e7c7e410229619c18d419d08 https://github.com/WebKit/WebKit/commit/fdbd1e818def7f92e7c7e410229619c18d419d08 Author: Nikolaos Mouchtaris <nmouchta...@apple.com> Date: 2023-12-14 (Thu, 14 Dec 2023)
Changed paths: M Source/WebCore/SourcesCocoa.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/page/scrolling/mac/ScrollingStateScrollingNodeMac.mm M Source/WebCore/platform/Scrollbar.cpp M Source/WebCore/platform/Scrollbar.h M Source/WebCore/platform/ScrollbarTheme.h A Source/WebCore/platform/mac/ScrollbarMac.h A Source/WebCore/platform/mac/ScrollbarMac.mm M Source/WebCore/platform/mac/ScrollbarThemeMac.h M Source/WebCore/platform/mac/ScrollbarThemeMac.mm M Source/WebCore/platform/mac/ScrollbarsControllerMac.mm Log Message: ----------- Refactor Scrollbar to hold NSScrollerImp https://bugs.webkit.org/show_bug.cgi?id=264014 rdar://117770817 Reviewed by Simon Fraser. Decouple creation of NSScrollerImps from the global map in ScrollbarThemeMac. Instead, create ScrollbarMac to hold a reference to the NSScrollerImp, and change the map to a set of scrollbars (which is still necessary due to the WebScrollbarPrefsObserver stuff). * Source/WebCore/SourcesCocoa.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/Scrollbar.cpp: (WebCore::Scrollbar::createNativeScrollbar): * Source/WebCore/platform/mac/ScrollbarMac.h: Added. (WebCore::ScrollbarMac::~ScrollbarMac): * Source/WebCore/platform/mac/ScrollbarMac.mm: Added. (WebCore::ScrollbarMac::ScrollbarMac): (WebCore::ScrollbarMac::painterForScrollbar): (WebCore::ScrollbarMac::createNSScrollerImp): (WebCore::macScrollbarTheme): (WebCore::ScrollbarMac::updateNSScrollerImpState): (WebCore::ScrollbarMac::setNewPainterForScrollbar): * Source/WebCore/platform/mac/ScrollbarThemeMac.h: * Source/WebCore/platform/mac/ScrollbarThemeMac.mm: (WebCore::scrollbarMap): (+[WebScrollbarPrefsObserver appearancePrefsChanged:]): (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::unregisterScrollbar): (WebCore::ScrollbarThemeMac::painterForScrollbar): (WebCore::ScrollbarThemeMac::hasThumb): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::paintScrollbar): (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar): Deleted. * Source/WebCore/platform/mac/ScrollbarsControllerMac.mm: (WebCore::ScrollbarsControllerMac::updateScrollerStyle): Canonical link: https://commits.webkit.org/272044@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes