Bug 80258

Summary: Web Inspector: Incorrect appropriateSelectorFor() suggestion for when a DOMNode has more than 2 CSS classes
Product: WebKit Reporter: Alexander Pavlov (apavlov) <apavlov>
Component: Web Inspector (Deprecated)Assignee: Alexander Pavlov (apavlov) <apavlov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch pfeldman: review+

Alexander Pavlov (apavlov)
Reported 2012-03-05 03:13:18 PST
Upstreaming http://code.google.com/p/chromium/issues/detail?id=116229 (second issue). Patch to follow.
Attachments
Patch (1.41 KB, patch)
2012-03-05 03:31 PST, Alexander Pavlov (apavlov)
pfeldman: review+
Alexander Pavlov (apavlov)
Comment 1 2012-03-05 03:31:53 PST
Alexander Pavlov (apavlov)
Comment 2 2012-03-05 04:04:23 PST
Joseph Pecoraro
Comment 3 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.
Note You need to log in before you can comment on or make changes to this bug.