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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/Geometry.js

Issue 2658383002: [DevTools] Make UI.GlassPane position contentElement for different overlay controls. (Closed)
Patch Set: less layouts Created 3 years, 11 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: 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);
+ }
};
/**

Powered by Google App Engine
This is Rietveld 408576698