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

Unified Diff: Source/devtools/front_end/TimelineView.js

Issue 182113004: DevTools: Get rid of Element.prototype.enableStyleClass (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 6 years, 10 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/TimelinePanel.js ('k') | Source/devtools/front_end/UISourceCodeFrame.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/TimelineView.js
diff --git a/Source/devtools/front_end/TimelineView.js b/Source/devtools/front_end/TimelineView.js
index 739d7899b333c29d01503db5ca3df34f347e7c12..627ff4acca46388bc647f184f110d027bbcfd53b 100644
--- a/Source/devtools/front_end/TimelineView.js
+++ b/Source/devtools/front_end/TimelineView.js
@@ -1032,8 +1032,8 @@ WebInspector.TimelineRecordListRow.prototype = {
if (this._dataElement.firstChild)
this._dataElement.removeChildren();
- this._warningElement.enableStyleClass("hidden", !presentationRecord.hasWarnings() && !presentationRecord.childHasWarnings());
- this._warningElement.enableStyleClass("timeline-tree-item-child-warning", presentationRecord.childHasWarnings() && !presentationRecord.hasWarnings());
+ this._warningElement.classList.toggle("hidden", !presentationRecord.hasWarnings() && !presentationRecord.childHasWarnings());
+ this._warningElement.classList.toggle("timeline-tree-item-child-warning", presentationRecord.childHasWarnings() && !presentationRecord.hasWarnings());
if (presentationRecord.coalesced()) {
this._dataElement.createTextChild(WebInspector.UIString("× %d", presentationRecord.presentationChildren().length));
@@ -1046,8 +1046,8 @@ WebInspector.TimelineRecordListRow.prototype = {
}
}
- this._expandArrowElement.enableStyleClass("parent", presentationRecord.hasPresentationChildren());
- this._expandArrowElement.enableStyleClass("expanded", !!presentationRecord.visibleChildrenCount());
+ this._expandArrowElement.classList.toggle("parent", presentationRecord.hasPresentationChildren());
+ this._expandArrowElement.classList.toggle("expanded", !!presentationRecord.visibleChildrenCount());
this._record.setListRow(this);
},
@@ -1086,7 +1086,7 @@ WebInspector.TimelineRecordListRow.prototype = {
*/
renderAsSelected: function(selected)
{
- this.element.enableStyleClass("selected", selected);
+ this.element.classList.toggle("selected", selected);
},
/**
@@ -1190,7 +1190,7 @@ WebInspector.TimelineRecordGraphRow.prototype = {
*/
renderAsSelected: function(selected)
{
- this.element.enableStyleClass("selected", selected);
+ this.element.classList.toggle("selected", selected);
},
_expand: function()
« no previous file with comments | « Source/devtools/front_end/TimelinePanel.js ('k') | Source/devtools/front_end/UISourceCodeFrame.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698