Commit 3a43f91f authored by eric@webkit.org's avatar eric@webkit.org

2010-01-27 Mads Ager <ager@chromium.org>

        Reviewed by Dimitri Glazkov.

        [V8] Support getting integer-named properties using indexing notation on document object
        https://bugs.webkit.org/show_bug.cgi?id=34211

        * fast/dom/HTMLDocument/get-iframe-with-integer-name-expected.txt: Added.
        * fast/dom/HTMLDocument/get-iframe-with-integer-name.html: Added.
2010-01-27  Mads Ager  <ager@chromium.org>

        Reviewed by Dimitri Glazkov.

        [V8] Support getting integer-named properties using indexing notation on document object
        https://bugs.webkit.org/show_bug.cgi?id=34211

        Add indexed property getter to HTMLDocument to support getting
        elements with integer names using indexing notation on document.

        Test: fast/dom/HTMLDocument/get-iframe-with-integer-name.html

        * bindings/scripts/CodeGeneratorV8.pm:
        * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
        (WebCore::V8HTMLDocument::indexedPropertyGetter):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 99b9ed9f
2010-01-27 Mads Ager <ager@chromium.org>
Reviewed by Dimitri Glazkov.
[V8] Support getting integer-named properties using indexing notation on document object
https://bugs.webkit.org/show_bug.cgi?id=34211
* fast/dom/HTMLDocument/get-iframe-with-integer-name-expected.txt: Added.
* fast/dom/HTMLDocument/get-iframe-with-integer-name.html: Added.
2010-01-27 Kinuko Yasuda <kinuko@chromium.org>
Reviewed by Eric Seidel.
This tests that an iframe with an integer name can be accessed on the document with indexing notation.
SUCCESS
<html>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
function runTest() {
if (document['1'] && document[1])
document.getElementById('result').innerHTML = 'SUCCESS';
}
</script>
<body onload='runTest()'>
<iframe name='1'></iframe>
<div>This tests that an iframe with an integer name can be accessed on the document with indexing notation.</div>
<div id='result'>FAILURE</div>
</body>
</html>
2010-01-27 Mads Ager <ager@chromium.org>
Reviewed by Dimitri Glazkov.
[V8] Support getting integer-named properties using indexing notation on document object
https://bugs.webkit.org/show_bug.cgi?id=34211
Add indexed property getter to HTMLDocument to support getting
elements with integer names using indexing notation on document.
Test: fast/dom/HTMLDocument/get-iframe-with-integer-name.html
* bindings/scripts/CodeGeneratorV8.pm:
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::indexedPropertyGetter):
2010-01-27 Yury Semikhatsky <yurys@chromium.org>
Reviewed by Oliver Hunt.
......@@ -429,6 +429,7 @@ END
my %indexerSpecialCases = (
"Storage" => 1,
"HTMLAppletElement" => 1,
"HTMLDocument" => 1,
"HTMLEmbedElement" => 1,
"HTMLObjectElement" => 1
);
......@@ -1305,7 +1306,9 @@ sub GenerateImplementationIndexer
my $isSpecialCase = exists $indexerSpecialCases{$interfaceName};
if ($isSpecialCase) {
$hasGetter = 1;
$hasCustomSetter = 1;
if ($dataNode->extendedAttributes->{"DelegatingPutFunction"}) {
$hasCustomSetter = 1;
}
}
if (!$hasGetter) {
......
......@@ -99,6 +99,13 @@ v8::Handle<v8::Value> V8HTMLDocument::namedPropertyGetter(v8::Local<v8::String>
return V8DOMWrapper::convertToV8Object(V8ClassIndex::HTMLCOLLECTION, items.release());
}
v8::Handle<v8::Value> V8HTMLDocument::indexedPropertyGetter(uint32_t index, const v8::AccessorInfo &info)
{
INC_STATS("DOM.HTMLDocument.IndexedPropertyGetter");
v8::Local<v8::Integer> indexV8 = v8::Integer::NewFromUnsigned(index);
return namedPropertyGetter(indexV8->ToString(), info);
}
// HTMLDocument ----------------------------------------------------------------
// Concatenates "args" to a string. If args is empty, returns empty string.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment