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

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

Issue 671463002: DevTools: make flame chart a web component. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test fixed 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
« no previous file with comments | « Source/devtools/front_end/ui/Popover.js ('k') | Source/devtools/front_end/ui/View.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/UIUtils.js
diff --git a/Source/devtools/front_end/ui/UIUtils.js b/Source/devtools/front_end/ui/UIUtils.js
index 186c55e628b4a507ac443b2cba3f734259ee340c..0730e8cc62146c6ea5a42cba7e7efe12aa53bb5f 100644
--- a/Source/devtools/front_end/ui/UIUtils.js
+++ b/Source/devtools/front_end/ui/UIUtils.js
@@ -593,17 +593,24 @@ WebInspector.manageBlackboxingButtonLabel = function()
}
/**
- * @param {!Document} document
+ * @param {!Element} element
+ * @return {boolean}
+ */
+WebInspector.installComponentRootStyles = function(element)
+{
+ var wasInstalled = element.classList.contains("component-root");
+ if (wasInstalled)
+ return false;
+ element.classList.add("component-root", "platform-" + WebInspector.platform());
+ return true;
+}
+
+/**
+ * @param {!Element} element
*/
-WebInspector.installPortStyles = function(document)
+WebInspector.uninstallComponentRootStyles = function(element)
{
- var platform = WebInspector.platform();
- document.body.classList.add("platform-" + platform);
- var flavor = WebInspector.platformFlavor();
- if (flavor)
- document.body.classList.add("platform-" + flavor);
- var port = WebInspector.port();
- document.body.classList.add("port-" + port);
+ var wasInstalled = element.classList.remove("component-root", "platform-" + WebInspector.platform());
}
/**
« no previous file with comments | « Source/devtools/front_end/ui/Popover.js ('k') | Source/devtools/front_end/ui/View.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698