mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1243337: Indicate the correct context for the generate-id function. r=peterv
This commit is contained in:
parent
dec8f6e7f4
commit
3919f82ff1
3
dom/xslt/crashtests/1243337.xml
Normal file
3
dom/xslt/crashtests/1243337.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" standalone="yes" ?>
|
||||
<?xml-stylesheet type="text/xsl" href="1243337.xsl" ?>
|
||||
<root/>
|
6
dom/xslt/crashtests/1243337.xsl
Normal file
6
dom/xslt/crashtests/1243337.xsl
Normal file
@ -0,0 +1,6 @@
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:template match="/">
|
||||
<xsl:value-of select="generate-id(5)"/>
|
||||
<html><body/></html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@ -17,3 +17,4 @@ load 603844.html
|
||||
load 667315.xml
|
||||
load 1089049.html
|
||||
load 1205163.xml
|
||||
load 1243337.xml
|
||||
|
@ -41,7 +41,7 @@ GenerateIdFunctionCall::evaluate(txIEvalContext* aContext,
|
||||
static_cast<txExecutionState*>(aContext->getPrivateContext());
|
||||
if (!es) {
|
||||
NS_ERROR(
|
||||
"called xslt extension function \"current\" with wrong context");
|
||||
"called xslt extension function \"generate-id\" with wrong context");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
@ -92,6 +92,10 @@ GenerateIdFunctionCall::getReturnType()
|
||||
bool
|
||||
GenerateIdFunctionCall::isSensitiveTo(ContextSensitivity aContext)
|
||||
{
|
||||
if (aContext & PRIVATE_CONTEXT) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mParams.IsEmpty()) {
|
||||
return !!(aContext & NODE_CONTEXT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user