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

Unified Diff: third_party/WebKit/Source/web/DevToolsEmulator.cpp

Issue 2808123004: [devtools] Remove device emulation background color override. (Closed)
Patch Set: . Created 3 years, 8 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: third_party/WebKit/Source/web/DevToolsEmulator.cpp
diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.cpp b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
index 57fbf87f94e619474feaf05a1b5fb0bfa4b9da3d..88a143d361a791df2f8698827417c154b401e8b4 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
@@ -226,7 +226,7 @@ void DevToolsEmulator::EnableDeviceEmulation(
if (!device_metrics_enabled_) {
device_metrics_enabled_ = true;
- if (params.view_size.width || params.view_size.height)
+ if (params.override_gutter_color)
web_view_impl_->SetBackgroundColorOverride(Color::kDarkGray);
dgozman 2017/04/11 17:29:54 Let's just not override at all. DevTools currently
Eric Seckler 2017/04/12 07:38:44 Perfect! Done.
}
@@ -258,7 +258,8 @@ void DevToolsEmulator::DisableDeviceEmulation() {
GetMemoryCache()->EvictResources();
device_metrics_enabled_ = false;
- web_view_impl_->ClearBackgroundColorOverride();
+ if (emulation_params_.override_gutter_color)
+ web_view_impl_->ClearBackgroundColorOverride();
web_view_impl_->GetPage()->GetSettings().SetDeviceScaleAdjustment(
embedder_device_scale_adjustment_);
DisableMobileEmulation();

Powered by Google App Engine
This is Rietveld 408576698