Closed Bug 1467586 Opened 6 years ago Closed 6 years ago

Only load the <input type="time/date"> picker code when it's used

Categories

(Core :: Layout: Form Controls, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: Felipe, Assigned: Felipe)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxperf:p1])

Attachments

(2 files)

This code is loaded unconditionally in browser-content.js, but it could be instantiated only when used. Not only that, this feature is actually disabled by default, so we should skip loading it unless it's toggled on.
Summary: Only load the time picker code when it's used → Only load the <input type="time"> picker code when it's used
Comment on attachment 8984288 [details] Bug 1467586 - Part 0. hg cp the DateTimePickerListener object to a new file, and rename the DateTimePickerHelper. https://reviewboard.mozilla.org/r/250096/#review256776 Thanks!
Attachment #8984288 - Flags: review?(mconley) → review+
Comment on attachment 8984289 [details] Bug 1467586 - Convert the DateTimePickerListener object into a class to be instantiated when needed. https://reviewboard.mozilla.org/r/250098/#review256778 This is great! Assuming this passes the datetime picker mochitests, this looks good to go from me. Good work!
Attachment #8984289 - Flags: review?(mconley) → review+
I made a small change because I misunderstood the meaning of the pref. The pref only blocks the code for input type="time", but this code is also used for input type="date". So I moved the pref check back to its original location, and then just declared the object as a lazy proxy.
Summary: Only load the <input type="time"> picker code when it's used → Only load the <input type="time/date"> picker code when it's used
Pushed by felipc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5f8e35e87a21 Part 0. hg cp the DateTimePickerListener object to a new file, and rename the DateTimePickerHelper. r=mconley https://hg.mozilla.org/integration/autoland/rev/79476ed91dec Convert the DateTimePickerListener object into a class to be instantiated when needed. r=mconley
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: