Closed Bug 1816740 Opened 1 year ago Closed 1 year ago

PFilePicker cleanup and modernization

Categories

(Core :: Widget: Win32, task)

task

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: rkraesig, Assigned: rkraesig)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

The FilePicker IPC protocol could use a bit of cleanup and modernization.

(This is for some largely uninteresting work already done in support of 1677170.)

Summary: Cleanup → PFilePicker cleanup and modernization

Some recently-created IPDL files have CRLFs rather than LFs. Convert
these.

No functional changes.

Convert the various result* constants in nsIFilePicker into a proper
enum, and perform validation when passing it across IPC.

Depends on D169851

Convert the various mode* constants in nsIFilePicker into a proper
enum, and perform validation when passing it across IPC.

Depends on D169852

Convert the various capture* constants in nsIFilePicker into a proper
enum, and perform validation when passing it across IPC.

Additionally, unlike the previous two enums, reduce the size of
CaptureTarget to 8 bits. This is a workaround for its use with
nsAttrValue, which at present very specifically requires that parseable
enums' values fit within an int16_t -- and a uint16_t does not.

Depends on D169853

The existing manual-deallocation code isn't actually doing anything
interesting. Strip it out.

(No functional changes.)

Depends on D169854

Attachment #9317739 - Attachment description: Bug 1816740 [1/5] - convert CRLF to LF in recent IPDL files r?handyman → Bug 1816740 [1/6] - convert CRLF to LF in recent IPDL files r?handyman

In the interest of keeping directory sizes down to a manageable level,
pull the new Windows utility-process geolocation code into its own
directory. (This is not yet an issue, but will become so as new
utility-process functionality is added.)

No functional changes.

Depends on D169851

Attachment #9317740 - Attachment description: Bug 1816740 [2/5] - convert nsIFilePicker::result* into a proper enum r?#ipc-reviewers → Bug 1816740 [3/6] - convert nsIFilePicker::result* into a proper enum r?#ipc-reviewers
Attachment #9317741 - Attachment description: Bug 1816740 [3/5] - convert nsIFilePicker::mode* into a proper enum r?#ipc-reviewers → Bug 1816740 [4/6] - convert nsIFilePicker::mode* into a proper enum r?#ipc-reviewers
Attachment #9317742 - Attachment description: Bug 1816740 [4/5] - convert nsIFilePicker::capture* to a proper enum r?#ipc-reviewers → Bug 1816740 [5/6] - convert nsIFilePicker::capture* to a proper enum r?#ipc-reviewers
Attachment #9317743 - Attachment description: Bug 1816740 [5/5] - remove ManualDealloc from ColorPicker and FilePicker r?#ipc-reviewers → Bug 1816740 [6/6] - remove ManualDealloc from ColorPicker and FilePicker r?#ipc-reviewers
Attachment #9317740 - Attachment description: Bug 1816740 [3/6] - convert nsIFilePicker::result* into a proper enum r?#ipc-reviewers → Bug 1816740 [3/6] - convert nsIFilePicker::result* into a proper enum r?#ipc-reviewers,karlt,mstange,handyman
Attachment #9317741 - Attachment description: Bug 1816740 [4/6] - convert nsIFilePicker::mode* into a proper enum r?#ipc-reviewers → Bug 1816740 [4/6] - convert nsIFilePicker::mode* into a proper enum r?#ipc-reviewers,karlt,mstange,handyman
Attachment #9317742 - Attachment description: Bug 1816740 [5/6] - convert nsIFilePicker::capture* to a proper enum r?#ipc-reviewers → Bug 1816740 [5/6] - convert nsIFilePicker::capture* to a proper enum r?#ipc-reviewers,karlt,mstange,handyman
Pushed by rkraesig@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f61a5d87ceca
[1/6] - convert CRLF to LF in recent IPDL files  r=handyman
https://hg.mozilla.org/integration/autoland/rev/2bbd544567af
[2/6] - move Windows geolocation actor to subdirectory  r=handyman
https://hg.mozilla.org/integration/autoland/rev/eda1bfa85458
[3/6] - convert nsIFilePicker::result* into a proper enum  r=ipc-reviewers,karlt,mstange,handyman,nika
https://hg.mozilla.org/integration/autoland/rev/1255c0424d56
[4/6] - convert nsIFilePicker::mode* into a proper enum  r=ipc-reviewers,karlt,mstange,handyman,nika
https://hg.mozilla.org/integration/autoland/rev/9c14c8be846a
[5/6] - convert nsIFilePicker::capture* to a proper enum  r=ipc-reviewers,karlt,mstange,handyman,nika
https://hg.mozilla.org/integration/autoland/rev/dab075577d74
[6/6] - remove ManualDealloc from ColorPicker and FilePicker  r=ipc-reviewers,nika
Pushed by martin@humanoids.be:
https://hg.mozilla.org/comm-central/rev/d10338c86a5e
Port Bug 1816740 - Convert nsIFilePicker::result* into a proper enum. rs=bustage-fix
Regressions: 1818500
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: