Rob Wu ef46b7c595 Bug 1961064 - Fix order of windowUtils.addSheet r=emilio
When `addSheet` is used and `mStyleSetFilled` is true in
`Document::AddAdditionalStyleSheet`, then the stylesheets are appended
in the expected order.

When `mStyleSetFilled` is false, it is populated later via
`Document::FillStyleSet`, in `Document::FillStyleSetDocumentSheets`.
Before this patch (already since inception in bug 804120), the order was
reversed, which sometimes causes observably different results.

This patch fixes the issue by appending them in order.

Differential Revision: https://phabricator.services.mozilla.com/D248722
2025-05-13 01:50:31 +00:00
..