Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/ui/Dialog.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Dialog.js b/third_party/WebKit/Source/devtools/front_end/ui/Dialog.js |
| index 43150d5b6fd24a0a179a89bc157784a2a422fb07..e311074e60f980a9372881dea1d4d2e298ee0bdf 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/ui/Dialog.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/Dialog.js |
| @@ -46,6 +46,7 @@ UI.Dialog = class extends UI.Widget { |
| this._dimmed = false; |
| /** @type {!Map<!HTMLElement, number>} */ |
| this._tabIndexMap = new Map(); |
| + this._fixedHeight = true; |
|
dgozman
2016/12/27 19:36:48
Let's instead position based on maxHeight (if pres
einbinder
2017/01/09 23:19:17
Done.
|
| } |
| /** |
| @@ -151,6 +152,13 @@ UI.Dialog = class extends UI.Widget { |
| this._dimmed = dimmed; |
| } |
| + /** |
| + * @param {boolean} fixedHeight |
| + */ |
| + setFixedHeight(fixedHeight) { |
| + this._fixedHeight = fixedHeight; |
| + } |
| + |
| contentResized() { |
| if (this._wrapsContent) |
| this._position(); |
| @@ -227,7 +235,10 @@ UI.Dialog = class extends UI.Widget { |
| } |
| this.element.style.width = width + 'px'; |
| - this.element.style.height = height + 'px'; |
| + if (this._fixedHeight) |
| + this.element.style.height = height + 'px'; |
| + else |
| + this.element.style.maxHeight = height + 'px'; |
| this.element.positionAt(positionX, positionY, container); |
| } |