Bug 80258 - Web Inspector: Incorrect appropriateSelectorFor() suggestion for when a DOMNode has more than 2 CSS classes
Summary: Web Inspector: Incorrect appropriateSelectorFor() suggestion for when a DOMNo...
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: 2012-03-05 03:13 PST by Alexander Pavlov (apavlov)
Modified: 2012-03-05 17:38 PST (History)
10 users (show)

See Also:


Attachments
Patch (1.41 KB, patch)
2012-03-05 03:31 PST, Alexander Pavlov (apavlov)
pfeldman: 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) 2012-03-05 03:13:18 PST
Upstreaming http://code.google.com/p/chromium/issues/detail?id=116229 (second issue).

Patch to follow.
Comment 1 Alexander Pavlov (apavlov) 2012-03-05 03:31:53 PST
Created attachment 130088 [details]
Patch
Comment 2 Alexander Pavlov (apavlov) 2012-03-05 04:04:23 PST
Committed r109732: <http://trac.webkit.org/changeset/109732>
Comment 3 Joseph Pecoraro 2012-03-05 17:38:41 PST
This code looks like it would not handle duplicate classes very well. So:

    <div class="foo foo foo"></div>

Might produce:

    div.foo.foo.foo

Maybe some of the code inside of WebInspector.DOMPresentationUtils.decorateNodeLabel
should be shared. That does eliminate duplicates.