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

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: 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/UIUtils.js
diff --git a/Source/devtools/front_end/ui/UIUtils.js b/Source/devtools/front_end/ui/UIUtils.js
index 7cad9bb9a171c9362c7611aa9f8dc75774343cd0..deedaf6ffedad08e8b832ef96faa08d0943e446d 100644
--- a/Source/devtools/front_end/ui/UIUtils.js
+++ b/Source/devtools/front_end/ui/UIUtils.js
@@ -567,15 +567,25 @@ WebInspector.manageBlackboxingButtonLabel = function()
return WebInspector.UIString("Manage framework blackboxing...");
}
-WebInspector.installPortStyles = function()
+/**
+ * @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.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());
}
WebInspector._windowFocused = function(event)

Powered by Google App Engine
This is Rietveld 408576698