Skip to content

Commit

Permalink
Fix some guards for USE(THEME_ADWAITA)
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=261003

Reviewed by Michael Catanzaro.

Miscellaneous fixes to make `USE_THEME_ADWAITA` work more cross
platform.

* Source/WTF/wtf/PlatformUse.h:
* Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::layoutTraitsClassName const):
* Source/WebCore/rendering/RenderThemeAdwaita.cpp:
(WebCore::RenderThemeAdwaita::systemColor const):

Canonical link: https://commits.webkit.org/267554@main
  • Loading branch information
donny-dont committed Sep 1, 2023
1 parent 268201e commit eb79b75
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/WTF/wtf/PlatformUse.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
#define USE_CFNETWORK_CONTENT_ENCODING_SNIFFING_OVERRIDE 1
#endif

#if PLATFORM(MAC) || PLATFORM(WPE) || PLATFORM(GTK) || PLATFORM(WIN)
#if PLATFORM(MAC) || USE(THEME_ADWAITA)
/* FIXME: This really needs a descriptive name, this "new theme" was added in 2008. */
#define USE_NEW_THEME 1
#endif
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ String MediaControlsHost::layoutTraitsClassName() const
return "VisionLayoutTraits"_s;
#elif PLATFORM(WATCHOS)
return "WatchOSLayoutTraits"_s;
#elif PLATFORM(GTK) || PLATFORM(WPE) || PLATFORM(WIN)
#elif USE(THEME_ADWAITA)
return "AdwaitaLayoutTraits"_s;
#else
ASSERT_NOT_REACHED();
Expand Down
2 changes: 2 additions & 0 deletions Source/WebCore/rendering/RenderThemeAdwaita.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ Color RenderThemeAdwaita::systemColor(CSSValueID cssValueID, OptionSet<StyleColo

case CSSValueCanvas:
case CSSValueField:
#if HAVE(OS_DARK_MODE_SUPPORT)
case CSSValueWebkitControlBackground:
#endif
return useDarkAppearance ? textFieldBackgroundColorDark : textFieldBackgroundColorLight;

case CSSValueWindow:
Expand Down

0 comments on commit eb79b75

Please sign in to comment.