Closed Bug 1757647 Opened 2 years ago Closed 2 years ago

Use overlay scrollbars in Windows 11 if possible


(Core :: Widget: Win32, task)




99 Branch
Tracking Status
firefox99 --- fixed


(Reporter: emilio, Assigned: emilio)


(Blocks 1 open bug)



(2 files)

No description provided.
Assignee: nobody → emilio

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?


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
Simplify WindowsUIUtils tablet mode stuff. r=saschanaz
Implement Windows 11 overlay scrollbars. r=cmartin
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Blocks: 1757827
Regressions: 1758015
Blocks: 1758997
Blocks: 1761690
Regressions: 1816299
Regressions: 1823418
Depends on: 1804076
You need to log in before you can comment on or make changes to this bug.