Commit 47d962de authored by eric@webkit.org's avatar eric@webkit.org

2010-01-27 Matt Perry <mpcomplete@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@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
parent 46dc797e
2010-01-27 Matt Perry <mpcomplete@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@webkit.org>
[Qt] fast/backgrounds/animated-svg-as-background.html make fast/backgrounds/svg-as-background-5.html crash.
<!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>
CONSOLE MESSAGE: line 0: injected
CONSOLE MESSAGE: line 0: injected
This test should not infinitely inject user scripts.
<!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>
CONSOLE MESSAGE: line 0: SUCCESS
CONSOLE MESSAGE: line 0: SUCCESS
This test should log a console message on success.
<!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>
2010-01-27 Matt Perry <mpcomplete@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@chromium.org>
Reviewed by Timothy Hatcher.
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment