Closed
Bug 492925
Opened 15 years ago
Closed 14 years ago
MediaList[i] reports undefined, not the value from .item(i)
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a5
People
(Reporter: kpdecker, Assigned: bzbarsky)
References
()
Details
(Keywords: testcase)
Attachments
(2 files)
1.02 KB,
text/html
|
Details | |
3.32 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4) Gecko/20090423 Firefox/3.5b4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4) Gecko/20090423 Firefox/3.5b4 The MediaList array accessor API always returns undefined when valid indexes are passed. I'm not sure where this lies in the spec, but it was unexpected for me as other FF objects that define the item() accessor in the spec also define an array accessor. This is more of a consistency item rather than a strict spec compliance issue. Reproducible: Always Steps to Reproduce: See the referenced page. for (var i = 0; i < rule.media.length; i++) { out.push(i + ": " + rule.media[i]); } for (var i = 0; i < rule.media.length; i++) { out.push(i + ": " + rule.media.item(i)); } Actual Results: media[i] returns undefined media.item(i) returns correct value Expected Results: media[i] === media.item(i) for all i Tested under 3.5b4 and 3.0.10
Updated•15 years ago
|
Product: Firefox → Core
QA Contact: general → general
Comment 1•14 years ago
|
||
Confirmed with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a5pre) Gecko/20100418 Minefield/3.7a5pre. Thanks for the testcase! It would probably be best if you attached it here using 'Add an attachment' link on this page, since the testcases have the tendency to disappear after some time from external sites...
Severity: minor → normal
Component: General → DOM: CSS Object Model
Keywords: testcase
OS: Windows XP → All
QA Contact: general → general
Hardware: x86 → All
Summary: MediaList.item[i] reports undefined → MediaList[i] reports undefined, not the value from .item(i)
Version: unspecified → Trunk
Updated•14 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 2•14 years ago
|
||
Assignee | ||
Comment 3•14 years ago
|
||
Kevin, nice catch! Looks like the code to make all this work has been around for years, but never actually got run....
Updated•14 years ago
|
Attachment #439927 -
Flags: review?(jst) → review+
Assignee | ||
Comment 4•14 years ago
|
||
Pushed http://hg.mozilla.org/mozilla-central/rev/302e3ead2b3e
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
You need to log in
before you can comment on or make changes to this bug.
Description
•