diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h index fe4ca0fafd45..025424a1654c 100644 --- content/public/common/common_param_traits_macros.h +++ content/public/common/common_param_traits_macros.h @@ -178,6 +178,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes) IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale) IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled) + IPC_STRUCT_TRAITS_MEMBER(base_background_color) IPC_STRUCT_TRAITS_MEMBER(cookie_enabled) IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop) IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled) diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc index b982618bef48..075efffc1ad7 100644 --- content/public/common/web_preferences.cc +++ content/public/common/web_preferences.cc @@ -165,6 +165,7 @@ WebPreferences::WebPreferences() spatial_navigation_enabled(false), caret_browsing_enabled(false), navigate_on_drag_drop(true), + base_background_color(0xFFFFFFFF), // Color::white v8_cache_options(blink::mojom::V8CacheOptions::kDefault), record_whole_document(false), cookie_enabled(true), diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h index 04c03cfcb774..4f5488ef1699 100644 --- content/public/common/web_preferences.h +++ content/public/common/web_preferences.h @@ -180,6 +180,7 @@ struct CONTENT_EXPORT WebPreferences { bool spatial_navigation_enabled; bool caret_browsing_enabled; bool navigate_on_drag_drop; + uint32_t base_background_color; blink::mojom::V8CacheOptions v8_cache_options; bool record_whole_document; diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc index bd44565e78aa..dcb7bbd6d875 100644 --- content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc @@ -968,6 +968,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, #endif WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available); + + web_view->SetBaseBackgroundColor(prefs.base_background_color); } /*static*/