Changeset 244731 in webkit
- Timestamp:
- Apr 29, 2019 3:14:01 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r244727 r244731 1 2019-04-25 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 REGRESSION(r244635): [GTK] Wrong background color used in non-dark mode 4 https://bugs.webkit.org/show_bug.cgi?id=197276 5 6 Reviewed by Michael Catanzaro. 7 8 Since r244635, we are now getting the frame view background color from the theme. That's correct for dark mode, 9 but in non-dark mode we still want to use white backgrounds by default. This made a lot of tests to fail. 10 11 * css/CSSValueKeywords.in: Add -webkit-control-background when HAVE(OS_DARK_MODE_SUPPORT). 12 * css/html.css: Use -webkit-control-background instead of -apple-system-control-background. 13 * page/FrameView.cpp: 14 (WebCore::FrameView::updateBackgroundRecursively): Use CSSValueWindow instead of CSSValueWindowframe. 15 * rendering/RenderThemeGtk.cpp: 16 (WebCore::RenderThemeGtk::systemColor const): Only get the window background from the theme in dark mode. Handle 17 also CSSValueWebkitControlBackground. 18 * rendering/RenderThemeMac.mm: 19 (WebCore::RenderThemeMac::systemColor const): Handle CSSValueWebkitControlBackground when HAVE(OS_DARK_MODE_SUPPORT). 20 1 21 2019-04-28 Andy Estes <aestes@apple.com> 2 22 -
trunk/Source/WebCore/css/CSSValueKeywords.in
r244408 r244731 268 268 -apple-system-indigo 269 269 -apple-system-teal 270 #endif 271 #if defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT 272 -webkit-control-background 270 273 #endif 271 274 -webkit-focus-ring-color -
trunk/Source/WebCore/css/html.css
r243859 r244731 390 390 #if defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT 391 391 color: text; 392 background-color: - apple-system-control-background;392 background-color: -webkit-control-background; 393 393 #else 394 394 background-color: white; … … 668 668 #if defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT 669 669 color: text; 670 background-color: - apple-system-control-background;670 background-color: -webkit-control-background; 671 671 #else 672 672 background-color: white; … … 955 955 #if defined(HAVE_OS_DARK_MODE_SUPPORT) && HAVE_OS_DARK_MODE_SUPPORT 956 956 color: text; 957 background-color: - apple-system-control-background;957 background-color: -webkit-control-background; 958 958 #else 959 959 color: black; -
trunk/Source/WebCore/page/FrameView.cpp
r244635 r244731 3005 3005 static const auto cssValueControlBackground = CSSValueAppleSystemControlBackground; 3006 3006 #else 3007 static const auto cssValueControlBackground = CSSValueWindow frame;3007 static const auto cssValueControlBackground = CSSValueWindow; 3008 3008 #endif 3009 3009 Color baseBackgroundColor = backgroundColor.valueOr(RenderTheme::singleton().systemColor(cssValueControlBackground, styleColorOptions())); -
trunk/Source/WebCore/rendering/RenderThemeGtk.cpp
r244635 r244731 1781 1781 case CSSValueGraytext: 1782 1782 return styleColor(Entry, GTK_STATE_FLAG_INSENSITIVE, StyleColorForeground); 1783 case CSSValueWebkitControlBackground: 1784 return styleColor(Entry, GTK_STATE_FLAG_ACTIVE, StyleColorBackground); 1783 1785 #if GTK_CHECK_VERSION(3, 20, 0) 1784 case CSSValueWindowframe: 1785 return styleColor(Window, GTK_STATE_FLAG_ACTIVE, StyleColorBackground); 1786 case CSSValueWindow: { 1787 // Only get window color from the theme in dark mode. 1788 gboolean preferDarkTheme = FALSE; 1789 if (auto* settings = gtk_settings_get_default()) 1790 g_object_get(settings, "gtk-application-prefer-dark-theme", &preferDarkTheme, nullptr); 1791 if (preferDarkTheme) 1792 return styleColor(Window, GTK_STATE_FLAG_ACTIVE, StyleColorBackground); 1793 break; 1794 } 1786 1795 #endif 1787 1796 default: 1788 return RenderTheme::systemColor(cssValueId, options); 1789 } 1797 break; 1798 } 1799 1800 return RenderTheme::systemColor(cssValueId, options); 1790 1801 } 1791 1802 -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r244554 r244731 716 716 return @selector(textBackgroundColor); 717 717 case CSSValueAppleSystemControlBackground: 718 #if HAVE(OS_DARK_MODE_SUPPORT) 719 case CSSValueWebkitControlBackground: 720 #endif 718 721 return @selector(controlBackgroundColor); 719 722 case CSSValueAppleSystemAlternateSelectedText:
Note: See TracChangeset
for help on using the changeset viewer.