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

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

Issue 2272193002: [DevTools] Extract small-bubble component. (Closed)
Patch Set: Created 4 years, 4 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/UIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
index 86f9ab857020a1087ab8763a849465b34a8a33c3..4727bfb6c55fb0dece15360f2554258fcc24e6e6 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
@@ -1535,6 +1535,30 @@ WebInspector.appendStyle = function(node, cssFile)
__proto__: HTMLLabelElement.prototype
});
+ registerCustomElement("label", "dt-small-bubble", {
+ /**
+ * @this {Element}
+ */
+ createdCallback: function()
+ {
+ var root = WebInspector.createShadowRootWithCoreStyles(this, "ui/smallBubble.css");
+ this._textElement = root.createChild("div");
+ this._textElement.className = "info";
+ this._textElement.createChild("content");
+ },
+
+ /**
+ * @param {string} type
+ * @this {Element}
+ */
+ set type(type)
+ {
+ this._textElement.className = type;
+ },
+
+ __proto__: HTMLLabelElement.prototype
+ });
+
registerCustomElement("div", "dt-close-button", {
/**
* @this {Element}

Powered by Google App Engine
This is Rietveld 408576698