[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
eric at webkit.org
eric at webkit.org
Thu Feb 4 21:29:45 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 4b739955a4a233886afc80d35d05e1f34ebdb110
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 27 20:00:13 2010 +0000
2010-01-27 Mads Ager <ager at 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 at 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
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 276a46a..d0940da 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-27 Mads Ager <ager at 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 at chromium.org>
Reviewed by Eric Seidel.
diff --git a/LayoutTests/fast/dom/HTMLDocument/get-iframe-with-integer-name-expected.txt b/LayoutTests/fast/dom/HTMLDocument/get-iframe-with-integer-name-expected.txt
new file mode 100644
index 0000000..8bd2fc8
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLDocument/get-iframe-with-integer-name-expected.txt
@@ -0,0 +1,3 @@
+
+This tests that an iframe with an integer name can be accessed on the document with indexing notation.
+SUCCESS
diff --git a/LayoutTests/fast/dom/HTMLDocument/get-iframe-with-integer-name.html b/LayoutTests/fast/dom/HTMLDocument/get-iframe-with-integer-name.html
new file mode 100644
index 0000000..5529969
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLDocument/get-iframe-with-integer-name.html
@@ -0,0 +1,17 @@
+<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>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 04d5de6..769f8f9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-01-27 Mads Ager <ager at 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 at chromium.org>
Reviewed by Oliver Hunt.
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index a7bb4b5..3b66287 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -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) {
diff --git a/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
index f7aad4d..13243ef 100644
--- a/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp
@@ -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.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list