Title: [101313] trunk/Source/WebCore
Revision
101313
Author
timo...@apple.com
Date
2011-11-28 18:34:05 -0800 (Mon, 28 Nov 2011)

Log Message

Use classList instead of addStyleClass and removeStyleClass in TreeOutline.

https://webkit.org/b/72803

Reviewed by Dan Bernstein.

* inspector/front-end/treeoutline.js:
(TreeOutline.prototype.appendChild):
(TreeOutline.prototype.insertChild):
(TreeElement.prototype.set hasChildren):
(TreeElement.prototype.set hidden):
(TreeElement.prototype._attach):
(TreeElement.prototype.collapse):
(TreeElement.prototype.expand):
(TreeElement.prototype.select):
(TreeElement.prototype.deselect):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (101312 => 101313)


--- trunk/Source/WebCore/ChangeLog	2011-11-29 02:17:51 UTC (rev 101312)
+++ trunk/Source/WebCore/ChangeLog	2011-11-29 02:34:05 UTC (rev 101313)
@@ -1,3 +1,22 @@
+2011-11-28  Timothy Hatcher  <timo...@apple.com>
+
+        Use classList instead of addStyleClass and removeStyleClass in TreeOutline.
+
+        https://webkit.org/b/72803
+
+        Reviewed by Dan Bernstein.
+
+        * inspector/front-end/treeoutline.js:
+        (TreeOutline.prototype.appendChild):
+        (TreeOutline.prototype.insertChild):
+        (TreeElement.prototype.set hasChildren):
+        (TreeElement.prototype.set hidden):
+        (TreeElement.prototype._attach):
+        (TreeElement.prototype.collapse):
+        (TreeElement.prototype.expand):
+        (TreeElement.prototype.select):
+        (TreeElement.prototype.deselect):
+
 2011-11-28  Leo Yang  <leo.y...@torchmobile.com.cn>
 
         Upstream platform/network/blackberry/AuthenticationChallenge.h

Modified: trunk/Source/WebCore/inspector/front-end/treeoutline.js (101312 => 101313)


--- trunk/Source/WebCore/inspector/front-end/treeoutline.js	2011-11-29 02:17:51 UTC (rev 101312)
+++ trunk/Source/WebCore/inspector/front-end/treeoutline.js	2011-11-29 02:34:05 UTC (rev 101313)
@@ -86,9 +86,9 @@
     if (!this._childrenListNode) {
         this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
         this._childrenListNode.parentTreeElement = this;
-        this._childrenListNode.addStyleClass("children");
+        this._childrenListNode.classList.add("children");
         if (this.hidden)
-            this._childrenListNode.addStyleClass("hidden");
+            this._childrenListNode.classList.add("hidden");
     }
 
     child._attach();
@@ -134,9 +134,9 @@
     if (!this._childrenListNode) {
         this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
         this._childrenListNode.parentTreeElement = this;
-        this._childrenListNode.addStyleClass("children");
+        this._childrenListNode.classList.add("children");
         if (this.hidden)
-            this._childrenListNode.addStyleClass("hidden");
+            this._childrenListNode.classList.add("hidden");
     }
 
     child._attach();
@@ -533,9 +533,9 @@
             return;
 
         if (x)
-            this._listItemNode.addStyleClass("parent");
+            this._listItemNode.classList.add("parent");
         else {
-            this._listItemNode.removeStyleClass("parent");
+            this._listItemNode.classList.remove("parent");
             this.collapse();
         }
     },
@@ -552,14 +552,14 @@
 
         if (x) {
             if (this._listItemNode)
-                this._listItemNode.addStyleClass("hidden");
+                this._listItemNode.classList.add("hidden");
             if (this._childrenListNode)
-                this._childrenListNode.addStyleClass("hidden");
+                this._childrenListNode.classList.add("hidden");
         } else {
             if (this._listItemNode)
-                this._listItemNode.removeStyleClass("hidden");
+                this._listItemNode.classList.remove("hidden");
             if (this._childrenListNode)
-                this._childrenListNode.removeStyleClass("hidden");
+                this._childrenListNode.classList.remove("hidden");
         }
     },
 
@@ -612,13 +612,13 @@
         this._listItemNode.title = this._tooltip ? this._tooltip : "";
 
         if (this.hidden)
-            this._listItemNode.addStyleClass("hidden");
+            this._listItemNode.classList.add("hidden");
         if (this.hasChildren)
-            this._listItemNode.addStyleClass("parent");
+            this._listItemNode.classList.add("parent");
         if (this.expanded)
-            this._listItemNode.addStyleClass("expanded");
+            this._listItemNode.classList.add("expanded");
         if (this.selected)
-            this._listItemNode.addStyleClass("selected");
+            this._listItemNode.classList.add("selected");
 
         this._listItemNode.addEventListener("mousedown", TreeElement.treeElementMouseDown, false);
         this._listItemNode.addEventListener("click", TreeElement.treeElementToggled, false);
@@ -700,9 +700,9 @@
 TreeElement.prototype.collapse = function()
 {
     if (this._listItemNode)
-        this._listItemNode.removeStyleClass("expanded");
+        this._listItemNode.classList.remove("expanded");
     if (this._childrenListNode)
-        this._childrenListNode.removeStyleClass("expanded");
+        this._childrenListNode.classList.remove("expanded");
 
     this.expanded = false;
     if (this.treeOutline)
@@ -733,10 +733,10 @@
 
         this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
         this._childrenListNode.parentTreeElement = this;
-        this._childrenListNode.addStyleClass("children");
+        this._childrenListNode.classList.add("children");
 
         if (this.hidden)
-            this._childrenListNode.addStyleClass("hidden");
+            this._childrenListNode.classList.add("hidden");
 
         this.onpopulate();
 
@@ -747,13 +747,13 @@
     }
 
     if (this._listItemNode) {
-        this._listItemNode.addStyleClass("expanded");
+        this._listItemNode.classList.add("expanded");
         if (this._childrenListNode && this._childrenListNode.parentNode != this._listItemNode.parentNode)
             this.parent._childrenListNode.insertBefore(this._childrenListNode, this._listItemNode.nextSibling);
     }
 
     if (this._childrenListNode)
-        this._childrenListNode.addStyleClass("expanded");
+        this._childrenListNode.classList.add("expanded");
 
     this.expanded = true;
     if (this.treeOutline)
@@ -849,7 +849,7 @@
         return;
     this.treeOutline.selectedTreeElement = this;
     if (this._listItemNode)
-        this._listItemNode.addStyleClass("selected");
+        this._listItemNode.classList.add("selected");
 
     if (this.onselect)
         this.onselect(this, selectedByUser);
@@ -875,7 +875,7 @@
     this.selected = false;
     this.treeOutline.selectedTreeElement = null;
     if (this._listItemNode)
-        this._listItemNode.removeStyleClass("selected");
+        this._listItemNode.classList.remove("selected");
 
     if (this.ondeselect && !supressOnDeselect)
         this.ondeselect(this);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to