Fixes a bug where the className would be reset for Resource
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 May 2008 21:25:43 +0000 (21:25 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 May 2008 21:25:43 +0000 (21:25 +0000)
commit5d002afde7bd9733d8ab236f3c127b18bd7b3294
treee9c1de815dde39141570441c1bd8f831509841c8
parent6ffffc51062c5934afb16c1b99fdfb65c311d280
Fixes a bug where the className would be reset for Resource
tree elements and the selected state would be lost. This could
happen when sorting the resources.

https://bugs.webkit.org/show_bug.cgi?id=19211

Reviewed by Adam Roben.

* page/inspector/ResourcesPanel.js:
(WebInspector.ResourceSidebarTreeElement.prototype.refresh): Call
removeMatchingStyleClasses to remove previous category classes instead
of setting the whole className directly.
* page/inspector/utilities.js:
(Element.prototype.removeStyleClass): Moved code to
removeMatchingStyleClasses and call removeMatchingStyleClasses.
(Element.prototype.removeMatchingStyleClasses): Added. Code moved from
removeStyleClass and don't escape the string.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/page/inspector/ResourcesPanel.js
WebCore/page/inspector/utilities.js