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

RESOLVED FIXED in Firefox 66

Status

()

enhancement
P3
normal
RESOLVED FIXED
Last year
5 months ago

People

(Reporter: emilio, Assigned: emilio)

Tracking

(Blocks 2 bugs)

unspecified
mozilla66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(1 attachment)

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
Assignee

Comment 3

5 months ago

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)
Assignee

Comment 4

5 months ago

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,
    probably).

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.

Comment 5

5 months ago
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e902aece9ed7
Move the lang font prefs to Document instead of nsPresContext. r=jfkthame

Comment 6

5 months ago
bugherder
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.