| Summary: | Fix the parsing and re-serialization of :lang pseudo class selector when it has multiple arguments with same value | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Dhi Aurrahman <diorahman> | ||||||||
| Component: | New Bugs | Assignee: | Dhi Aurrahman <diorahman> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | benjamin, commit-queue, diorahman | ||||||||
| Priority: | P2 | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Dhi Aurrahman
2014-11-23 00:53:03 PST
Created attachment 242131 [details]
Patch
Comment on attachment 242131 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=242131&action=review Great catch + great test. I'll change the loop to an enumerated loop for landing. I think that will make such cases clearer. > Source/WebCore/css/CSSSelector.cpp:347 > - const AtomicString& lastArgument = argumentList.last(); > - for (const AtomicString argument : argumentList) { > + const AtomicString* lastArgument = &argumentList.last(); > + for (const AtomicString& argument : argumentList) { > str.append(argument); > - if (argument != lastArgument) > + if (&argument != lastArgument) > str.appendLiteral(", "); > } Great catch, I did not think of this while reviewing. Created attachment 242185 [details]
Patch for landing
Comment on attachment 242185 [details]
Patch for landing
Arg, of course I had to mess up the edit :(
Created attachment 242186 [details]
Patch
Comment on attachment 242186 [details] Patch Clearing flags on attachment: 242186 Committed r176535: <http://trac.webkit.org/changeset/176535> All reviewed patches have been landed. Closing bug. |