RESOLVED FIXED 157283
Indexing CSSStyleDeclaration object with out-of-range index should return undefined
https://bugs.webkit.org/show_bug.cgi?id=157283
Summary Indexing CSSStyleDeclaration object with out-of-range index should return und...
Chris Dumez
Reported 2016-05-02 15:31:55 PDT
Indexed property getters returning a DOMString should not return undefined for out of bound access. Instead, it should behave like regular operations returning a DOMString or DOMString attribute getters. Namely, it should: - Return null if the returned DOMString type is nullable - Return the empty string otherwise Firefox and Chrome seem to behave correctly but WebKit always returns undefined in this case.
Attachments
Patch (10.26 KB, patch)
2016-05-02 16:27 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-05-02 16:27:04 PDT
Darin Adler
Comment 2 2016-05-02 18:03:05 PDT
Comment on attachment 277943 [details] Patch What is the compatibility risk to fixing this? How did you notice this?
Chris Dumez
Comment 3 2016-05-02 18:35:11 PDT
(In reply to comment #2) > Comment on attachment 277943 [details] > Patch > > What is the compatibility risk to fixing this? How did you notice this? I noticed it somewhat randomly when writing a layout test. I would assume the compatibility risk is very low as developers tend to not do out of range indexing, they usually access the length and iterate from 0 to length - 1. Also, Firefox behaves this way.
WebKit Commit Bot
Comment 4 2016-05-02 19:51:44 PDT
Comment on attachment 277943 [details] Patch Clearing flags on attachment: 277943 Committed r200358: <http://trac.webkit.org/changeset/200358>
WebKit Commit Bot
Comment 5 2016-05-02 19:51:51 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.