From: timothy@apple.com Date: Sun, 11 Nov 2007 00:49:55 +0000 (+0000) Subject: Reviewed by Sam Weinig. X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=4e989679a70eb9e5bd4d114bbada8a8e788dd988;hp=6d2f4b3c36cafb2f1aa7ba9a6f0e34ab52ec0209;ds=inline Reviewed by Sam Weinig. * 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 --- diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index bddeecaf74e7..2df4300cd541 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,10 @@ +2007-11-10 Timothy Hatcher + + 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 Reviewed by Sam Weinig diff --git a/WebCore/page/inspector/StylesSidebarPane.js b/WebCore/page/inspector/StylesSidebarPane.js index 1896da6baa58..8e206771031e 100644 --- a/WebCore/page/inspector/StylesSidebarPane.js +++ b/WebCore/page/inspector/StylesSidebarPane.js @@ -119,7 +119,7 @@ WebInspector.StylesSidebarPane.prototype = { 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; @@ -152,17 +152,10 @@ WebInspector.StylesSidebarPane.prototype = { if (styleRules[i].computedStyle) continue; - var foundProperties = {}; 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;