Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1570)

Unified Diff: content/renderer/render_view_impl.cc

Issue 2226733003: Color: Clean up color profile handling for layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master2
Patch Set: Fix windows Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 48ae4541de43d3642a33f5251101a42c19c58fc0..aaf02fa149a24eee51e18465063bd3c5316a697d 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -720,7 +720,13 @@ void RenderViewImpl::Initialize(const ViewMsg_New_Params& params,
command_line.HasSwitch(switches::kRootLayerScrolls));
webview()->setShowFPSCounter(
command_line.HasSwitch(cc::switches::kShowFPSCounter));
- webview()->setDeviceColorProfile(params.image_decode_color_space.GetData());
+
+ if (auto overridden_color_profile =
+ GetContentClient()->renderer()->GetImageDecodeColorProfile()) {
+ webview()->setDeviceColorProfile(overridden_color_profile->GetData());
+ } else {
+ webview()->setDeviceColorProfile(params.image_decode_color_space.GetData());
+ }
ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_);

Powered by Google App Engine
This is Rietveld 408576698