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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/OverridesSupport.js

Issue 1632983002: [DevTools] Do not reset scroll when emulating device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/devtools/front_end/emulation/OverridesSupport.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/OverridesSupport.js b/third_party/WebKit/Source/devtools/front_end/emulation/OverridesSupport.js
index c3478a83ddb2935a4e45d2c476b5a3b90f71a486..32508021c72b46d89853ad190f4d0838e51de10b 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/OverridesSupport.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/OverridesSupport.js
@@ -285,7 +285,7 @@ WebInspector.OverridesSupport.prototype = {
this.settings._emulationEnabled.set(enabled);
this.dispatchEventToListeners(WebInspector.OverridesSupport.Events.EmulationStateChanged);
if (enabled && this.settings.emulateResolution.get())
- this._target.emulationAgent().resetScrollAndPageScaleFactor();
+ this._target.emulationAgent().resetPageScaleFactor();
}
},
@@ -524,9 +524,9 @@ WebInspector.OverridesSupport.prototype = {
},
/**
- * @param {boolean} resetScrollAndPageScale
+ * @param {boolean} resetPageScaleFactor
*/
- _deviceMetricsChanged: function(resetScrollAndPageScale)
+ _deviceMetricsChanged: function(resetPageScaleFactor)
{
if (!this._initialized)
return;
@@ -599,8 +599,8 @@ WebInspector.OverridesSupport.prototype = {
this.settings.emulateMobile.get(), this._pageResizer ? false : this.settings.deviceFitWindow.get(), scale, 0, 0,
screenWidth, screenHeight, positionX, positionY, apiCallback.bind(this))
var allPromises = [ setDevicePromise ];
- if (resetScrollAndPageScale)
- allPromises.push(this._target.emulationAgent().resetScrollAndPageScaleFactor());
+ if (resetPageScaleFactor)
+ allPromises.push(this._target.emulationAgent().resetPageScaleFactor());
return Promise.all(allPromises);
}

Powered by Google App Engine
This is Rietveld 408576698