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

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

Issue 2808123004: [devtools] Remove device emulation background color override. (Closed)
Patch Set: fix android tests 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 7f771b55bca0c3916221ffa036c4cdbd7c12081b..4b82e5a90ba40a4b65c75fb851faa16138948f8f 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
@@ -223,12 +223,7 @@ void DevToolsEmulator::EnableDeviceEmulation(
GetMemoryCache()->EvictResources();
emulation_params_ = params;
-
- if (!device_metrics_enabled_) {
- device_metrics_enabled_ = true;
- if (params.view_size.width || params.view_size.height)
- web_view_impl_->SetBackgroundColorOverride(Color::kDarkGray);
dgozman 2017/04/12 18:21:23 Remove these methods from WebViewImpl as well?
Eric Seckler 2017/04/12 19:31:31 After my recent refactorings of transparency overr
- }
+ device_metrics_enabled_ = true;
web_view_impl_->GetPage()->GetSettings().SetDeviceScaleAdjustment(
calculateDeviceScaleAdjustment(params.view_size.width,
@@ -258,7 +253,6 @@ void DevToolsEmulator::DisableDeviceEmulation() {
GetMemoryCache()->EvictResources();
device_metrics_enabled_ = false;
- web_view_impl_->ClearBackgroundColorOverride();
web_view_impl_->GetPage()->GetSettings().SetDeviceScaleAdjustment(
embedder_device_scale_adjustment_);
DisableMobileEmulation();

Powered by Google App Engine
This is Rietveld 408576698