Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace usages of ScrollbarControlSize with ScrollbarWidth #14430

Merged

Conversation

lukewarlow
Copy link
Member

@lukewarlow lukewarlow commented May 27, 2023

0b067f4

Replace usages of ScrollbarControlSize with ScrollbarWidth
https://bugs.webkit.org/show_bug.cgi?id=257415

Reviewed by Tim Nguyen.

ScrollbarControlSize enum has been removed and usages of it replaced with the equivalent ScrollbarWidth enum.
ScrollbarWidth enum has been moved into ScrollTypes.h

This patch has no behaviour changes.

* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::createScrollbar):
* Source/WebCore/platform/PopupMenuClient.h:
* Source/WebCore/platform/ScrollTypes.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/ScrollTypes.h:
* Source/WebCore/platform/ScrollView.cpp:
(WebCore::ScrollView::createScrollbar):
* Source/WebCore/platform/Scrollbar.cpp:
(WebCore::Scrollbar::createNativeScrollbar):
(WebCore::Scrollbar::Scrollbar):
(WebCore::Scrollbar::isHiddenByStyle const):
* Source/WebCore/platform/Scrollbar.h:
(WebCore::Scrollbar::widthStyle const):
(WebCore::Scrollbar::controlSize const): Deleted.
* Source/WebCore/platform/ScrollbarTheme.h:
(WebCore::ScrollbarTheme::scrollbarThickness):
* Source/WebCore/platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::minimumThumbLength):
* Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp:
(WebCore::ScrollbarThemeAdwaita::scrollbarThickness):
* Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.h:
* Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::scrollbarThickness):
* Source/WebCore/platform/gtk/ScrollbarThemeGtk.h:
* Source/WebCore/platform/ios/ScrollbarThemeIOS.h:
* Source/WebCore/platform/ios/ScrollbarThemeIOS.mm:
(WebCore::ScrollbarThemeIOS::scrollbarThickness):
* Source/WebCore/platform/mac/ScrollbarThemeMac.h:
* Source/WebCore/platform/mac/ScrollbarThemeMac.mm:
(WebCore::scrollbarWidthToNSControlSize):
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::scrollbarWidthToIndex):
(WebCore::ScrollbarThemeMac::hasButtons):
(WebCore::buttonRepaintRect):
(WebCore::ScrollbarThemeMac::backButtonRect):
(WebCore::ScrollbarThemeMac::forwardButtonRect):
(WebCore::ScrollbarThemeMac::trackRect):
(WebCore::scrollbarControlSizeToNSControlSize): Deleted.
(WebCore::scrollbarSizeToIndex): Deleted.
* Source/WebCore/platform/mac/ScrollbarsControllerMac.mm:
(WebCore::ScrollbarsControllerMac::updateScrollerStyle):
* Source/WebCore/platform/mock/ScrollbarThemeMock.cpp:
(WebCore::ScrollbarThemeMock::scrollbarThickness):
* Source/WebCore/platform/mock/ScrollbarThemeMock.h:
* Source/WebCore/platform/playstation/ScrollbarThemePlayStation.cpp:
(WebCore::ScrollbarThemePlayStation::scrollbarThickness):
* Source/WebCore/platform/playstation/ScrollbarThemePlayStation.h:
* Source/WebCore/platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::show):
(WebCore::PopupMenuWin::calculatePositionAndSize):
* Source/WebCore/platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::scrollbarThickness):
* Source/WebCore/platform/win/ScrollbarThemeWin.h:
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::createScrollbar):
* Source/WebCore/rendering/RenderListBox.cpp:
(WebCore::RenderListBox::createScrollbar):
* Source/WebCore/rendering/RenderMenuList.cpp:
(RenderMenuList::createScrollbar):
* Source/WebCore/rendering/RenderMenuList.h:
* Source/WebCore/rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::RenderScrollbar):
* Source/WebCore/rendering/RenderScrollbarTheme.h:
* Source/WebCore/rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::createScrollbar):
* Source/WebCore/rendering/RenderSearchField.h:
* Source/WebCore/rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::scrollbarThickness const):
* Source/WebCore/rendering/RenderTheme.h:
(WebCore::RenderTheme::scrollbarWidthStyleForPart):
(WebCore::RenderTheme::scrollbarControlSizeForPart): Deleted.
* Source/WebCore/rendering/RenderThemeMac.h:
* Source/WebCore/rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* Source/WebCore/rendering/style/RenderStyleConstants.h:
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
* Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::showPopupMenu):
(WebKit::WebPopupMenuProxyWin::calculatePositionAndSize):
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::createScrollbar):

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

4dc212d

Misc iOS, tvOS & watchOS macOS Linux Windows
❌ πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@lukewarlow lukewarlow self-assigned this May 27, 2023
@lukewarlow lukewarlow added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label May 27, 2023
@lukewarlow
Copy link
Member Author

Rather confused by the style error here. Line 322 is a function definition.

static IntRect buttonRepaintRect(const IntRect& buttonRect, ScrollbarOrientation orientation, ScrollbarWidth widthStyle, bool start) unsure how it can have too many spaces?

@lukewarlow lukewarlow marked this pull request as ready for review May 27, 2023 21:00
@lukewarlow lukewarlow requested review from a team and cdumez as code owners May 27, 2023 21:00
@lukewarlow lukewarlow requested review from smfr and nt1m May 27, 2023 21:00
Source/WebCore/platform/Scrollbar.h Outdated Show resolved Hide resolved
@lukewarlow lukewarlow force-pushed the scrollbar-control-size-refactor branch from dee5708 to 9218045 Compare May 27, 2023 21:55
@lukewarlow lukewarlow requested a review from nt1m May 27, 2023 21:55
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 27, 2023
Source/WebCore/platform/ScrollTypes.h Outdated Show resolved Hide resolved
@lukewarlow lukewarlow removed the merging-blocked Applied to prevent a change from being merged label May 28, 2023
@lukewarlow lukewarlow force-pushed the scrollbar-control-size-refactor branch from 9218045 to 4dc212d Compare May 28, 2023 09:46
@lukewarlow lukewarlow added request-merge-queue Request a pull request to be added to merge-queue once ready and removed request-merge-queue Request a pull request to be added to merge-queue once ready labels May 28, 2023
@Ahmad-S792 Ahmad-S792 added merge-queue Applied to send a pull request to merge-queue and removed request-merge-queue Request a pull request to be added to merge-queue once ready labels May 28, 2023
https://bugs.webkit.org/show_bug.cgi?id=257415

Reviewed by Tim Nguyen.

ScrollbarControlSize enum has been removed and usages of it replaced with the equivalent ScrollbarWidth enum.
ScrollbarWidth enum has been moved into ScrollTypes.h

This patch has no behaviour changes.

* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::createScrollbar):
* Source/WebCore/platform/PopupMenuClient.h:
* Source/WebCore/platform/ScrollTypes.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/ScrollTypes.h:
* Source/WebCore/platform/ScrollView.cpp:
(WebCore::ScrollView::createScrollbar):
* Source/WebCore/platform/Scrollbar.cpp:
(WebCore::Scrollbar::createNativeScrollbar):
(WebCore::Scrollbar::Scrollbar):
(WebCore::Scrollbar::isHiddenByStyle const):
* Source/WebCore/platform/Scrollbar.h:
(WebCore::Scrollbar::widthStyle const):
(WebCore::Scrollbar::controlSize const): Deleted.
* Source/WebCore/platform/ScrollbarTheme.h:
(WebCore::ScrollbarTheme::scrollbarThickness):
* Source/WebCore/platform/ScrollbarThemeComposite.cpp:
(WebCore::ScrollbarThemeComposite::minimumThumbLength):
* Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.cpp:
(WebCore::ScrollbarThemeAdwaita::scrollbarThickness):
* Source/WebCore/platform/adwaita/ScrollbarThemeAdwaita.h:
* Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::scrollbarThickness):
* Source/WebCore/platform/gtk/ScrollbarThemeGtk.h:
* Source/WebCore/platform/ios/ScrollbarThemeIOS.h:
* Source/WebCore/platform/ios/ScrollbarThemeIOS.mm:
(WebCore::ScrollbarThemeIOS::scrollbarThickness):
* Source/WebCore/platform/mac/ScrollbarThemeMac.h:
* Source/WebCore/platform/mac/ScrollbarThemeMac.mm:
(WebCore::scrollbarWidthToNSControlSize):
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::scrollbarWidthToIndex):
(WebCore::ScrollbarThemeMac::hasButtons):
(WebCore::buttonRepaintRect):
(WebCore::ScrollbarThemeMac::backButtonRect):
(WebCore::ScrollbarThemeMac::forwardButtonRect):
(WebCore::ScrollbarThemeMac::trackRect):
(WebCore::scrollbarControlSizeToNSControlSize): Deleted.
(WebCore::scrollbarSizeToIndex): Deleted.
* Source/WebCore/platform/mac/ScrollbarsControllerMac.mm:
(WebCore::ScrollbarsControllerMac::updateScrollerStyle):
* Source/WebCore/platform/mock/ScrollbarThemeMock.cpp:
(WebCore::ScrollbarThemeMock::scrollbarThickness):
* Source/WebCore/platform/mock/ScrollbarThemeMock.h:
* Source/WebCore/platform/playstation/ScrollbarThemePlayStation.cpp:
(WebCore::ScrollbarThemePlayStation::scrollbarThickness):
* Source/WebCore/platform/playstation/ScrollbarThemePlayStation.h:
* Source/WebCore/platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::show):
(WebCore::PopupMenuWin::calculatePositionAndSize):
* Source/WebCore/platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::scrollbarThickness):
* Source/WebCore/platform/win/ScrollbarThemeWin.h:
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::createScrollbar):
* Source/WebCore/rendering/RenderListBox.cpp:
(WebCore::RenderListBox::createScrollbar):
* Source/WebCore/rendering/RenderMenuList.cpp:
(RenderMenuList::createScrollbar):
* Source/WebCore/rendering/RenderMenuList.h:
* Source/WebCore/rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::RenderScrollbar):
* Source/WebCore/rendering/RenderScrollbarTheme.h:
* Source/WebCore/rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::createScrollbar):
* Source/WebCore/rendering/RenderSearchField.h:
* Source/WebCore/rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::scrollbarThickness const):
* Source/WebCore/rendering/RenderTheme.h:
(WebCore::RenderTheme::scrollbarWidthStyleForPart):
(WebCore::RenderTheme::scrollbarControlSizeForPart): Deleted.
* Source/WebCore/rendering/RenderThemeMac.h:
* Source/WebCore/rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* Source/WebCore/rendering/style/RenderStyleConstants.h:
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
* Source/WebKit/UIProcess/win/WebPopupMenuProxyWin.cpp:
(WebKit::WebPopupMenuProxyWin::showPopupMenu):
(WebKit::WebPopupMenuProxyWin::calculatePositionAndSize):
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::createScrollbar):

Canonical link: https://commits.webkit.org/264639@main
@webkit-commit-queue
Copy link
Collaborator

Committed 264639@main (0b067f4): https://commits.webkit.org/264639@main

Reviewed commits have been landed. Closing PR #14430 and removing active labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Bugs Unclassified bugs are placed in this component until the correct component can be determined.
Projects
None yet
6 participants