Closed Bug 2005124 Opened 11 months ago Closed 10 months ago

userContent.css is not loaded for profiles using XDG directories on Linux

Categories

(Core :: DOM: CSS Object Model, defect)

Firefox 147
defect

Tracking

()

RESOLVED DUPLICATE of bug 2011300

People

(Reporter: DeepChirp, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0

Steps to reproduce:

  1. Start Firefox 147 on Linux and create a new profile using the XDG directory layout (profile located under ~/.config/mozilla/firefox/...).
  2. In the new profile directory, create a folder named chrome.
  3. Inside that folder, create a file userContent.css with the following contents:
    @-moz-document domain("example.com") {
        body {
            background: red !important;
        }
    }
    
  4. In about:config, set:
    toolkit.legacyUserProfileCustomizations.stylesheets = true
    
  5. Restart Firefox.
  6. Open https://example.com.

Control experiment:
Create another profile using the legacy directory layout under ~/.mozilla/firefox/... and repeat the same steps.

Actual results:

  • When using an XDG-based profile (~/.config/mozilla/firefox/...), userContent.css is never loaded.
  • The background of example.com does not change.
  • DevTools Inspector shows no rules from userContent.css.
  • However, userChrome.css does work in the same XDG profile.

In contrast:

  • When using a legacy profile under ~/.mozilla/firefox/..., userContent.css works normally, and example.com turns red.

This indicates that only userContent.css fails under XDG, while userChrome.css loads correctly.

Expected results:

userContent.css should load normally in XDG-based profiles, just like in legacy profiles.

The background of example.com should become red, and the rules from userContent.css should appear in the Inspector.

The Bugbug bot thinks this bug should belong to the 'Toolkit::Startup and Profile System' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Startup and Profile System
Product: Firefox → Toolkit

:gerard-majax, since you are the author of the regressor, bug 259356, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(lissyx+mozillians)

Redirecting to Thinker, because I'm not working on that anymore

Flags: needinfo?(lissyx+mozillians) → needinfo?(thinker.li)

Could you provide the content of about:support?

Flags: needinfo?(thinker.li) → needinfo?(DeepChirp)
Attached file support.txt —
Flags: needinfo?(DeepChirp)

According to what is provided, userContent.css is loaded. Please check legacyUserStylesheets in the file .
One of differences between userContent.css and userChrome.css is userContent.css will be used in the content processes while userChrome.css should be used in the chrome/parent process. ~/.config/mozilla is denied by the sandbox broker. I am not sure if a content process is able to load it although ~/.config/mozilla/<profile>/chrome is read-only.

I'm sorry, I don't understand what you mean. I have already enabled toolkit.legacyUserProfileCustomizations.stylesheets. userChrome.css works, but userContent.css doesn't. However, when I use the old configuration path(~/.config/mozilla/<profile>/chrome), both work – even with the same file content. I don't know how else to troubleshoot this. Perhaps you could try to reproduce it locally.

The severity field is not set for this bug.
:mossop, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(dtownsend)
Severity: -- → S4
Flags: needinfo?(dtownsend)
Component: Startup and Profile System → DOM: CSS Object Model
Product: Toolkit → Core
Status: UNCONFIRMED → RESOLVED
Closed: 10 months ago
Duplicate of bug: 2011300
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: