Reviewed by Sam Weinig.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 Nov 2007 00:49:55 +0000 (00:49 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 Nov 2007 00:49:55 +0000 (00:49 +0000)
        * page/inspector/StylesSidebarPane.js: Fix the wording of a comment
          and switch over to use getUniqueProperties in another place.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27677 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/page/inspector/StylesSidebarPane.js

index bddeecaf74e7c74b28bc705971b7fe822f9be54f..2df4300cd541d90702fbbd22401b11b9565b9ee9 100644 (file)
@@ -1,3 +1,10 @@
+2007-11-10  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        * page/inspector/StylesSidebarPane.js: Fix the wording of a comment
+          and switch over to use getUniqueProperties in another place.
+
 2007-11-10  John Sullivan  <sullivan@apple.com>
 
         Reviewed by Sam Weinig
 2007-11-10  John Sullivan  <sullivan@apple.com>
 
         Reviewed by Sam Weinig
index 1896da6baa581356c10dda22d78dea1863a6ff59..8e206771031e0a33942be36a0b96d67e28a81d27 100644 (file)
@@ -119,7 +119,7 @@ WebInspector.StylesSidebarPane.prototype = {
                 if (!priorityUsed && style.getPropertyPriority(name).length)
                     priorityUsed = true;
 
                 if (!priorityUsed && style.getPropertyPriority(name).length)
                     priorityUsed = true;
 
-                // If the property name is already used by another rule this is rule's
+                // If the property name is already used by another rule then this rule's
                 // property is overloaded, so don't add it to the rule's usedProperties.
                 if (!(name in usedProperties))
                     styleRule.usedProperties[name] = true;
                 // property is overloaded, so don't add it to the rule's usedProperties.
                 if (!(name in usedProperties))
                     styleRule.usedProperties[name] = true;
@@ -152,17 +152,10 @@ WebInspector.StylesSidebarPane.prototype = {
                 if (styleRules[i].computedStyle)
                     continue;
 
                 if (styleRules[i].computedStyle)
                     continue;
 
-                var foundProperties = {};
                 var style = styleRules[i].style;
                 var style = styleRules[i].style;
-                for (var j = 0; j < style.length; ++j) {
-                    var name = style[j];
-
-                    // Skip duplicate properties in the same rule.
-                    if (name in foundProperties)
-                        continue;
-
-                    foundProperties[name] = true;
-
+                var uniqueProperties = style.getUniqueProperties();
+                for (var j = 0; j < uniqueProperties.length; ++j) {
+                    var name = uniqueProperties[j];
                     if (style.getPropertyPriority(name).length) {
                         if (!(name in foundPriorityProperties))
                             styleRules[i].usedProperties[name] = true;
                     if (style.getPropertyPriority(name).length) {
                         if (!(name in foundPriorityProperties))
                             styleRules[i].usedProperties[name] = true;