Bug 56096 - Web Inspector: Get rid of has/add/removeStyleClass() methods on Element.prototype - Step 1
Summary: Web Inspector: Get rid of has/add/removeStyleClass() methods on Element.proto...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 06:08 PST by Alexander Pavlov (apavlov)
Modified: 2011-03-11 01:08 PST (History)
10 users (show)

See Also:


Attachments
[PATCH] Suggested solution (5.11 KB, patch)
2011-03-10 06:47 PST, Alexander Pavlov (apavlov)
yurys: review-
Details | Formatted Diff | Diff
[PATCH] Comments addressed (14.97 KB, patch)
2011-03-10 09:19 PST, Alexander Pavlov (apavlov)
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pavlov (apavlov) 2011-03-10 06:08:46 PST
According to the scheme in bug 55758, this step makes use of element.classList methods in utilities.js and narrows down the class addition to single classes per element.addStyleClass() invocation
Comment 1 Alexander Pavlov (apavlov) 2011-03-10 06:47:30 PST
Created attachment 85317 [details]
[PATCH] Suggested solution
Comment 2 Yury Semikhatsky 2011-03-10 07:32:22 PST
Comment on attachment 85317 [details]
[PATCH] Suggested solution

View in context: https://bugs.webkit.org/attachment.cgi?id=85317&action=review

Looks like there are several places to fix:

$ grep \.addStyleClass\(\"[^\"]\\+\ [^\"]\\+\" Source/WebCore/inspector/front-end/*
Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js:    this.categoriesElement.addStyleClass("properties-tree event-listener-breakpoints");
Source/WebCore/inspector/front-end/DetailedHeapshotView.js:    retainmentView.element.addStyleClass("view retaining-paths-view");
Source/WebCore/inspector/front-end/ResourcesPanel.js:    this.sidebarElement.addStyleClass("outline-disclosure filter-all children small");

> Source/WebCore/inspector/front-end/ResourcesPanel.js:789
> +            var classes = this._iconClass.split(" ");

I'd rather fix callers.

> Source/WebCore/inspector/front-end/SidebarTreeElement.js:183
> +            var classNames = this.className.split(" ");

I'd rather fix callers.
Comment 3 Alexander Pavlov (apavlov) 2011-03-10 09:19:46 PST
Created attachment 85340 [details]
[PATCH] Comments addressed
Comment 4 Alexander Pavlov (apavlov) 2011-03-11 01:08:00 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
        M       Source/WebCore/ChangeLog
        M       Source/WebCore/inspector/front-end/BreakpointsSidebarPane.js
        M       Source/WebCore/inspector/front-end/DetailedHeapshotView.js
        M       Source/WebCore/inspector/front-end/ResourcesPanel.js
        M       Source/WebCore/inspector/front-end/utilities.js
Committed r80831