- fixed <rdar://problem/
4125212> form submission delayed until you are on the next page on XML/XSL page (security hole)
* khtml/xsl/xslt_processorimpl.cpp: (DOM::XSLTProcessorImpl::documentFromXMLDocPtr):
Call setParsing(false) explicitly here. It's really annoying that setParsing(true) is done
inside DOM::DocumentImpl and setParsing(false) is done by KHTMLPart, so that should be fixed
some day, but for now this is the way to do it.
Test cases added:
* layout-tests/fast/events/xsl-onload-expected.txt: Added.
* layout-tests/fast/events/xsl-onload.xhtml: Added.
* layout-tests/fast/events/xsl-onload.xsl: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9225
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
--- /dev/null
+This is a regression test that checks for a problem where parsing would be stuck true and you'd never get a load event for an XSL-generated page
+
+If the test succeeds, the next paragraph will say "handled load event". If that message is missing, the test failed.
+
+Handled load event.
+
+
--- /dev/null
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<?xml-stylesheet type='text/xsl' href='xsl-onload.xsl'?>
+<body/>
--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="html" indent="yes"/>
+
+ <xsl:template match="*|@*|processing-instruction()|comment()">
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*|text()|processing-instruction()|comment()"/>
+ </xsl:copy>
+ </xsl:template>
+
+<xsl:template match="body">
+ <body onload="document.getElementById('result').appendChild(document.createTextNode('Handled load event.'))">
+ <script>if (window.layoutTestController) { layoutTestController.dumpAsText(); }</script>
+ <p>This is a regression test that checks for a problem where parsing would be stuck true and you'd never get a load event for an XSL-generated page</p>
+ <p>If the test succeeds, the next paragraph will say "handled load event". If that message is missing, the test failed.</p>
+ <p id="result"/>
+ </body>
+</xsl:template>
+
+</xsl:stylesheet>
+2005-05-27 Darin Adler <darin@apple.com>
+
+ Reviewed by Vicki.
+
+ - fixed <rdar://problem/4125212> form submission delayed until you are on the next page on XML/XSL page (security hole)
+
+ * khtml/xsl/xslt_processorimpl.cpp: (DOM::XSLTProcessorImpl::documentFromXMLDocPtr):
+ Call setParsing(false) explicitly here. It's really annoying that setParsing(true) is done
+ inside DOM::DocumentImpl and setParsing(false) is done by KHTMLPart, so that should be fixed
+ some day, but for now this is the way to do it.
+
+ Test cases added:
+ * layout-tests/fast/events/xsl-onload-expected.txt: Added.
+ * layout-tests/fast/events/xsl-onload.xhtml: Added.
+ * layout-tests/fast/events/xsl-onload.xsl: Added.
+
2005-05-27 John Sullivan <sullivan@apple.com>
Reviewed by Darin
result->determineParseMode(m_resultOutput); // Make sure we parse in the correct mode.
result->write(m_resultOutput);
result->finishParsing();
+ result->setParsing(false);
if (view)
view->part()->checkCompleted();
else