| Index: third_party/WebKit/Source/devtools/front_end/ui/Geometry.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Geometry.js b/third_party/WebKit/Source/devtools/front_end/ui/Geometry.js
|
| index d4e94f9470f378f0e38eed181e17919182f190c2..b66d2b85676fce8804d101501d68a46cc4104121 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/ui/Geometry.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/Geometry.js
|
| @@ -356,6 +356,14 @@ UI.Size = class {
|
| return this;
|
| return new UI.Size(Math.min(this.width, size.width), Math.min(this.height, size.height));
|
| }
|
| +
|
| + /**
|
| + * @param {number} scale
|
| + * @return {!UI.Size}
|
| + */
|
| + scale(scale) {
|
| + return new UI.Size(this.width * scale, this.height * scale);
|
| + }
|
| };
|
|
|
| /**
|
| @@ -465,6 +473,22 @@ UI.Rect = class {
|
| size() {
|
| return new UI.Size(this.width, this.height);
|
| }
|
| +
|
| + /**
|
| + * @param {!UI.Rect} origin
|
| + * @return {!UI.Rect}
|
| + */
|
| + relativeTo(origin) {
|
| + return new UI.Rect(this.left - origin.left, this.top - origin.top, this.width, this.height);
|
| + }
|
| +
|
| + /**
|
| + * @param {!UI.Rect} origin
|
| + * @return {!UI.Rect}
|
| + */
|
| + rebaseTo(origin) {
|
| + return new UI.Rect(this.left + origin.left, this.top + origin.top, this.width, this.height);
|
| + }
|
| };
|
|
|
| /**
|
|
|