Closed Bug 1363864 Opened 7 years ago Closed 6 years ago

Add MozBeforeInitialXULLayout event

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: zbraniecki, Assigned: zbraniecki)

References

Details

Attachments

(1 file, 1 obsolete file)

In bug 1347798 we're adding a small per-document JS code that enables DOM localization using the new API.

At the moment, we only translate the document on window.onready, but it may be better to do this before layout.
Attached patch mozbeforelayout.diff (obsolete) — Splinter Review
Depends on: 1347798
Blocks: 1347798
No longer depends on: 1347798
Could we call the events something like Before/AfterInitialLayout
Maybe even Before/AfterInitialXULLayout
Sure! I'm not even yet at the stage where I'd know if I need it. Just wanted to dump my patches into bugzilla.

If I'll get it on track to land I'll rename. Thanks :)
Priority: -- → P3
Blocks: 1365426
No longer blocks: 1347798
Assignee: nobody → gandalf
Blocks: 1415730
No longer blocks: 1365426
Status: NEW → ASSIGNED
Summary: Add MozBeforeLayout event → Add MozBeforeInitialXULLayout event
Attachment #8866504 - Attachment is obsolete: true
While profiling Preferences with Fluent we noticed that the localization is applied way too late[0], which brought me back to this event.

With this event we can trigger DOM localization right before layout  is started which prevents FOUCs.

[0] https://searchfox.org/mozilla-central/rev/c8e791091973825680bbba807fc1c4f5bda0f5a1/intl/l10n/l10n.js#17
Comment on attachment 8937210 [details]
Bug 1363864 - Add MozBeforeInitialXULLayout event.

https://reviewboard.mozilla.org/r/207930/#review213902
Attachment #8937210 - Flags: review?(bugs) → review+
Pushed by zbraniecki@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/16471f5143c7
Add MozBeforeInitialXULLayout event. r=smaug
https://hg.mozilla.org/mozilla-central/rev/16471f5143c7
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: