Skip to content

Commit

Permalink
alloy: Fix incorrect rendering of PiP overlay on mouseover (fixes #3482)
Browse files Browse the repository at this point in the history
Initialize the Chrome color mixer so that ColorProvider returns the expected
semi-transparent color for overlay background in video_overlay_window_views.cc
instead of the default opaque red color (kPlaceholderColor).
  • Loading branch information
magreenblatt committed Apr 11, 2023
1 parent ef3882b commit 1bf717c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libcef/browser/alloy/alloy_browser_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/media/router/chrome_media_router_factory.h"
#include "chrome/browser/net/system_network_context_manager.h"
#include "chrome/browser/ui/color/chrome_color_mixers.h"
#include "chrome/browser/ui/javascript_dialogs/chrome_javascript_app_modal_dialog_view_factory.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/common/chrome_switches.h"
Expand Down Expand Up @@ -187,6 +188,11 @@ void AlloyBrowserMainParts::ToolkitInitialized() {
#else
InstallChromeJavaScriptAppModalDialogViewFactory();
#endif

// On GTK that builds the native theme that, in turn, adds the GTK core color
// mixer; core mixers should all be added before we add chrome mixers.
ui::ColorProviderManager::Get().AppendColorProviderInitializer(
base::BindRepeating(AddChromeColorMixers));
}

void AlloyBrowserMainParts::PreCreateMainMessageLoop() {
Expand Down

0 comments on commit 1bf717c

Please sign in to comment.