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

Unified Diff: Source/devtools/front_end/common/Geometry.js

Issue 1178643004: [DevTools] Initial implementation of device modes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Turn into class 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
« no previous file with comments | « no previous file | Source/devtools/front_end/emulated_devices/module.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/common/Geometry.js
diff --git a/Source/devtools/front_end/common/Geometry.js b/Source/devtools/front_end/common/Geometry.js
index fd814a9750da1679b688af6908d042330199d6e0..c548134a023bfa3d7b260324aed54300df01cc24 100644
--- a/Source/devtools/front_end/common/Geometry.js
+++ b/Source/devtools/front_end/common/Geometry.js
@@ -364,6 +364,33 @@ Size.prototype.addHeight = function(size)
/**
* @constructor
+ * @param {number} left
+ * @param {number} top
+ * @param {number} right
+ * @param {number} bottom
+ */
+function Insets(left, top, right, bottom)
+{
+ this.left = left;
+ this.top = top;
+ this.right = right;
+ this.bottom = bottom;
+}
+
+Insets.prototype = {
+ /**
+ * @param {?Insets} insets
+ * @return {boolean}
+ */
+ isEqual: function(insets)
+ {
+ return !!insets && this.left === insets.left && this.top === insets.top && this.right == insets.right && this.bottom == insets.bottom;
+ }
+}
+
+
+/**
+ * @constructor
* @param {!Size=} minimum
* @param {?Size=} preferred
*/
« no previous file with comments | « no previous file | Source/devtools/front_end/emulated_devices/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698