[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
rniwa at webkit.org
rniwa at webkit.org
Wed Dec 22 16:27:27 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit db5604cad89885937c5e1597b74d864d16433c6d
Author: rniwa at webkit.org <rniwa at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 23 23:59:46 2010 +0000
2010-11-23 Ryosuke Niwa <rniwa at webkit.org>
Reviewed by Adam Barth.
XMLDocumentParser::notifyFinished calls ScriptController's executeScript without updating isEvaluated flag
https://bugs.webkit.org/show_bug.cgi?id=49701
Fixed the bug by calling ScriptElement's executeScript, which sets isEvaluated flag to true.
Test: fast/dom/script-clone-rerun-src.xhtml
* dom/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::notifyFinished):
2010-11-23 Ryosuke Niwa <rniwa at webkit.org>
Reviewed by Adam Barth.
XMLDocumentParser::notifyFinished calls ScriptController's executeScript without updating isEvaluated flag
https://bugs.webkit.org/show_bug.cgi?id=49701
Added a test to ensure WebKit doesn't run the script twice when a script element with an external script file
is cloned in a XML document.
* fast/dom/resources/script-clone-rerun-src.js: Added.
* fast/dom/script-clone-rerun-src.xhtml: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 09b9c21..98cb532 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,5 +1,18 @@
2010-11-23 Ryosuke Niwa <rniwa at webkit.org>
+ Reviewed by Adam Barth.
+
+ XMLDocumentParser::notifyFinished calls ScriptController's executeScript without updating isEvaluated flag
+ https://bugs.webkit.org/show_bug.cgi?id=49701
+
+ Added a test to ensure WebKit doesn't run the script twice when a script element with an external script file
+ is cloned in a XML document.
+
+ * fast/dom/resources/script-clone-rerun-src.js: Added.
+ * fast/dom/script-clone-rerun-src.xhtml: Added.
+
+2010-11-23 Ryosuke Niwa <rniwa at webkit.org>
+
Reviewed by Tony Chang.
dumpAsText conversion: editing/deleting/delete-by-word-001.html and delete-by-word-002.html
diff --git a/LayoutTests/fast/dom/resources/script-clone-rerun-src.js b/LayoutTests/fast/dom/resources/script-clone-rerun-src.js
new file mode 100644
index 0000000..5026181
--- /dev/null
+++ b/LayoutTests/fast/dom/resources/script-clone-rerun-src.js
@@ -0,0 +1 @@
+i++;
diff --git a/LayoutTests/fast/dom/script-clone-rerun-self-expected.txt b/LayoutTests/fast/dom/script-clone-rerun-src-expected.txt
similarity index 100%
copy from LayoutTests/fast/dom/script-clone-rerun-self-expected.txt
copy to LayoutTests/fast/dom/script-clone-rerun-src-expected.txt
diff --git a/LayoutTests/fast/dom/script-clone-rerun-src.xhtml b/LayoutTests/fast/dom/script-clone-rerun-src.xhtml
new file mode 100644
index 0000000..edbe829
--- /dev/null
+++ b/LayoutTests/fast/dom/script-clone-rerun-src.xhtml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
+<head>
+<script>
+
+var i = 0;
+
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+}
+
+var firstLoad = true;
+
+function loaded() {
+ if (firstLoad) {
+ firstLoad = false;
+ return;
+ }
+
+ result = 'PASS';
+ if (i == 2)
+ result = 'FAIL: script ran twice';
+ else if (i > 2)
+ result = 'FAIL: script ran ' + i + ' times';
+ document.body.appendChild(document.createTextNode(result));
+
+ layoutTestController.notifyDone();
+}
+
+</script>
+</head>
+<body>
+<p>This test runs a script that clones and inserts its script element. The script should run exactly once and print PASS:</p>
+<div><script src="resources/script-clone-rerun-src.js" onload="loaded()"></script></div>
+<script>
+
+var script = document.getElementsByTagName('script')[1];
+var div = script.parentNode;
+div.removeChild(script);
+div.appendChild(script.cloneNode(true));
+
+</script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c3b81ed..61e3cab 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-23 Ryosuke Niwa <rniwa at webkit.org>
+
+ Reviewed by Adam Barth.
+
+ XMLDocumentParser::notifyFinished calls ScriptController's executeScript without updating isEvaluated flag
+ https://bugs.webkit.org/show_bug.cgi?id=49701
+
+ Fixed the bug by calling ScriptElement's executeScript, which sets isEvaluated flag to true.
+
+ Test: fast/dom/script-clone-rerun-src.xhtml
+
+ * dom/XMLDocumentParser.cpp:
+ (WebCore::XMLDocumentParser::notifyFinished):
+
2010-11-23 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r72628.
diff --git a/WebCore/dom/XMLDocumentParser.cpp b/WebCore/dom/XMLDocumentParser.cpp
index 2bfd9cc..27b0fd4 100644
--- a/WebCore/dom/XMLDocumentParser.cpp
+++ b/WebCore/dom/XMLDocumentParser.cpp
@@ -359,7 +359,7 @@ void XMLDocumentParser::notifyFinished(CachedResource* unusedResource)
if (errorOccurred)
scriptElement->dispatchErrorEvent();
else {
- m_view->frame()->script()->executeScript(sourceCode);
+ scriptElement->executeScript(sourceCode);
scriptElement->dispatchLoadEvent();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list