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

Unified Diff: Source/devtools/front_end/emulation/ResponsiveDesignView.js

Issue 1195793008: [DevTools] Implement screen orientation override. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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: Source/devtools/front_end/emulation/ResponsiveDesignView.js
diff --git a/Source/devtools/front_end/emulation/ResponsiveDesignView.js b/Source/devtools/front_end/emulation/ResponsiveDesignView.js
index cb2f06beb60e676720cf5fbb454bc3f2c39ea46d..9b87f46fb28002efbcc6994537fcc597b65ae774 100644
--- a/Source/devtools/front_end/emulation/ResponsiveDesignView.js
+++ b/Source/devtools/front_end/emulation/ResponsiveDesignView.js
@@ -735,8 +735,10 @@ WebInspector.ResponsiveDesignView.prototype = {
if (device && mode) {
var orientation = device.orientationByName(mode.orientation);
this._deviceInsets = new Insets(mode.pageRect.left, mode.pageRect.top, orientation.width - mode.pageRect.left - mode.pageRect.width, orientation.height - mode.pageRect.top - mode.pageRect.height);
+ WebInspector.overridesSupport.settings.screenOrientationOverride.set(mode.orientation == WebInspector.EmulatedDevice.Horizontal ? "landscapePrimary" : "portraitPrimary");
} else {
this._deviceInsets = new Insets(0, 0, 0, 0);
+ WebInspector.overridesSupport.settings.screenOrientationOverride.set("");
}
this.dispatchEventToListeners(WebInspector.OverridesSupport.PageResizer.Events.InsetsChanged, this._deviceInsets);
},

Powered by Google App Engine
This is Rietveld 408576698