mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1205163: Set readystate correctly for XSLT result with output=text. r=sicking.
This commit is contained in:
parent
c7585865ef
commit
d609ec7f0c
6
dom/xslt/crashtests/1205163.xml
Normal file
6
dom/xslt/crashtests/1205163.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="1205163.xsl"?>
|
||||
<result>
|
||||
<Title>Example</Title>
|
||||
<Error>Error</Error>
|
||||
</result>
|
11
dom/xslt/crashtests/1205163.xsl
Normal file
11
dom/xslt/crashtests/1205163.xsl
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="text"/>
|
||||
<xsl:template match="node()|@*">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="node()|@*"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
<xsl:template match="Error"/>
|
||||
</xsl:stylesheet>
|
@ -16,3 +16,4 @@ load 602115.html
|
||||
load 603844.html
|
||||
load 667315.xml
|
||||
load 1089049.html
|
||||
load 1205163.xml
|
||||
|
@ -81,6 +81,11 @@ txMozillaTextOutput::endDocument(nsresult aResult)
|
||||
nsresult rv = mTextParent->AppendChildTo(text, true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// This should really be handled by nsIDocument::EndLoad
|
||||
MOZ_ASSERT(mDocument->GetReadyStateEnum() ==
|
||||
nsIDocument::READYSTATE_LOADING, "Bad readyState");
|
||||
mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_INTERACTIVE);
|
||||
|
||||
if (NS_SUCCEEDED(aResult)) {
|
||||
nsCOMPtr<nsITransformObserver> observer = do_QueryReferent(mObserver);
|
||||
if (observer) {
|
||||
@ -134,6 +139,10 @@ txMozillaTextOutput::createResultDocument(nsIDOMDocument* aSourceDocument,
|
||||
nsresult rv = NS_NewXMLDocument(getter_AddRefs(mDocument),
|
||||
aLoadedAsData);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
// This should really be handled by nsIDocument::BeginLoad
|
||||
MOZ_ASSERT(mDocument->GetReadyStateEnum() ==
|
||||
nsIDocument::READYSTATE_UNINITIALIZED, "Bad readyState");
|
||||
mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_LOADING);
|
||||
nsCOMPtr<nsIDocument> source = do_QueryInterface(aSourceDocument);
|
||||
NS_ENSURE_STATE(source);
|
||||
bool hasHadScriptObject = false;
|
||||
|
Loading…
Reference in New Issue
Block a user