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

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

Issue 731093002: DevTools: Use View.registerRequiredCSS() in View-based web components (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/FlameChart.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/View.js
diff --git a/Source/devtools/front_end/ui/View.js b/Source/devtools/front_end/ui/View.js
index 9439d8ff1ffa7ed6bc585088f57c3c0e77bef7f4..3017be2f25b7ee4d6bd3199e169271530e583058 100644
--- a/Source/devtools/front_end/ui/View.js
+++ b/Source/devtools/front_end/ui/View.js
@@ -40,6 +40,7 @@ WebInspector.View = function(isWebComponent)
} else {
this.element = this.contentElement;
}
+ this._isWebComponent = isWebComponent;
this.element.__view = this;
this._visible = true;
this._isRoot = false;
@@ -362,9 +363,12 @@ WebInspector.View.prototype = {
this.doResize();
},
+ /**
+ * @param {string} cssFile
+ */
registerRequiredCSS: function(cssFile)
{
- this.element.appendChild(WebInspector.View.createStyleElement(cssFile));
+ (this._isWebComponent ? this._shadowRoot : this.element).appendChild(WebInspector.View.createStyleElement(cssFile));
},
printViewHierarchy: function()
« no previous file with comments | « Source/devtools/front_end/ui/FlameChart.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698