Closed Bug 1430623 Opened 6 years ago Closed 5 years ago

Make the lang font prefs stuff work without a pres context.


(Core :: CSS Parsing and Computation, enhancement, P3)




Tracking Status
firefox66 --- fixed


(Reporter: emilio, Assigned: emilio)


(Blocks 2 open bugs)



(1 file)

Right now they're cached in nsPresContext, in a linked list. It'd be nice if instead they would be cached either globally (too?), or initializing the LangFontGroupPrefs on the stack (or moving them to the document, I guess).

This isn't prioritary because I'm focusing on the work needed to get Shadow DOM stylesheets to be sound, and this is not needed for that, but it will be needed to fix bug 548397.
Jonathan, any strong preference here?

I'm going to need to move other stuff from nsPresContext to nsIDocument, like link colors, default backgrounds, etc, but wanted to check since this is a bit bigger.
(see comment 1, whoops)
Flags: needinfo?(jfkthame)
Priority: -- → P3
Blocks: 1471231

I wrote patches instead, since this is the only thing that I cannot work around to fix bug 1490401.

Assignee: nobody → emilio
Blocks: 1490401
Flags: needinfo?(jfkthame)

This will allow me to (in different patches):

  • Make the default style structs constructible without a pres context (default
    color and co. would need to be faked or moved to Document as well, but that's
    ok, since those cannot affect media queries, the default font-size does).

  • Remove the nsPresContext pointer from ComputedStyle (moving it to nsFrame,

That would in turn allow me to have the default style computed without a pres
context, which allows us to fix both bug 1490401 and bug 1471231.

Pushed by
Move the lang font prefs to Document instead of nsPresContext. r=jfkthame
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.