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

Unified Diff: Source/devtools/front_end/sdk/OverridesSupport.js

Issue 391753002: Revert of [DevTools] Device mode: reset page scale when enabling and improve UI. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | Source/devtools/front_end/toolbox/ResponsiveDesignView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/OverridesSupport.js
diff --git a/Source/devtools/front_end/sdk/OverridesSupport.js b/Source/devtools/front_end/sdk/OverridesSupport.js
index e10dff858a01eabd742115add99d69c45c4459a0..4557ca73e8d54025f1479905ad42a900d6006d7a 100644
--- a/Source/devtools/front_end/sdk/OverridesSupport.js
+++ b/Source/devtools/front_end/sdk/OverridesSupport.js
@@ -276,8 +276,6 @@
if (this.canEmulate()) {
this.settings._emulationEnabled.set(enabled);
this.dispatchEventToListeners(WebInspector.OverridesSupport.Events.EmulationStateChanged);
- if (enabled && this.settings.emulateResolution.get())
- this._target.pageAgent().resetScrollAndPageScaleFactor();
}
},
@@ -334,7 +332,7 @@
if (this._initialized) {
this._deviceMetricsChanged();
this._userAgentChanged();
- this._target.pageAgent().resetScrollAndPageScaleFactor();
+ PageAgent.resetScrollAndPageScaleFactor();
}
},
@@ -466,8 +464,6 @@
this._cssMediaChanged();
this._deviceMetricsChanged();
- if (this.settings.emulateResolution.get())
- this._target.pageAgent().resetScrollAndPageScaleFactor();
this._userAgentChanged();
@@ -576,7 +572,7 @@
*/
function setDeviceMetricsOverride(finishCallback)
{
- this._target.pageAgent().setDeviceMetricsOverride(
+ PageAgent.setDeviceMetricsOverride(
overrideWidth, overrideHeight, this.settings.emulateResolution.get() ? this.settings.deviceScaleFactor.get() : 0,
this.settings.emulateMobile.get(), this._pageResizer ? false : this.settings.deviceFitWindow.get(), scale, 0, 0,
apiCallback.bind(this, finishCallback));
@@ -588,7 +584,7 @@
*/
function clearDeviceMetricsOverride(finishCallback)
{
- this._target.pageAgent().clearDeviceMetricsOverride(apiCallback.bind(this, finishCallback));
+ PageAgent.clearDeviceMetricsOverride(apiCallback.bind(this, finishCallback));
}
/**
« no previous file with comments | « no previous file | Source/devtools/front_end/toolbox/ResponsiveDesignView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698