Closed Bug 1757647 Opened 4 months ago Closed 4 months ago

Use overlay scrollbars in Windows 11 if possible

Categories

(Core :: Widget: Win32, task)

task

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

No description provided.

No need for it to use so much XPCOM.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

Put it behind a pref for nightly and early beta for now.

Depends on D139986

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)

Jamie, so this patch causes a lint failure like:

New calls to CoInitialize, CoInitializeEx, OleInitialize, RoInitialize, CoUninitialize, OleUninitialize, or RoUninitialize are forbidden. If you have questions, please consult a peer of the IPC: MSCOM module.

That comes from bug 1715650. Locally, it seems just removing that call works, but I want to confirm either that or adding the file to the whitelist works. This code runs on the parent process main thread only. Do we have the guarantee of COM stuff being initialized? I was following code like this (also main-thread, parent-process-only).

How should I proceed, should I remove the call, add it to the whitelist of files? Something else?

Thanks.

Flags: needinfo?(jteh)

You should remove the call. COM gets initialised in mscom::ProcessRuntime, which now happens very early in startup in mozglue. I'm assuming this new code happens much later than that, but if you do need COM initialised earlier, we'll need to move ProcessRuntime construction; we don't want other stuff initialising COM first.

Some older code does still call CoInitialize/RoInitialize, but that should be considered legacy, hence the whitelist.

As a side note, calling RoInitialize with RO_INIT_MULTITHREADED is an error here anyway because the parent process main thread is (and must be) a single threaded apartment (STA).

Flags: needinfo?(jteh)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d15ff6c47643
Simplify WindowsUIUtils tablet mode stuff. r=saschanaz
https://hg.mozilla.org/integration/autoland/rev/21553c91b278
Implement Windows 11 overlay scrollbars. r=cmartin
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Blocks: 1757827
Regressions: 1758015
Blocks: 1758997
Blocks: 1761690
You need to log in before you can comment on or make changes to this bug.