| Index: chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| index 769f60b68da0201d0a130b0649954e3e2b63c0d3..355228e12a988b557dc7feb37b9c23106445d4e4 100644
|
| --- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| +++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| @@ -996,13 +996,18 @@ void Gtk2UI::LoadGtkValues() {
|
| void Gtk2UI::UpdateMaterialDesignColors() {
|
| // TODO(varkha): This should be merged back into LoadGtkValues() once Material
|
| // Design is on unconditionally.
|
| - if (ui::MaterialDesignController::IsModeMaterial()) {
|
| - NativeThemeGtk2* theme = NativeThemeGtk2::instance();
|
| - SkColor label_color =
|
| - theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor);
|
| - colors_[ThemeProperties::COLOR_BACKGROUND_TAB_TEXT] =
|
| - color_utils::BlendTowardOppositeLuma(label_color, 50);
|
| + // Early return when Material Design Controller is not initialized yet. This
|
| + // is harmless and the colors will get updated when this method is called
|
| + // again after the initialization. See http://crbug.com/622234.
|
| + if (!ui::MaterialDesignController::is_mode_initialized() ||
|
| + !ui::MaterialDesignController::IsModeMaterial()) {
|
| + return;
|
| }
|
| + NativeThemeGtk2* theme = NativeThemeGtk2::instance();
|
| + SkColor label_color =
|
| + theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor);
|
| + colors_[ThemeProperties::COLOR_BACKGROUND_TAB_TEXT] =
|
| + color_utils::BlendTowardOppositeLuma(label_color, 50);
|
| }
|
|
|
| SkColor Gtk2UI::BuildFrameColors() {
|
|
|