Index: content/browser/browser_plugin/browser_plugin_embedder.cc |
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc |
index 97ab16d57940e0396797aa8e76e1a6d3f35897f6..7b878f72b6a6af9be2e4413626913a9f50e1c1d9 100644 |
--- a/content/browser/browser_plugin/browser_plugin_embedder.cc |
+++ b/content/browser/browser_plugin/browser_plugin_embedder.cc |
@@ -113,6 +113,28 @@ void BrowserPluginEmbedder::NavigateGuest(RenderViewHost* render_view_host, |
guest_web_contents->GetMutableRendererPrefs()-> |
throttle_input_events = false; |
+ |
+#if defined(TOOLKIT_GTK) |
Fady Samuel
2012/09/06 21:21:07
Why should this be GTK only? Why not copy all the
lazyboy
2012/09/08 02:38:55
It's only GTK that uses the renderer_prefs->color
|
+ // Copy selection color and caret blink rate prefs from embedder, otherwise |
+ // things don't work on gtk. |
+ content::RendererPreferences* embedder_renderer_prefs = |
+ web_contents()->GetMutableRendererPrefs(); |
+ content::RendererPreferences* guest_renderer_prefs = |
+ guest_web_contents->GetMutableRendererPrefs(); |
+ |
+ guest_renderer_prefs->active_selection_bg_color = |
+ embedder_renderer_prefs->active_selection_bg_color; |
+ guest_renderer_prefs->active_selection_fg_color = |
+ embedder_renderer_prefs->active_selection_fg_color; |
+ guest_renderer_prefs->inactive_selection_bg_color = |
+ embedder_renderer_prefs->inactive_selection_bg_color; |
+ guest_renderer_prefs->inactive_selection_fg_color = |
+ embedder_renderer_prefs->inactive_selection_fg_color; |
+ |
+ guest_renderer_prefs->caret_blink_interval = |
+ embedder_renderer_prefs->caret_blink_interval; |
+#endif |
+ |
AddGuest(instance_id, guest, frame_id); |
guest_web_contents->SetDelegate(guest); |
} else { |