[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
simon.fraser at apple.com
simon.fraser at apple.com
Wed Dec 22 12:27:23 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit bcfbeddcb4ad0053b0cc8f3904b057e9ac37fa74
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 24 01:49:04 2010 +0000
2010-08-23 Simon Fraser <simon.fraser at apple.com>
Reviewed by Alexey Proskuryakov.
TreeWalker is not calling acceptNode function in filter object
https://bugs.webkit.org/show_bug.cgi?id=35296
Fix incorrect shadowing of the 'function' variable, which could result
in badness when asking for arguments.callee.
* bindings/js/JSNodeFilterCondition.cpp:
(WebCore::JSNodeFilterCondition::acceptNode):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5dec9d4..313e6a9 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-23 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ TreeWalker is not calling acceptNode function in filter object
+ https://bugs.webkit.org/show_bug.cgi?id=35296
+
+ Add a test for arguments.callee inside the acceptNode function.
+
+ * fast/dom/TreeWalker/acceptNode-filter-expected.txt:
+ * fast/dom/TreeWalker/script-tests/acceptNode-filter.js:
+ (filter.acceptNode):
+
2010-08-23 Adam Barth <abarth at webkit.org>
Update the expected results for this test. I think the new expected
diff --git a/LayoutTests/fast/dom/TreeWalker/acceptNode-filter-expected.txt b/LayoutTests/fast/dom/TreeWalker/acceptNode-filter-expected.txt
index 48abae4..ca5da84 100644
--- a/LayoutTests/fast/dom/TreeWalker/acceptNode-filter-expected.txt
+++ b/LayoutTests/fast/dom/TreeWalker/acceptNode-filter-expected.txt
@@ -40,6 +40,13 @@ PASS walker.currentNode.id; is 'root'
Testing with function having acceptNode function
PASS walker.firstChild(); walker.currentNode.id is 'A1'
PASS walker.nextNode(); walker.currentNode.id is 'B1'
+
+Testing acceptNode callee
+Callee: function (node) {
+ debug('Callee: ' + arguments.callee);
+ return NodeFilter.FILTER_ACCEPT;
+ }
+PASS walker.firstChild(); walker.currentNode.id is 'A1'
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/LayoutTests/fast/dom/TreeWalker/script-tests/acceptNode-filter.js b/LayoutTests/fast/dom/TreeWalker/script-tests/acceptNode-filter.js
index cac24a2..79c26cc 100644
--- a/LayoutTests/fast/dom/TreeWalker/script-tests/acceptNode-filter.js
+++ b/LayoutTests/fast/dom/TreeWalker/script-tests/acceptNode-filter.js
@@ -67,4 +67,15 @@ walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, filter,
shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'");
shouldBe("walker.nextNode(); walker.currentNode.id", "'B1'");
+debug("<br>Testing acceptNode callee");
+var filter = {
+ acceptNode: function(node) {
+ debug('Callee: ' + arguments.callee);
+ return NodeFilter.FILTER_ACCEPT;
+ }
+};
+walker = document.createTreeWalker(testElement, NodeFilter.SHOW_ELEMENT, filter, false);
+
+shouldBe("walker.firstChild(); walker.currentNode.id", "'A1'");
+
var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8a888c4..440344d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-23 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ TreeWalker is not calling acceptNode function in filter object
+ https://bugs.webkit.org/show_bug.cgi?id=35296
+
+ Fix incorrect shadowing of the 'function' variable, which could result
+ in badness when asking for arguments.callee.
+
+ * bindings/js/JSNodeFilterCondition.cpp:
+ (WebCore::JSNodeFilterCondition::acceptNode):
+
2010-08-23 Darin Adler <darin at apple.com>
Reviewed by Geoff Garen.
diff --git a/WebCore/bindings/js/JSNodeFilterCondition.cpp b/WebCore/bindings/js/JSNodeFilterCondition.cpp
index 9e0cdc9..b269e5f 100644
--- a/WebCore/bindings/js/JSNodeFilterCondition.cpp
+++ b/WebCore/bindings/js/JSNodeFilterCondition.cpp
@@ -62,7 +62,7 @@ short JSNodeFilterCondition::acceptNode(JSC::ExecState* exec, Node* filterNode)
CallData callData;
CallType callType = getCallData(function, callData);
if (callType == CallTypeNone) {
- JSValue function = m_filter.get(exec, Identifier(exec, "acceptNode"));
+ function = m_filter.get(exec, Identifier(exec, "acceptNode"));
callType = getCallData(function, callData);
if (callType == CallTypeNone) {
throwError(exec, createTypeError(exec, "NodeFilter object does not have an acceptNode function"));
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list