[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
ap at apple.com
ap at apple.com
Wed Jan 20 22:29:44 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit f6c49214a46820c05547fe1cfc9f61a7562bd1a6
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 19 23:32:15 2010 +0000
Reviewed by Oliver Hunt.
https://bugs.webkit.org/show_bug.cgi?id=33850
Attr.childNodes does not get updated after DOM mutations
Test: fast/dom/Attr/child-nodes-cache.html
* dom/Node.cpp: (WebCore::Node::notifyLocalNodeListsAttributeChanged): If the node is an
attribute, then changing it shouldn't take the shortcut that only resets a subset of caches.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 0ca7696..5a1be47 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-19 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33850
+ Attr.childNodes does not get updated after DOM mutations
+
+ * fast/dom/Attr/child-nodes-cache-expected.txt: Added.
+ * fast/dom/Attr/child-nodes-cache.html: Added.
+
2010-01-19 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
diff --git a/LayoutTests/fast/dom/Attr/child-nodes-cache-expected.txt b/LayoutTests/fast/dom/Attr/child-nodes-cache-expected.txt
new file mode 100644
index 0000000..ea4527b
--- /dev/null
+++ b/LayoutTests/fast/dom/Attr/child-nodes-cache-expected.txt
@@ -0,0 +1,3 @@
+PASS if no crash.
+
+
diff --git a/LayoutTests/fast/dom/Attr/child-nodes-cache.html b/LayoutTests/fast/dom/Attr/child-nodes-cache.html
new file mode 100644
index 0000000..7805946
--- /dev/null
+++ b/LayoutTests/fast/dom/Attr/child-nodes-cache.html
@@ -0,0 +1,38 @@
+<body onload="test()">
+<p>Running test...</p>
+<textarea id=t rows=20>textarea</textarea>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+}
+
+function gc()
+{
+ if (window.GCController)
+ return GCController.collect();
+
+ for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
+ var s = new String("abc");
+ }
+}
+
+function test()
+{
+ var elem = document.getElementById("t");
+ var nodes = document.getElementById("t").getAttributeNode('rows').childNodes;
+ nodes[0]; // Prime the child node cache.
+ document.body.removeChild(document.getElementById("t"));
+ elem.getAttributeNode('rows').removeChild(nodes[0]);
+ setTimeout(function() {
+ gc();
+ gc();
+ gc();
+ try { nodes[0].textContent } catch (ex) { }
+
+ document.getElementsByTagName("p")[0].innerHTML = "PASS"
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }, 0);
+}
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8f752e6..277476d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-19 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33850
+ Attr.childNodes does not get updated after DOM mutations
+
+ Test: fast/dom/Attr/child-nodes-cache.html
+
+ * dom/Node.cpp: (WebCore::Node::notifyLocalNodeListsAttributeChanged): If the node is an
+ attribute, then changing it shouldn't take the shortcut that only resets a subset of caches.
+
2010-01-19 John Sullivan <sullivan at apple.com>
https://bugs.webkit.org/show_bug.cgi?id=33854
diff --git a/WebCore/dom/Node.cpp b/WebCore/dom/Node.cpp
index 1ec0604..8fb752d 100644
--- a/WebCore/dom/Node.cpp
+++ b/WebCore/dom/Node.cpp
@@ -917,7 +917,10 @@ void Node::notifyLocalNodeListsAttributeChanged()
if (!data->nodeLists())
return;
- data->nodeLists()->invalidateCachesThatDependOnAttributes();
+ if (!isAttributeNode())
+ data->nodeLists()->invalidateCachesThatDependOnAttributes();
+ else
+ data->nodeLists()->invalidateCaches();
if (data->nodeLists()->isEmpty()) {
data->clearNodeLists();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list