Commit 3a0207f5 authored by abarth@webkit.org's avatar abarth@webkit.org
Browse files

2011-02-15 Adam Barth <abarth@webkit.org>

        Reviewed by Darin Adler.

        XSLT with output method HTML and images crashes in debug mode
        https://bugs.webkit.org/show_bug.cgi?id=54462

        http://trac.webkit.org/changeset/75577 created Document::setContent but
        didn't notice that the code paths combined into Document::setContent
        were subtly different.  In particular, some of the code paths called
        parser->finish() whereas other did not.

        The difference is that an explicit call to parser->finish() is required
        in the case where there is no frame because explicitClose doesn't call
        endIfNotLoadingMainResource if there is no frame.  This patch moves
        that logic inside explicitClose, which is more natural.

        This patch also removes removeAllChildren, which has not effect in this
        situation and should never have been added in the first place.

        Test: fast/parser/xslt-with-html.xml

        * dom/Document.cpp:
        (WebCore::Document::setContent):
        (WebCore::Document::explicitClose):
2011-02-15  Adam Barth  <abarth@webkit.org>

        Reviewed by Darin Adler.

        XSLT with output method HTML and images crashes in debug mode
        https://bugs.webkit.org/show_bug.cgi?id=54462

        Test that we don't try to prepare to stop twice when pasing HTML
        generated from an XSLT.

        * fast/parser/resources/xslt-with-html.xsl: Added.
        * fast/parser/xslt-with-html-expected.txt: Added.
        * fast/parser/xslt-with-html.xml: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 18656b79
2011-02-15 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
XSLT with output method HTML and images crashes in debug mode
https://bugs.webkit.org/show_bug.cgi?id=54462
Test that we don't try to prepare to stop twice when pasing HTML
generated from an XSLT.
* fast/parser/resources/xslt-with-html.xsl: Added.
* fast/parser/xslt-with-html-expected.txt: Added.
* fast/parser/xslt-with-html.xml: Added.
2011-02-15 Martin Robinson <mrobinson@igalia.com>
 
Rebaseline some GTK+ tests which have different results on the bots.
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="//*">
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
</script>
<div>PASS</div>
</xsl:template>
</xsl:stylesheet>
<?xml version='1.0' encoding='utf-8'?>
<?xml-stylesheet href="resources/xslt-with-html.xsl" type="text/xsl"?>
<root/>
2011-02-15 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
XSLT with output method HTML and images crashes in debug mode
https://bugs.webkit.org/show_bug.cgi?id=54462
http://trac.webkit.org/changeset/75577 created Document::setContent but
didn't notice that the code paths combined into Document::setContent
were subtly different. In particular, some of the code paths called
parser->finish() whereas other did not.
The difference is that an explicit call to parser->finish() is required
in the case where there is no frame because explicitClose doesn't call
endIfNotLoadingMainResource if there is no frame. This patch moves
that logic inside explicitClose, which is more natural.
This patch also removes removeAllChildren, which has not effect in this
situation and should never have been added in the first place.
Test: fast/parser/xslt-with-html.xml
* dom/Document.cpp:
(WebCore::Document::setContent):
(WebCore::Document::explicitClose):
2011-02-15 Oliver Hunt <oliver@apple.com>
 
Fix EFL build for
......@@ -1092,12 +1092,9 @@ KURL Document::baseURI() const
void Document::setContent(const String& content)
{
removeAllChildren();
open();
m_parser->append(content);
m_parser->finish();
explicitClose();
close();
}
// FIXME: We need to discuss the DOM API here at some point. Ideas:
......@@ -2020,6 +2017,8 @@ void Document::explicitClose()
// Because we have no frame, we don't know if all loading has completed,
// so we just call implicitClose() immediately. FIXME: This might fire
// the load event prematurely <http://bugs.webkit.org/show_bug.cgi?id=14568>.
if (m_parser)
m_parser->finish();
implicitClose();
return;
}
......
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