XSLTProcessor.transformToFragment behavior has changed
Categories
(Core :: XSLT, defect)
Tracking
()
People
(Reporter: brandon, Assigned: smaug)
References
Details
(Keywords: regression)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Steps to reproduce:
The XLSTProcessor.transformToFragment() function with the first parameter an element (not a document). It behaves differently than it did in Firefox 136.
A simple sample of this behavior can be seen at the following link:
https://jsfiddle.net/nuhgxskw/1/
Actual results:
The element itself submitted as the first parameter to transformToFragment cannot be found by XSLT template's match rule. In the provided jsfiddle, the template with match="root" is not applied.
(Note, documentElement here used is for illustrative purposes. A real web application passes elements from a middle of large XML. Cloning the element to a wrapper would also not be effective because of the content size.)
Expected results:
The template match="root" should be applied to match the passed element itself. That was the behavior of Firefox 136 and earlier. If this is a planned change, then it should be indicated in the documentation and release notes for Firefox 137: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/137
Comment 1•5 months ago
|
||
Could you use https://mozilla.github.io/mozregression/ to determine a regression range?
Reporter | ||
Comment 2•5 months ago
|
||
(In reply to Robert Longson [:longsonr] from comment #1)
Could you use https://mozilla.github.io/mozregression/ to determine a regression range?
My apologies for taking a few days to respond, I got the regression tool working and found some more detailed information. It appears that the change in behavior started with a nightly build that was published on February 5 2025, the build on Feb 4 works correctly. There are some more details about the test involving an "autoland" build, but I'm not familiar with that branch and not sure what information from it would be useful.
Pushlog link from the Feb 5 Nightly build: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=29c957dc0c6f710ef5e2471560a1f49e7c655db9&tochange=e96db7f2fc84bf31d8081316be884a96496fecb6
In the pushlog, I saw an entry by Peter Van der Beken to address Bug 1944313 (Propagate XSLT expression failure correctly). Could this be the the culprit for the change?
Updated•5 months ago
|
Comment 3•5 months ago
|
||
Andreas, you reviewed the patches for bug 1944313 so I am starting with you here. Thanks.
Updated•5 months ago
|
Reporter | ||
Comment 4•5 months ago
|
||
It looks like FF 137 has been released and this bug has been included. Are there any updates to share, or a timeline of when it can be addressed? Thank you.
Updated•5 months ago
|
Updated•5 months ago
|
Comment 6•5 months ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Comment 8•5 months ago
|
||
Do we know for sure whether this is a regression from bug 1941002 or bug 1944313? Those are both in the range in comment 2.
Assignee | ||
Comment 9•5 months ago
|
||
Farre gave me this regression range on Matrix
https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=a9bf095300363218d32bb301439f5971acf08328&tochange=a59f102fa3bb55a7a8208f34793b6ca611f566ab
Comment 10•5 months ago
|
||
Oh, great. Thanks.
Comment 11•4 months ago
|
||
This change appears to be what has broken our application too.
We aren't using transformToFragment, but transformToDocument seems to have the same bug too.
Comment 13•4 months ago
|
||
137.0.2 release notes say "Fixed functional regressions in our XSLT support introduced in 137." and point to this bug. Can anyone confirm?
Comment 14•4 months ago
|
||
Could you please confirm that this issue is fixed in 137.0.2? Thanks.
Comment 15•4 months ago
|
||
Yes, this issue has been fixed in 137.0.2
Comment hidden (offtopic) |
Comment hidden (offtopic) |
Comment 18•4 months ago
|
||
Please file a new XSLT bug for this issue and we can discuss it further there. Thanks.
Comment hidden (offtopic) |
Comment 20•4 months ago
|
||
I have created a new issue https://bugzilla.mozilla.org/show_bug.cgi?id=1961252
Updated•4 months ago
|
Description
•