-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Post-NEW_THEME modest RenderTheme refactor
https://bugs.webkit.org/show_bug.cgi?id=265753 Reviewed by Aditya Keerthi. This is a modest improvement (as I discovered several methods were not virtual which made less modest improvements harder) to the painting and adjust style side of things. macOS (and iOS for a single control) uses its own paint() method that sends instructions to the GPU process. iOS (usually) and Adwaita paint directly (which is preferable), but Adwaita uses an older code path for this. Make this more apparent by using the USE(THEME_ADWAITA) directive and adding some FIXMEs to avoid other themes copying that. There was a similar situation for adjust style, but there macOS and Adwaita were aligned, but iOS had its own code path. Again make this more apparent by giving macOS and Adwaita a shared method the individual adjust style methods can delegate to. More work remains here, but this should make it easier for anyone trying to do something new here. * Source/WebCore/platform/Theme.cpp: (WebCore::Theme::paint): Deleted. (WebCore::Theme::inflateControlPaintRect const): Deleted. * Source/WebCore/platform/Theme.h: (WebCore::Theme::paint): (WebCore::Theme::inflateControlPaintRect const): * Source/WebCore/platform/adwaita/ThemeAdwaita.cpp: (WebCore::ThemeAdwaita::paint): * Source/WebCore/platform/adwaita/ThemeAdwaita.h: * Source/WebCore/rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): (WebCore::RenderTheme::paint): (WebCore::RenderTheme::adjustButtonOrCheckboxOrColorWellOrInnerSpinButtonOrRadioOrSwitchStyle const): (WebCore::RenderTheme::adjustCheckboxStyle const): (WebCore::RenderTheme::adjustRadioStyle const): (WebCore::RenderTheme::adjustColorWellStyle const): (WebCore::RenderTheme::adjustButtonStyle const): (WebCore::RenderTheme::adjustInnerSpinButtonStyle const): (WebCore::RenderTheme::adjustSwitchStyle const): (WebCore::RenderTheme::paintColorWell): Deleted. * Source/WebCore/rendering/RenderTheme.h: (WebCore::RenderTheme::paintColorWell): (WebCore::RenderTheme::adjustButtonStyle const): Deleted. (WebCore::RenderTheme::adjustSwitchStyle const): Deleted. * Source/WebCore/rendering/RenderThemeAdwaita.cpp: (WebCore::RenderThemeAdwaita::paintMenuList): * Source/WebCore/rendering/RenderThemeIOS.h: * Source/WebCore/rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::paintColorWell): Deleted. Canonical link: https://commits.webkit.org/271895@main
- Loading branch information
Showing
9 changed files
with
132 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.