RESOLVED FIXED 139013
Fix the parsing and re-serialization of :lang pseudo class selector when it has multiple arguments with same value
https://bugs.webkit.org/show_bug.cgi?id=139013
Summary Fix the parsing and re-serialization of :lang pseudo class selector when it h...
Dhi Aurrahman
Reported 2014-11-23 00:53:03 PST
Fix the parsing and re-serialization of :lang pseudo class css selector when it has multiple arguments with same value
Attachments
Patch (8.33 KB, patch)
2014-11-23 01:03 PST, Dhi Aurrahman
no flags
Patch for landing (7.97 KB, patch)
2014-11-24 19:33 PST, Benjamin Poulain
no flags
Patch (7.97 KB, patch)
2014-11-24 19:51 PST, Benjamin Poulain
no flags
Dhi Aurrahman
Comment 1 2014-11-23 01:03:01 PST
Benjamin Poulain
Comment 2 2014-11-24 19:25:03 PST
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.
Benjamin Poulain
Comment 3 2014-11-24 19:33:44 PST
Created attachment 242185 [details] Patch for landing
Benjamin Poulain
Comment 4 2014-11-24 19:45:17 PST
Comment on attachment 242185 [details] Patch for landing Arg, of course I had to mess up the edit :(
Benjamin Poulain
Comment 5 2014-11-24 19:51:31 PST
WebKit Commit Bot
Comment 6 2014-11-24 21:26:16 PST
Comment on attachment 242186 [details] Patch Clearing flags on attachment: 242186 Committed r176535: <http://trac.webkit.org/changeset/176535>
WebKit Commit Bot
Comment 7 2014-11-24 21:26:19 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.