Chromium Code Reviews| 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 f6e0f5b1441ef83c7a808a1380ab6f6aaadc6594..f8123d63d14bb9bace2e1bc42e2586163885d810 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/ui/Geometry.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/Geometry.js |
| @@ -346,6 +346,16 @@ UI.Size = class { |
| this.width = width; |
| this.height = height; |
| } |
| + |
| + /** |
| + * @param {?UI.Size} size |
| + */ |
| + sizeToMin(size) { |
|
caseq
2017/01/31 21:27:20
clip() or clipTo()?
dgozman
2017/01/31 23:39:49
Done.
|
| + if (!size) |
| + return; |
| + this.width = Math.min(this.width, size.width); |
| + this.height = Math.min(this.height, size.height); |
| + } |
| }; |
| /** |