Bug 34211

Summary: [V8] Support getting integer-named properties using indexing notation on document object
Product: WebKit Reporter: Mads Ager <ager>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dglazkov, japhet
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Add indexed property getter to HTMLDocument objects none

Description Mads Ager 2010-01-27 05:06:53 PST
The V8 binding layer does not handle access of properties with integer names on HTMLDocuments as illustrated by the following example.  We need to add an indexed property getter to HTMLDocuments.

<html>
<head>
<script>
function runTest()
{
    alert(document['42']);
    alert(document[42]);
}
</script>
</head>
<body onload="runTest()">
    <img name="42" src="foo.gif">
</body>
</html>
Comment 1 Mads Ager 2010-01-27 05:07:17 PST
Corresponding Chromium bug: crbug.com/31662
Comment 2 Mads Ager 2010-01-27 05:19:12 PST
Created attachment 47520 [details]
Add indexed property getter to HTMLDocument objects
Comment 3 Dimitri Glazkov (Google) 2010-01-27 08:42:12 PST
Nate, you want to give it a look-over?
Comment 4 Nate Chapin 2010-01-27 09:13:27 PST
(In reply to comment #3)
> Nate, you want to give it a look-over?

LGTM
Comment 5 Dimitri Glazkov (Google) 2010-01-27 09:19:22 PST
Comment on attachment 47520 [details]
Add indexed property getter to HTMLDocument objects

I wonder if we should just generate fallback index getters for all interfaces that have named property getters?
Comment 6 WebKit Commit Bot 2010-01-27 12:00:23 PST
Comment on attachment 47520 [details]
Add indexed property getter to HTMLDocument objects

Clearing flags on attachment: 47520

Committed r53946: <http://trac.webkit.org/changeset/53946>
Comment 7 WebKit Commit Bot 2010-01-27 12:00:29 PST
All reviewed patches have been landed.  Closing bug.