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

Unified Diff: third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPopoverHelper.js

Issue 2712063002: [DevTools] Migrate Popover to GlassPane (Closed)
Patch Set: nit Created 3 years, 9 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/object_ui/ObjectPopoverHelper.js
diff --git a/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPopoverHelper.js b/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPopoverHelper.js
index 47757aaaefc6705bec70be3059c33b1f47b86f8e..2eca56f020d5871f5b7d1f140c2cb502a355a02e 100644
--- a/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPopoverHelper.js
+++ b/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPopoverHelper.js
@@ -149,18 +149,18 @@ ObjectUI.ObjectPopoverHelper = class extends UI.PopoverHelper {
customPreviewComponent.expandIfPossible();
popoverContentElement = customPreviewComponent.element;
} else {
- popoverContentElement = createElement('div');
+ popoverContentElement = createElementWithClass('div', 'object-popover-content');
UI.appendStyle(popoverContentElement, 'object_ui/objectPopover.css');
- this._titleElement = popoverContentElement.createChild('div', 'monospace object-popover-title');
- this._titleElement.createChild('span').textContent = description;
+ var titleElement = popoverContentElement.createChild('div', 'monospace object-popover-title');
+ titleElement.createChild('span').textContent = description;
var section = new ObjectUI.ObjectPropertiesSection(result, '', this._lazyLinkifier());
section.element.classList.add('object-popover-tree');
section.titleLessMode();
popoverContentElement.appendChild(section.element);
}
- var popoverWidth = 300;
- var popoverHeight = 250;
- popover.showForAnchor(popoverContentElement, anchorElement, popoverWidth, popoverHeight);
+ popover.setMaxContentSize(new UI.Size(300, 250));
+ popover.setSizeBehavior(UI.GlassPane.SizeBehavior.SetMaxSize);
+ popover.showForAnchor(popoverContentElement, anchorElement);
}
}
this._disposed = false;

Powered by Google App Engine
This is Rietveld 408576698