Open Bug 2087763 Opened 29 days ago Updated 10 days ago

With XSLT disabled, an XML document with a CSS xml-stylesheet PI before an XSLT one renders blank and never finishes loading

Categories

(Core :: XSLT, defect)

defect

Tracking

()

Tracking Status
firefox-esr115 --- unaffected
firefox-esr153 --- unaffected
firefox159 --- disabled
firefox160 --- disabled
firefox161 --- disabled
firefox162 --- disabled
firefox163 --- disabled

People

(Reporter: zcorpan, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

With dom.xslt.enabled set to false, an XML document with a CSS xml-stylesheet PI followed by an XSLT one renders blank, and load never fires: document.readyState stays "interactive" (I waited 30s). With the PIs in the other order, or with XSLT enabled, the CSS applies and the page loads.

Steps:

  1. Set dom.xslt.enabled to false.
  2. Serve these over HTTP and load test.xml with an empty cache (e.g. a new profile):

test.xml:

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="c.css"?>
<?xml-stylesheet type="text/xsl" href="s.xsl"?>
<root>raw</root>

c.css:

root { color: red }

When c.css is already cached, the page loads.

The CSS PI clears mPrettyPrintXML (nsXMLContentSink.cpp#L1209-L1212), and the disabled XSLT PI after it sets it again in MaybeProcessXSLTLink (#L754-L755), added in bug 2048182. The || is needed there because every xml-stylesheet PI (and a Link header) clears mPrettyPrintXML first, but it also undoes the clearing from the earlier CSS PI. Maybe it should only undo the clearing for the XSLT PI or header itself?

Firefox Nightly 161.0a1 (2026-10-30), macOS, headless via geckodriver. Found while testing the XSLT polyfill extension with XSLT disabled; the extension isn't needed to reproduce.

Set release status flags based on info from the regressing bug 2048182

:farre, since you are the author of the regressor, bug 2048182, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(afarre)
Severity: -- → S3
Flags: needinfo?(afarre)

Set release status flags based on info from the regressing bug 2048182

Set release status flags based on info from the regressing bug 2048182

You need to log in before you can comment on or make changes to this bug.