Commit Graph
316 Commits
Author SHA1 Message Date
Emilio Cobos Álvarez c11da52187 Bug 1911768 - Add WinUtils::RegionToHRGN and WinUtils::ToWinRect. r=win-reviewers,rkraesig
Much like HRGNToRegion. This will be used to address some of the
comments on the patches for bug 1911763.

Differential Revision: https://phabricator.services.mozilla.com/D218629
2024-08-12 21:03:06 +00:00
Masayuki Nakano fb5048e05b Bug 1675847 - part 1: Rename eMouseClick and eMouseAuxClick r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D212999
2024-06-14 00:18:46 +00:00
Mike Conley 8598a64435 Bug 1503809 - Add an async version of FaviconHelper::ObtainCachedIconFile. r=rkraesig,win-reviewers
Unlike the original FaviconHelper::ObtainCachedIconFile, this new method does
all of its IO on the IO thread.

This also makes it so that the nsIJumpListBuilder exposes access to this
utility method over XPCOM.

Differential Revision: https://phabricator.services.mozilla.com/D203761
2024-06-12 17:41:19 +00:00
Norisz Fay 5c37a267a2 Backed out 4 changesets (bug 1503809) for causing xpcshell failures on test_JumpListBuilder_obtainAndCacheFaviconAsync.js CLOSED TREE
Backed out changeset 22bf63387696 (bug 1503809)
Backed out changeset 4d04db1983e3 (bug 1503809)
Backed out changeset ce0ff7d06ed4 (bug 1503809)
Backed out changeset 78b1a5e7ec1e (bug 1503809)
2024-06-06 00:55:03 +03:00
Mike Conley fb4ca591e4 Bug 1503809 - Add an async version of FaviconHelper::ObtainCachedIconFile. r=rkraesig,win-reviewers
Unlike the original FaviconHelper::ObtainCachedIconFile, this new method does
all of its IO on the IO thread.

This also makes it so that the nsIJumpListBuilder exposes access to this
utility method over XPCOM.

Differential Revision: https://phabricator.services.mozilla.com/D203761
2024-06-05 17:53:30 +00:00
acseh 57946aa87b Backed out 4 changesets (bug 1891063, bug 1894135) for causing regressions CLOSED TREE
Backed out changeset 4612b726c541 (bug 1894135)
Backed out changeset 717a883474be (bug 1891063)
Backed out changeset 1d666fbf5ef4 (bug 1891063)
Backed out changeset 24dc60b32e21 (bug 1891063)
2024-05-08 16:17:47 +03:00
Emilio Cobos Álvarez 20a35a4fc2 Bug 1891063 - Improve invalidation of top-level transparent windows. r=win-reviewers,rkraesig,handyman
This makes sure that the transparent area is cleared properly.

We move the clear to a point where Gecko has already informed us of
the opaque region for simplicity.

Differential Revision: https://phabricator.services.mozilla.com/D207302
2024-04-28 18:59:57 +00:00
Kagami Sascha Rosylight 721f97ef0c Bug 1834055 - Drop the hack to be too smart about mouse detection r=win-reviewers,handyman
Trying to see whether the system-reported mouse is a REAL mouse causes problem in certain situation with Wacom driver. The driver makes the system believe it has a pen while it still reports that the input device count is 1. Our heuristic thus thinks that the single device is not a real mouse but something else, which then breaks web compatibility with Twitter.

That hack was added by bug 1493128, but the capability report behavior change is already reverted with bug 1813979. Keeping this hack thus has no point as of now. This patch follows the comment: "We shouldn't assume we know better."

Differential Revision: https://phabricator.services.mozilla.com/D197813
2024-01-16 23:51:32 +00:00
Chris Martin 4b6831452c Bug 1866092 - Remove dead uses of HashURI and replace MD5 with SHA-256 r=win-reviewers,keeler,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D194391
2023-12-01 14:39:06 +00:00
Emilio Cobos Álvarez c1cbae5730 Bug 1863035 - Implement a native WinRegistry key. r=win-reviewers,rkraesig
Use it to implement nsIWindowsRegKey, and to replace existing native
callers like WinUtils and nsLookAndFeel.

Differential Revision: https://phabricator.services.mozilla.com/D192756
2023-11-20 10:08:09 +00:00
Emilio Cobos Álvarez d02e297b2d Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Edgar Chen b33a91a4e2 Bug 1851041 - Part 2: Add some log in DragService for debugging; r=rkraesig,win-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189625
2023-10-06 21:23:45 +00:00
Natalia Csoregi 3706a617b6 Backed out 3 changesets (bug 1851041) for causing bustage on nsClipboard.cpp. CLOSED TREE
Backed out changeset 5cb270a4e6b6 (bug 1851041)
Backed out changeset f6e5e427d8e8 (bug 1851041)
Backed out changeset 7c7228999e18 (bug 1851041)
2023-10-05 23:59:45 +03:00
Edgar Chen 7c11d58d7f Bug 1851041 - Part 2: Add some log in DragService for debugging; r=rkraesig,win-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189625
2023-10-05 18:46:13 +00:00
Masatoshi Kimura 1ffc0764f4 Bug 1852806 - Remove macros for older Windows SDK from widget/windows/. r=handyman
Depends on D188031

Differential Revision: https://phabricator.services.mozilla.com/D188032
2023-09-15 03:19:28 +00:00
Cosmin Sabou eab17df623 Backed out 15 changesets (bug 1852806) for causing mda failures on test_video_low_power_telemetry.html. CLOSED TREE
Backed out changeset faea1f4cb9a9 (bug 1852806)
Backed out changeset 4db93c374f9b (bug 1852806)
Backed out changeset 7e40e0e04921 (bug 1852806)
Backed out changeset b0a66c4269ce (bug 1852806)
Backed out changeset 4ff3545936f9 (bug 1852806)
Backed out changeset 02c0a8eb3fd6 (bug 1852806)
Backed out changeset ae2c7b33acfb (bug 1852806)
Backed out changeset 2b89ba254a1a (bug 1852806)
Backed out changeset dfa4f73fc548 (bug 1852806)
Backed out changeset daffcc4c1877 (bug 1852806)
Backed out changeset 33855bcdf15e (bug 1852806)
Backed out changeset 694f29707f3e (bug 1852806)
Backed out changeset 1891eda22a59 (bug 1852806)
Backed out changeset 1b854941389c (bug 1852806)
Backed out changeset 2f7cfe04be59 (bug 1852806)
2023-09-15 09:48:27 +03:00
Masatoshi Kimura 22c1cfabaa Bug 1852806 - Remove macros for older Windows SDK from widget/windows/. r=handyman
Depends on D188031

Differential Revision: https://phabricator.services.mozilla.com/D188032
2023-09-15 03:19:28 +00:00
Masatoshi Kimura fa37c18fa9 Bug 1849927 - Fix build error with WINVER >= 0x0A00 in widget/windows/. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D186749
2023-09-06 19:30:03 +00:00
Masatoshi Kimura e897957107 Bug 1845746 - Stop using DwmCompositionEnabled in widget/windows/. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D184715
2023-08-10 18:58:03 +00:00
Masatoshi Kimura a3e419385e Bug 1844908 - Remove pre-Win10-specific codepath from widget/. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D184307
2023-07-26 08:52:54 +00:00
Natalia Csoregi 42e803a2dd Backed out 19 changesets (bug 1844908) for causing win bustage on AvailableMemoryTracker.cpp. CLOSED TREE
Backed out changeset 44c66f2233cf (bug 1844908)
Backed out changeset a8010ff534bf (bug 1844908)
Backed out changeset 225dc3aeb220 (bug 1844908)
Backed out changeset a1414db64e33 (bug 1844908)
Backed out changeset 7f1e0a527839 (bug 1844908)
Backed out changeset 6dc7646d1ffa (bug 1844908)
Backed out changeset 8d715131510f (bug 1844908)
Backed out changeset 4b6fe8a4e7db (bug 1844908)
Backed out changeset 2b419fabf1e8 (bug 1844908)
Backed out changeset af84e701d616 (bug 1844908)
Backed out changeset 2fa203969ec5 (bug 1844908)
Backed out changeset 2b3d2df94db3 (bug 1844908)
Backed out changeset 7eca452f5fd7 (bug 1844908)
Backed out changeset 3d961cf25afe (bug 1844908)
Backed out changeset 3c59143f8dd7 (bug 1844908)
Backed out changeset ab50c6c5425a (bug 1844908)
Backed out changeset b2c5636df673 (bug 1844908)
Backed out changeset e9a0f1c6760c (bug 1844908)
Backed out changeset 945ccbedde0b (bug 1844908)
2023-07-25 19:55:35 +03:00
Masatoshi Kimura 4182954d50 Bug 1844908 - Remove pre-Win10-specific codepath from widget/. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D184307
2023-07-25 14:41:05 +00:00
Chris Martin 53d3cb8515 Bug 1813979 - Rewrite any-pointer media query logic and add to about:support r=handyman,mossop,flod
Differential Revision: https://phabricator.services.mozilla.com/D182901
2023-07-24 19:04:51 +00:00
Ray Kraesig 7720026432 Bug 1833450 - [3/4] Windows nsFilePicker: convert to use IPC-able Command structs r=gstoll,handyman
Convert `nsFilePicker` to use the `Command` structs introduced in the
first commit in this patchset. No functional changes -- this should be a
straight reorganization of internal code.

Additionally, remove from `WinUtils` the now-unused function
`GetShellItemPath`, whose functionality has been moved into `Command`'s
associated functions' translation unit. (This function was added to
WinUtils in 2012 as part of supporting the Windows Vista file picker
(bug 718374). It's not overtly filepicker-specific, but in the past
eleven years, no other code has ever used it.)

Differential Revision: https://phabricator.services.mozilla.com/D178204
2023-05-18 22:29:53 +00:00
Andrew Osmond 984ad6de08 Bug 1832469 - Backout recent changes to final patch resolution on Windows. r=cmartin
This patch backs out bug 1763978 for breaking resource:// loading on
Windows in certain circumstances. It isn't clear why this is happening
since all of the log evidence is showing that the paths are resolving
correctly, but we have verified that without the patch, the builds work
as expected.

We can reland the prior patch with updates once we understand the
problem. The prior patch was not critical so there is no urgency to
reuplift a fix.

Differential Revision: https://phabricator.services.mozilla.com/D177926
2023-05-12 17:23:17 +00:00
Ray Kraesig baf5a2b6b3 Bug 1832168 - [2/3] Consolidate temporary-window responsibilities r=emilio
Rather than having `nsWindow::GetNativeData()` sometimes (argument-
dependently) create a new resource and requiring its various callers to
destroy that resource, consolidate its creation and destruction into a
single external class.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D177567
2023-05-11 01:13:05 +00:00
Brayden S Pohl 204af933fc Bug 1805322: Remove unused InvalidatePluginAsWorkaround. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D176795
2023-05-02 20:41:29 +00:00
Andrew Osmond 8ae148879b Bug 1763978 - Fix resolving final paths on Windows with third party driver mount points. r=cmartin,mhowell
Some third party driver can create mount points without using the
Mount Manager. Without that, GetFinalPathNameByHandleW calls with
VOLUME_NAME_DOS cannot succeed. Instead we need to call it with
VOLUME_NAME_NT and convert the NT path to a DOS path using
QueryDosDevice to perform the mapping.

Prior to this patch, we would fail to load GMP plugins from
profiles mounted in a ramdisk, and potentially other situations.

See documentation for GetFinalPathNameByHandleW for more details:
https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew

Differential Revision: https://phabricator.services.mozilla.com/D174887
2023-05-02 16:39:54 +00:00
Stanca Serban 5e4f19deb3 Backed out changeset 43282679151a (bug 1805322) for EnumFirstChild related bustages. CLOSED TREE 2023-05-02 17:54:13 +03:00
Brayden S Pohl 1e717b6027 Bug 1805322: Remove unused InvalidatePluginAsWorkaround. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D176795
2023-05-02 12:39:34 +00:00
serge-sans-paille 71d5bc785e Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-04-01 08:31:12 +00:00
Cristian Tuns 29ebb2f54e Backed out 12 changesets (bug 1825325, bug 1825336, bug 1825333, bug 1825332, bug 1825324, bug 1824557, bug 1825328, bug 1825335, bug 1825330, bug 1825329, bug 1825327, bug 1825331) for causing build bustages in nsClipboard.cpp CLOSED TREE
Backed out changeset 9de3ed24d3a0 (bug 1825336)
Backed out changeset aef787728f19 (bug 1825335)
Backed out changeset a04c341244c1 (bug 1825333)
Backed out changeset e3ad15f762ba (bug 1825332)
Backed out changeset eed23da92a27 (bug 1825331)
Backed out changeset 8213bb54376e (bug 1825330)
Backed out changeset 747ec5ac4994 (bug 1825329)
Backed out changeset e91ff431f92d (bug 1825328)
Backed out changeset 59c18d13768b (bug 1825327)
Backed out changeset 538096d99e49 (bug 1825325)
Backed out changeset c76eb9d9b095 (bug 1825324)
Backed out changeset 8b81410eb686 (bug 1824557)
2023-03-31 12:58:53 -04:00
serge-sans-paille 1bf9d22652 Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Depends on D173637

Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-03-31 13:29:44 +00:00
Calixte eab2b9b49d Bug 1811303 - Make a pen usable to draw on a pdf on Windows r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D173425
2023-03-23 14:25:36 +00:00
Nika Layzell 1582a62a38 Bug 1542802 - Part 1: Replace LazyIdleThread with a thin wrapper around nsThreadPool, r=jesup,gstoll
This does not reduce the number of threads we end up using in these
cases, but simplifies the complex implementation substantially by
relying on the idle thread lifetime management logic from nsThreadPool.

The nsISerialEventTarget implementation is maintained by wrapping the
nsThreadPool with a TaskQueue.

As a result of using these more reliable backing implementations, the
type is now also safe to use from any thread, rather than requiring
dispatches to all occur from the creator thread.

Unfortunately, this required some changes to the
UntrustedModulesProcessor, which was relying on the ability to fetch the
PRThread* (and from that the HANDLE) from the lazy thread in order to
perform priority changes on it. This was fixed by using a
nsIThreadPoolListener to watch the thread being created and destroyed,
and manually record a HANDLE to the thread which can be used for these
priority changes.

Differential Revision: https://phabricator.services.mozilla.com/D168017
2023-03-02 15:52:32 +00:00
Csoregi Natalia d542110f53 Backed out changeset eafcabbf729b (bug 1542802) for causing Gtest crashes. CLOSED TREE 2023-02-03 00:03:53 +02:00
Nika Layzell b735298e12 Bug 1542802 - Replace LazyIdleThread with a thin wrapper around nsThreadPool, r=jesup,gstoll
This does not reduce the number of threads we end up using in these
cases, but simplifies the complex implementation substantially by
relying on the idle thread lifetime management logic from nsThreadPool.

The nsISerialEventTarget implementation is maintained by wrapping the
nsThreadPool with a TaskQueue.

As a result of using these more reliable backing implementations, the
type is now also safe to use from any thread, rather than requiring
dispatches to all occur from the creator thread.

Unfortunately, this required some changes to the
UntrustedModulesProcessor, which was relying on the ability to fetch the
PRThread* (and from that the HANDLE) from the lazy thread in order to
perform priority changes on it. This was fixed by using a
nsIThreadPoolListener to watch the thread being created and destroyed,
and manually record a HANDLE to the thread which can be used for these
priority changes.

Differential Revision: https://phabricator.services.mozilla.com/D168017
2023-02-02 19:43:31 +00:00
Makoto Kato 0318cb7065 Bug 1744687 - Part 3. Fix build error for newer Windows SDK. r=gsvelto
Now hal uses AR_STATE for screen orientation, so we should move it from
WinUtils.cpp to WinUtils.h for newer Windows 11 SDK.

Also, newer Windows SDK has to set WINVER to WIN8 to use auto rotation API.

Differential Revision: https://phabricator.services.mozilla.com/D163099
2022-11-25 15:13:43 +00:00
Makoto Kato 1e321d02ae Bug 1744687 - Part 1. Lock orientation backend for Windows Tablet. r=gsvelto
Since Windows tablet mode has a orientation lock API, this patch
implements orientation lock backend for Windows tablet mode.

`GetAutoRotationState` API recognizes whether orientation API is supported on
the device. So this fix uses this API to check orientation API capability.

Differential Revision: https://phabricator.services.mozilla.com/D162451
2022-11-24 15:10:15 +00:00
Greg Stoll 827d7a5fe3 Bug 1793834 - part 4/12: log window messages and expose entry point for retrieving them r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D161151
2022-11-22 03:44:52 +00:00
Cristian Tuns a695badda4 Backed out 10 changesets (bug 1793834, bug 1801724) for causing mochitest failures in browser_preferences_usage.js CLOSED TREE
Backed out changeset 89c9e4e1c3ad (bug 1801724)
Backed out changeset 9130ed00888e (bug 1793834)
Backed out changeset 34f582bdc341 (bug 1793834)
Backed out changeset c34df1dc8ff8 (bug 1793834)
Backed out changeset 2ae1429c886a (bug 1793834)
Backed out changeset a49eff0693ce (bug 1793834)
Backed out changeset 034466342a3b (bug 1793834)
Backed out changeset 2d19fa85af4e (bug 1793834)
Backed out changeset d16ff7dbd155 (bug 1793834)
Backed out changeset a39300a8ddff (bug 1793834)
2022-11-21 17:30:12 -05:00
Greg Stoll 95abea03a1 Bug 1793834 - part 4/12: log window messages and expose entry point for retrieving them r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D161151
2022-11-21 19:15:54 +00:00
Greg Stoll 826c69dad0 Bug 1788271 - Part 3: richer logging for a bunch of Windows messages r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D159199
2022-10-28 18:19:40 +00:00
Greg Stoll 36c0178215 Bug 1788271 - Part 2: set up utilities to log more info about Windows messages r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D159198
2022-10-28 18:19:40 +00:00
Greg Stoll 013f25b660 Bug 1788271 - Part 1: log some Windows messages before and after we process them r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D159197
2022-10-28 18:19:39 +00:00
Hiroyuki Ikezoe 10c67e9682 Bug 1787079 - Implement nsIDOMWindowUtils.setHiDPiMode and restoreHiDPIMode on Windows. r=rkraesig
And make the APIs available on debug builds.

To implement the APIs we used undocumented APIs published in
https://github.com/lihas/windows-DPI-scaling-sample .

Differential Revision: https://phabricator.services.mozilla.com/D156265
2022-09-15 10:13:14 +00:00
Sandor Molnar 3fb98e9aa8 Backed out 6 changesets (bug 1787079) for causing browser-chrome failures in layout/base/tests/browser_bug1787079.js CLOSED TREE
Backed out changeset b6075adb01a7 (bug 1787079)
Backed out changeset d5d0f8bb0be4 (bug 1787079)
Backed out changeset dce92508b5a3 (bug 1787079)
Backed out changeset 650f8d455e0e (bug 1787079)
Backed out changeset 1a9828bbf04b (bug 1787079)
Backed out changeset 3580b308ec59 (bug 1787079)
2022-09-14 06:13:39 +03:00
Hiroyuki Ikezoe fba99aaafc Bug 1787079 - Implement nsIDOMWindowUtils.setHiDPiMode and restoreHiDPIMode on Windows. r=rkraesig
And make the APIs available on debug builds.

To implement the APIs we used undocumented APIs published in
https://github.com/lihas/windows-DPI-scaling-sample .

Differential Revision: https://phabricator.services.mozilla.com/D156265
2022-09-14 01:15:54 +00:00
Emilio Cobos Álvarez a948427880 Bug 1775320 - WinContentSystemParameters is not needed. r=cmartin
It was needed before we had remote lookandfeel and non-native theme, but now we
no longer call any of the APIs in child processes.

Differential Revision: https://phabricator.services.mozilla.com/D149907
2022-06-22 18:03:01 +00:00
Gabriele Svelto 7c5e3a6fca Bug 1775117 - Fix Windows builds when using version 10.0.22621.0 of the Windows SDK r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D149868
2022-06-22 10:07:43 +00:00