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

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: 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/common/Geometry.js
diff --git a/Source/devtools/front_end/common/Geometry.js b/Source/devtools/front_end/common/Geometry.js
index fd814a9750da1679b688af6908d042330199d6e0..b900fad4ccddaeaf572966d0e7487da401dd0da5 100644
--- a/Source/devtools/front_end/common/Geometry.js
+++ b/Source/devtools/front_end/common/Geometry.js
@@ -364,6 +364,31 @@ 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;
+}
+
+/**
+ * @param {?Insets} insets
+ * @return {boolean}
+ */
+Insets.prototype.isEqual = function(insets)
pfeldman 2015/06/13 06:48:59 Please follow prototype definition code style.
dgozman 2015/06/16 15:09:30 Done.
+{
+ 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
*/

Powered by Google App Engine
This is Rietveld 408576698