RESOLVED FIXED 65086
Fix AtomicString vs. String usage in accessibility code
https://bugs.webkit.org/show_bug.cgi?id=65086
Summary Fix AtomicString vs. String usage in accessibility code
Patrick R. Gansterer
Reported 2011-07-24 15:02:15 PDT
Fix AtomicString vs. String usage in accessibility code
Attachments
Patch (4.02 KB, patch)
2011-07-24 15:07 PDT, Patrick R. Gansterer
no flags
Patrick R. Gansterer
Comment 1 2011-07-24 15:07:42 PDT
Darin Adler
Comment 2 2011-07-24 17:38:13 PDT
Comment on attachment 101835 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101835&action=review > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1237 > - String idName = idVector[i]; > + AtomicString idName(idVector[i]); > Element* idElement = scope->getElementById(idName); There’s no value to having a local variable here. It should just be getElementById(idVector[i]).
Patrick R. Gansterer
Comment 3 2011-07-24 20:57:20 PDT
(In reply to comment #2) > (From update of attachment 101835 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=101835&action=review > > > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1237 > > - String idName = idVector[i]; > > + AtomicString idName(idVector[i]); > > Element* idElement = scope->getElementById(idName); > > There’s no value to having a local variable here. It should just be getElementById(idVector[i]). We need to make a AtomicString out of String, to make the explicit cast work (I should mention that in the ChangeLog... sorry). The alternative line would be getElementById(AtomicString(idVector[i])). An other option is to add a split operator which generates a list of AtomicString, but I don't see much value in this.
Darin Adler
Comment 4 2011-07-25 14:53:44 PDT
(In reply to comment #3) > An other option is to add a split operator which generates a list of AtomicString, but I don't see much value in this. There’s a little bit of value in that.
WebKit Review Bot
Comment 5 2011-07-25 16:12:56 PDT
Comment on attachment 101835 [details] Patch Clearing flags on attachment: 101835 Committed r91718: <http://trac.webkit.org/changeset/91718>
WebKit Review Bot
Comment 6 2011-07-25 16:13:00 PDT
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.