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

Unified Diff: Source/devtools/front_end/ui/Popover.js

Issue 671463002: DevTools: make flame chart a web component. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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: Source/devtools/front_end/ui/Popover.js
diff --git a/Source/devtools/front_end/ui/Popover.js b/Source/devtools/front_end/ui/Popover.js
index d2d429768355e3312460bebc150a789e9a9b3124..3e5270e81cace11c5d9264061a940d42ee4e98c5 100644
--- a/Source/devtools/front_end/ui/Popover.js
+++ b/Source/devtools/front_end/ui/Popover.js
@@ -38,6 +38,7 @@ WebInspector.Popover = function(popoverHelper)
WebInspector.View.call(this);
this.markAsRoot();
this.element.className = WebInspector.Popover._classNamePrefix; // Override
+ WebInspector.installComponentRootStyles(this.element);
this._containerElement = createElementWithClass("div", "fill popover-container");
this._popupArrowElement = this.element.createChild("div", "arrow");
@@ -47,7 +48,7 @@ WebInspector.Popover = function(popoverHelper)
this._hideBound = this.hide.bind(this);
}
-WebInspector.Popover._classNamePrefix = "popover component-root custom-popup-vertical-scroll custom-popup-horizontal-scroll";
+WebInspector.Popover._classNamePrefix = "popover custom-popup-vertical-scroll custom-popup-horizontal-scroll";
WebInspector.Popover.prototype = {
/**
@@ -85,7 +86,7 @@ WebInspector.Popover.prototype = {
{
if (this._disposed)
return;
- this.contentElement = contentElement;
+ this._contentElement = contentElement;
// This should not happen, but we hide previous popup to be on the safe side.
if (WebInspector.Popover._popover)
@@ -93,7 +94,7 @@ WebInspector.Popover.prototype = {
WebInspector.Popover._popover = this;
// Temporarily attach in order to measure preferred dimensions.
- var preferredSize = view ? view.measurePreferredSize() : this.contentElement.measurePreferredSize();
+ var preferredSize = view ? view.measurePreferredSize() : this._contentElement.measurePreferredSize();
preferredWidth = preferredWidth || preferredSize.width;
preferredHeight = preferredHeight || preferredSize.height;
@@ -104,7 +105,7 @@ WebInspector.Popover.prototype = {
if (view)
view.show(this._contentDiv);
else
- this._contentDiv.appendChild(this.contentElement);
+ this._contentDiv.appendChild(this._contentElement);
this._positionElement(anchor, preferredWidth, preferredHeight, arrowDirection);
@@ -221,6 +222,7 @@ WebInspector.Popover.prototype = {
}
this.element.className = WebInspector.Popover._classNamePrefix + " " + verticalAlignment + "-" + horizontalAlignment + "-arrow";
+ WebInspector.installComponentRootStyles(this.element);
this.element.positionAt(newElementPosition.x - borderWidth, newElementPosition.y - borderWidth, container);
this.element.style.width = newElementPosition.width + borderWidth * 2 + "px";
this.element.style.height = newElementPosition.height + borderWidth * 2 + "px";

Powered by Google App Engine
This is Rietveld 408576698