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

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 2570783006: DevTools: convert a few more icons to UI.Icon. (Closed)
Patch Set: Created 4 years 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/elements/StylesSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
index e9346963cf23e26a8c54a50a64cf204dd0f306f9..dd1b2fb55df797203c82aafaa53963b59226c962 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -2109,10 +2109,30 @@ Elements.StylePropertyTreeElement = class extends TreeElement {
}
}
+ /**
+ * @override
+ */
+ onexpand() {
+ this._updateExpandElement();
+ }
+
+ /**
+ * @override
+ */
+ oncollapse() {
+ this._updateExpandElement();
+ }
+
+ _updateExpandElement() {
+ if (this.expanded)
+ this._expandElement.setIconType('smallicon-triangle-bottom');
+ else
+ this._expandElement.setIconType('smallicon-triangle-right');
+ }
+
updateTitle() {
this._updateState();
- this._expandElement = createElement('span');
- this._expandElement.className = 'expand-element';
+ this._expandElement = UI.Icon.create('smallicon-triangle-right', 'expand-icon');
var propertyRenderer =
new Elements.StylesSidebarPropertyRenderer(this._style.parentRule, this.node(), this.name, this.value);

Powered by Google App Engine
This is Rietveld 408576698