[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:15 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit e2529f6748b364b3cb71b7ad1e662f61e33d8ed0
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 27 11:43:55 2010 +0000

    2010-01-27  Matt Perry  <mpcomplete at chromium.org>
    
            Reviewed by Eric Seidel.
    
            Fix a bug where dispatchDocumentElementAvailable was fired for fragment parsing on XML documents.
            https://bugs.webkit.org/show_bug.cgi?id=33920
    
            * userscripts/resources: Added.
            * userscripts/resources/blank.xhtml: Added.
            * userscripts/script-not-run-for-fragments-expected.txt: Added.
            * userscripts/script-not-run-for-fragments.html: Added.
            * userscripts/script-run-at-start-expected.txt: Added.
            * userscripts/script-run-at-start.html: Added.
    2010-01-27  Matt Perry  <mpcomplete at chromium.org>
    
            Reviewed by Eric Seidel.
    
            Fix a bug where dispatchDocumentElementAvailable was fired for fragment parsing on XML documents.
            https://bugs.webkit.org/show_bug.cgi?id=33920
    
            Tests: userscripts/script-not-run-for-fragments.html
                   userscripts/script-run-at-start.html
    
            * dom/XMLTokenizerLibxml2.cpp:
            (WebCore::XMLTokenizer::startElementNs):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53917 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8a4fc56..5bb419f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-27  Matt Perry  <mpcomplete at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Fix a bug where dispatchDocumentElementAvailable was fired for fragment parsing on XML documents.
+        https://bugs.webkit.org/show_bug.cgi?id=33920
+
+        * userscripts/resources: Added.
+        * userscripts/resources/blank.xhtml: Added.
+        * userscripts/script-not-run-for-fragments-expected.txt: Added.
+        * userscripts/script-not-run-for-fragments.html: Added.
+        * userscripts/script-run-at-start-expected.txt: Added.
+        * userscripts/script-run-at-start.html: Added.
+
 2010-01-27  Csaba Osztrogonác  <ossy at webkit.org>
 
         [Qt] fast/backgrounds/animated-svg-as-background.html make fast/backgrounds/svg-as-background-5.html crash.
diff --git a/LayoutTests/userscripts/resources/blank.xhtml b/LayoutTests/userscripts/resources/blank.xhtml
new file mode 100644
index 0000000..18b0070
--- /dev/null
+++ b/LayoutTests/userscripts/resources/blank.xhtml
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<body>
+<script>
+window.onload = function() {
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+}
+</script>
+</body>
+</html>
diff --git a/LayoutTests/userscripts/script-not-run-for-fragments-expected.txt b/LayoutTests/userscripts/script-not-run-for-fragments-expected.txt
new file mode 100644
index 0000000..e952594
--- /dev/null
+++ b/LayoutTests/userscripts/script-not-run-for-fragments-expected.txt
@@ -0,0 +1,3 @@
+CONSOLE MESSAGE: line 0: injected
+CONSOLE MESSAGE: line 0: injected
+This test should not infinitely inject user scripts. 
diff --git a/LayoutTests/userscripts/script-not-run-for-fragments.html b/LayoutTests/userscripts/script-not-run-for-fragments.html
new file mode 100644
index 0000000..8d69172
--- /dev/null
+++ b/LayoutTests/userscripts/script-not-run-for-fragments.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script>
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+    layoutTestController.addUserScript("console.log('injected'); var div = document.createElement('div'); div.innerHTML = '<p>hi</p>';", true);
+}
+</script>
+</head>
+<body>
+This test should not infinitely inject user scripts.
+<iframe src="resources/blank.xhtml"></iframe>
+</body>
+</html>
diff --git a/LayoutTests/userscripts/script-run-at-start-expected.txt b/LayoutTests/userscripts/script-run-at-start-expected.txt
new file mode 100644
index 0000000..04155d0
--- /dev/null
+++ b/LayoutTests/userscripts/script-run-at-start-expected.txt
@@ -0,0 +1,3 @@
+CONSOLE MESSAGE: line 0: SUCCESS
+CONSOLE MESSAGE: line 0: SUCCESS
+This test should log a console message on success. 
diff --git a/LayoutTests/userscripts/script-run-at-start.html b/LayoutTests/userscripts/script-run-at-start.html
new file mode 100644
index 0000000..a91b61c
--- /dev/null
+++ b/LayoutTests/userscripts/script-run-at-start.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script>
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.addUserScript("if (window.location == 'about:blank') console.log('SUCCESS');", true);
+}
+</script>
+</head>
+<body>
+This test should log a console message on success.
+<iframe src="about:blank"></iframe>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b022c75..86680df 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-27  Matt Perry  <mpcomplete at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Fix a bug where dispatchDocumentElementAvailable was fired for fragment parsing on XML documents.
+        https://bugs.webkit.org/show_bug.cgi?id=33920
+
+        Tests: userscripts/script-not-run-for-fragments.html
+               userscripts/script-run-at-start.html
+
+        * dom/XMLTokenizerLibxml2.cpp:
+        (WebCore::XMLTokenizer::startElementNs):
+
 2010-01-27  Pavel Feldman  <pfeldman at chromium.org>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebCore/dom/XMLTokenizerLibxml2.cpp b/WebCore/dom/XMLTokenizerLibxml2.cpp
index 7bfd0f0..fcb3718 100644
--- a/WebCore/dom/XMLTokenizerLibxml2.cpp
+++ b/WebCore/dom/XMLTokenizerLibxml2.cpp
@@ -813,7 +813,7 @@ void XMLTokenizer::startElementNs(const xmlChar* xmlLocalName, const xmlChar* xm
     if (m_view && !newElement->attached())
         newElement->attach();
 
-    if (isFirstElement && m_doc->frame())
+    if (!m_parsingFragment && isFirstElement && m_doc->frame())
         m_doc->frame()->loader()->dispatchDocumentElementAvailable();
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list