Commit Graph

167 Commits

Author SHA1 Message Date
Nicholas Rishel
c38ebcec1e Bug 1894865 - Concat nsStrings to avoid issues converting wide characters to char and back again. r=bytesized
Differential Revision: https://phabricator.services.mozilla.com/D210247
2024-05-21 02:37:10 +00:00
Sandor Molnar
0f4b2c2a80 Backed out changeset 6c952a8ea651 (bug 1894865) for causing build bustages @ browser/components/shell/nsWindowsShellServiceInternal.h CLOSED TREE 2024-05-20 22:06:06 +03:00
Nicholas Rishel
2e90f2e33e Bug 1894865 - Concat nsStrings to avoid issues converting wide characters to char and back again. r=bytesized
Differential Revision: https://phabricator.services.mozilla.com/D210247
2024-05-20 18:49:11 +00:00
Nipun Shukla
8fa18f7f5e Bug 1895744 - Implemented WRL StartupTask for MSIX launch on login r=nrishel
Differential Revision: https://phabricator.services.mozilla.com/D209718
2024-05-15 15:34:42 +00:00
Tamas Szentpeteri
833395877b Backed out 2 changesets (bug 1893341, bug 1895744) for causing bc failures in browser_windows_launch_on_login_msix.js. CLOSED TREE
Backed out changeset ce5384469c24 (bug 1893341)
Backed out changeset 658645fa9303 (bug 1895744)
2024-05-15 11:24:17 +03:00
Nipun Shukla
51e5f06d08 Bug 1895744 - Implemented WRL StartupTask for MSIX launch on login r=nrishel
Differential Revision: https://phabricator.services.mozilla.com/D209718
2024-05-15 02:54:55 +00:00
Butkovits Atila
99d0c239a5 Backed out 2 changesets (bug 1893458, bug 1890634) for causing bustages at TaskbarPinningMetricsTests.cpp. CLOSED TREE
Backed out changeset 29ad5906bfb0 (bug 1890634)
Backed out changeset bfcfe75b775a (bug 1893458)
2024-05-02 00:22:14 +03:00
Michael Hughes
92c041d105 Bug 1890634 - add telemetry for tab pinning r=nrishel
Differential Revision: https://phabricator.services.mozilla.com/D207789
2024-05-01 17:11:53 +00:00
Michael Hughes
e8f6c31e3d Bug 1893458 - attempt to fix tab pinning not working sometimes on the first time r=nalexander,nrishel
Differential Revision: https://phabricator.services.mozilla.com/D208669
2024-05-01 17:11:53 +00:00
Cristian Tuns
c784fd60cd Backed out 2 changesets (bug 1893458, bug 1890634) build bustages in Windows11TaskbarPinning.cpp CLOSED TREE
Backed out changeset fb9d21d9a3f9 (bug 1890634)
Backed out changeset 2a32d2f7aa06 (bug 1893458)
2024-04-29 14:01:41 -04:00
Michael Hughes
2ebe6702e6 Bug 1890634 - add telemetry for tab pinning r=nrishel
Differential Revision: https://phabricator.services.mozilla.com/D207789
2024-04-29 17:06:08 +00:00
Michael Hughes
1cfd97def2 Bug 1893458 - attempt to fix tab pinning not working sometimes on the first time r=nalexander,nrishel
Differential Revision: https://phabricator.services.mozilla.com/D208669
2024-04-29 17:06:07 +00:00
Michael Hughes
3cdd7caa11 Bug 1879975 - Newer versions of Windows disable pinning to the taskbar using older methods r=mpohle,bhearsum,nrishel,glandium,nalexander
This is adding in the new Windows 11 only version of taskbar pinning. For the new pinning to work, we need to use limited access feature tokens. Those are going to be made private and aren't included with this change.
This change will compile, and will work if built against the correct limited access feature tokens, as specified in developer local machine config files, but for every other build, the new taskbar pinning won't work and will fall back to the old methods.
I will implement the try / release building machines using the secret limited access feature tokens in a follow-up diff.

Differential Revision: https://phabricator.services.mozilla.com/D205004
2024-04-22 23:07:37 +00:00
Aron Cseh
f54720ca9c Backed out 4 changesets (bug 1879975) for causing l10n bustages CLOSED TREE
Backed out changeset 280d7a1f6adc (bug 1879975)
Backed out changeset 5f362eae55c5 (bug 1879975)
Backed out changeset cfc40111608f (bug 1879975)
Backed out changeset af2eee38668d (bug 1879975)
2024-04-18 16:41:31 +03:00
Michael Hughes
9acb5439c1 Bug 1879975 - Newer versions of Windows disable pinning to the taskbar using older methods r=mpohle,bhearsum,nrishel,glandium
This is adding in the new Windows 11 only version of taskbar pinning. For the new pinning to work, we need to use limited access feature tokens. Those are going to be made private and aren't included with this change.
This change will compile, and will work if built against the correct limited access feature tokens, as specified in developer local machine config files, but for every other build, the new taskbar pinning won't work and will fall back to the old methods.
I will implement the try / release building machines using the secret limited access feature tokens in a follow-up diff.

Differential Revision: https://phabricator.services.mozilla.com/D205004
2024-04-17 17:51:58 +00:00
Cristina Horotan
97caeefa9b Backed out 3 changesets (bug 1879975) for causing Valgrind failure. CLOSED TREE
Backed out changeset 5eee9358d22a (bug 1879975)
Backed out changeset d9a53dc2478c (bug 1879975)
Backed out changeset e04956da20c6 (bug 1879975)
2024-04-17 04:03:42 +03:00
Michael Hughes
b3d5513f8f Bug 1879975 - Newer versions of Windows disable pinning to the taskbar using older methods r=mpohle,bhearsum,nrishel,glandium
This is adding in the new Windows 11 only version of taskbar pinning. For the new pinning to work, we need to use limited access feature tokens. Those are going to be made private and aren't included with this change.
This change will compile, and will work if built against the correct limited access feature tokens, as specified in developer local machine config files, but for every other build, the new taskbar pinning won't work and will fall back to the old methods.
I will implement the try / release building machines using the secret limited access feature tokens in a follow-up diff.

Differential Revision: https://phabricator.services.mozilla.com/D205004
2024-04-16 23:21:24 +00:00
Natalia Csoregi
c300e2cb7e Backed out 3 changesets (bug 1879975) for causing bustage while fetching windows-laf-tokens.data CLOSED TREE
Backed out changeset 5e5bc998487f (bug 1879975)
Backed out changeset be268309f0f7 (bug 1879975)
Backed out changeset b2f6d0289dc6 (bug 1879975)
2024-04-12 23:55:45 +03:00
Michael Hughes
9694eff990 Bug 1879975 - Newer versions of Windows disable pinning to the taskbar using older methods r=mpohle,bhearsum,nrishel,glandium
This is adding in the new Windows 11 only version of taskbar pinning. For the new pinning to work, we need to use limited access feature tokens. Those are going to be made private and aren't included with this change.
This change will compile, and will work if built against the correct limited access feature tokens, as specified in developer local machine config files, but for every other build, the new taskbar pinning won't work and will fall back to the old methods.
I will implement the try / release building machines using the secret limited access feature tokens in a follow-up diff.

Differential Revision: https://phabricator.services.mozilla.com/D205004
2024-04-12 20:19:10 +00:00
Sandor Molnar
910a3e9301 Backed out 3 changesets (bug 1879975) for causing build bustages @ browser/components/shell/Windows11LimitedAccessFeatures.h CLOSED TREE
Backed out changeset 59dafb79d2be (bug 1879975)
Backed out changeset e51e76ec89c5 (bug 1879975)
Backed out changeset 9bcec32fe1ac (bug 1879975)
2024-04-11 00:41:59 +03:00
Michael Hughes
4a6f7586b4 Bug 1879975 - Newer versions of Windows disable pinning to the taskbar using older methods r=mpohle,bhearsum,nrishel
This is adding in the new Windows 11 only version of taskbar pinning. For the new pinning to work, we need to use limited access feature tokens. Those are going to be made private and aren't included with this change.
This change will compile, and will work if built against the correct limited access feature tokens, as specified in developer local machine config files, but for every other build, the new taskbar pinning won't work and will fall back to the old methods.
I will implement the try / release building machines using the secret limited access feature tokens in a follow-up diff.

Differential Revision: https://phabricator.services.mozilla.com/D205004
2024-04-10 21:17:20 +00:00
Natalia Csoregi
5a1ef8dfcb Backed out 3 changesets (bug 1879975) for causing valgrind bustages. CLOSED TREE
Backed out changeset e66749b7e244 (bug 1879975)
Backed out changeset c3ab151d75bd (bug 1879975)
Backed out changeset f9aa23ba9fde (bug 1879975)
2024-04-10 10:13:21 +03:00
Michael Hughes
406e488c90 Bug 1879975 - Newer versions of Windows disable pinning to the taskbar using older methods r=mpohle,bhearsum,nrishel
This is adding in the new Windows 11 only version of taskbar pinning. For the new pinning to work, we need to use limited access feature tokens. Those are going to be made private and aren't included with this change.
This change will compile, and will work if built against the correct limited access feature tokens, as specified in developer local machine config files, but for every other build, the new taskbar pinning won't work and will fall back to the old methods.
I will implement the try / release building machines using the secret limited access feature tokens in a follow-up diff.

Differential Revision: https://phabricator.services.mozilla.com/D205004
2024-04-10 05:19:20 +00:00
Michael Hughes
0708cf0525 Bug 1863636 - mochi tests for filename validation to prevent callers of new functions from creating bad file paths r=nshukla,gstoll
Added in mochi tests to validate that the C++ filename validation for taskbar tab shortcut paths works.

Differential Revision: https://phabricator.services.mozilla.com/D199689
2024-01-29 22:26:21 +00:00
Michael Hughes
93d767ccf4 Bug 1863636 - adding filename validation to prevent callers of new functions from creating bad file paths r=nshukla,gstoll
As per comments on this diff about getTaskbarTabShortcutPath () I added validation on the C++ side to ensure that the shortcut name passed in can be used as a filename. Tested the changes in the browser console window and confirmed that regular names "abcd" work and confirmed that bad names ("..\\something", ".\\s", ".s", "some?") failed and generated an exception in Javascript.

Differential Revision: https://phabricator.services.mozilla.com/D199590
2024-01-26 00:10:40 +00:00
Nipun Shukla
21b3aee479 Bug 1863636 - Part 2: Added native code changes for taskbar tabs r=win-reviewers,mhughes,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D197342
2024-01-22 22:00:13 +00:00
Narcis Beleuzu
f9b3d057ab Backed out changeset f83bd0235854 (bug 1863636) for causing Bug 1875554 2024-01-22 12:52:17 +02:00
Nipun Shukla
42f11d9ee3 Bug 1863636 - Part 2: Added native code changes for taskbar tabs r=win-reviewers,mhughes,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D197342
2024-01-19 20:58:16 +00:00
Nipun Shukla
1c8adb5195 Bug 1872543 - Fixed tab freeze due to getLaunchOnLoginShortcuts r=nalexander,mhughes
Differential Revision: https://phabricator.services.mozilla.com/D197590
2024-01-03 22:59:55 +00:00
Nipun Shukla
b211acfaed Bug 1870852 - Fixed about:welcome pinning regression r=mhughes
Differential Revision: https://phabricator.services.mozilla.com/D196897
2023-12-20 18:13:30 +00:00
Nipun Shukla
dd8b73c28c Bug 1860271 - Resolved launch on login checkbox and infobar bugs when user created Startup shortcut exists r=nalexander,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D191763
2023-12-12 00:22:08 +00:00
Sandor Molnar
2313150db4 Backed out changeset 677c3005fd69 (bug 1860271) for causing node newtab failures at browser/components/newtab CLOSED TREE 2023-12-11 23:31:08 +02:00
Nipun Shukla
c334dcfcd7 Bug 1860271 - Resolved launch on login checkbox and infobar bugs when user created Startup shortcut exists r=nalexander,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D191763
2023-12-11 20:59:45 +00:00
Nipun Shukla
12d6b22518 Bug 1863636 - Folded shortcut creation required for taskbar tabs into nsWindowsShellService r=mhughes
Differential Revision: https://phabricator.services.mozilla.com/D192998
2023-11-20 16:26:03 +00:00
Nick Alexander
5a2079d68e Bug 1818418 - Use reg.exe to implement MSIX 1-click set-to-default. r=mhughes
This approach uses `reg.exe` to delete and recreate the relevant HKCU
registry key-value pairs.

Differential Revision: https://phabricator.services.mozilla.com/D170717
2023-11-04 22:58:30 +00:00
Noemi Erli
41830fefad Backed out changeset 45ab2db62a65 (bug 1818418) for causing bustages in WindowsUserChoice.h 2023-11-04 11:07:26 +02:00
Nick Alexander
028ad01c21 Bug 1818418 - Use reg.exe to implement MSIX 1-click set-to-default. r=mhughes
This approach uses `reg.exe` to delete and recreate the relevant HKCU
registry key-value pairs.

Differential Revision: https://phabricator.services.mozilla.com/D170717
2023-11-04 02:49:46 +00:00
Butkovits Atila
5ebcfd01ff Backed out changeset e0f1fa408c70 (bug 1818418) for causing bustages at WindowsUserChoice.cpp. CLOSED TREE 2023-11-04 02:00:16 +02:00
Nick Alexander
644f3b8048 Bug 1818418 - Use reg.exe to implement MSIX 1-click set-to-default. r=mhughes
This approach uses `reg.exe` to delete and recreate the relevant HKCU
registry key-value pairs.

Differential Revision: https://phabricator.services.mozilla.com/D170717
2023-11-03 22:48:57 +00:00
Masatoshi Kimura
c2dc436126 Bug 1845057 - Remove aClaimAllTypes from setDefaultBrowser. r=nrishel,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189678
2023-10-02 16:56:42 +00:00
Masatoshi Kimura
f90f9c3b98 Bug 1844908 - Remove pre-Win10-specific codepath from browser/components/shell/. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D184288
2023-07-26 08:52:50 +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
c8495cb77e Bug 1844908 - Remove pre-Win10-specific codepath from browser/components/shell/. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D184288
2023-07-25 14:41:01 +00:00
Nipun Shukla
d062988466 Bug 1787552 - Added check to see if taskbar pin already exists before pinning in PinCurrentAppToTaskbarWin10 r=nrishel
Differential Revision: https://phabricator.services.mozilla.com/D180378
2023-06-12 22:13:53 +00:00
Ben Hearsum
d55c5704d1 Bug 1794017: improve shortcut detection of existing shortcuts in windows shell service r=bytesized
The current shortcut detection was good enough for a long while -- it was mainly used for Telemetry purposes, and installer created shortcuts were almost always created anyways -- so both the rate of mismatches and the consequences of them were fairly low. This changed when we implemented Private taskbar pinning, most notably because when we're creating Private Browsing shortcuts in the installer (which we ought to do to work around various Windows bugs), we end up with 2 strings for the shortcut names (one for the installer, one for the browser).

The other thing that has changed since this was originally implemented is that all of those code has moved off of the main thread -- so it is less perf-sensitive than it was before.

With these two things in mind, making our shortcut detection much more accurate seems like the right thing to do. There's still rare cases (noted in the original comments) where it could be wrong -- but with this change we no longer rely on the file name, which can very easily be wrong for a number of reasons.

This also includes a fix for a bug I introduced in https://bugzilla.mozilla.org/show_bug.cgi?id=1789974 that caused pinning not to work if a shortcut needed to be created at pinning time (unlikely except in zip builds, but still needs to be fixed).

Differential Revision: https://phabricator.services.mozilla.com/D158799
2022-10-11 14:02:57 +00:00
Ben Hearsum
942df42ed0 Bug 1787121: write runtime shortcuts log in UTF-16LE encoding r=bytesized
It turns out that the INI parser used by NSIS only supports UTF-16LE encoding. Our INI parser doesn't support UTF-16 at all, so we need to a bit of work ourselves to write this file correctly.

Differential Revision: https://phabricator.services.mozilla.com/D157378
2022-09-28 13:17:41 +00:00
Ben Hearsum
89c064c808 Bug 1791981: guard against null dereference in Windows 7 taskbar pinning code r=bytesized
Differential Revision: https://phabricator.services.mozilla.com/D158140
2022-09-26 16:30:56 +00:00
Ben Hearsum
318c01c3b8 Bug 1789974: Fix shortcut creation when pinning to taskbar r=bytesized
In the recent refactor of this (https://bugzilla.mozilla.org/show_bug.cgi?id=1782295) I managed to break our ability to create shortcuts if they don't already existed. This was caused by two things:
1) An errant `NS_SUCCEEDED` call remained after the call it was checking moved elsewhere (oops)
2) The taskbar pinning code was not updated to set the shortcut file path (required after the refactor).

This patches fixes both of those issues. Note that all the directory service interaction is done on the main thread, because the actual function doing the work is on a background thread, and the directory service does not work there.

Differential Revision: https://phabricator.services.mozilla.com/D156993
2022-09-12 18:45:33 +00:00
Ben Hearsum
ae24a5eb11 Bug 1789991: correctly detect existing private browsing shortcuts r=bytesized
This was an oversight during the original implementation in bug 1761291. I updated the code that creates shortcuts there, but not the code that looks at existing ones.

Differential Revision: https://phabricator.services.mozilla.com/D156992
2022-09-12 18:45:32 +00:00
Ben Hearsum
3ea2839fc7 Bug 1789991: use a distinct string for in-product shortcut names r=nalexander,flod
In days of old, it was safe to use -brand-short-name for this, as it always lined up with the installer's concept of BrandShortName. This changed when https://bugzilla.mozilla.org/show_bug.cgi?id=1378834 landed -- which started using "Firefox Nightly" for the nightly branding BrandShortName in the installer (but maintained "Nightly" as the in-product -brand-short-name). Changing one or the other of these is not really a viable option:

- Changing the installer's BrandShortName for Nightly to match -brand-short-name would cause shortcuts to simply be called "Nightly" -- which is the opposite of what the aforementioned bug wanted
- Changing -brand-short-name would cause a number of in-product strings to start using "Firefox Nightly" instead of "Nightly" -- which is probably undesirable for a few reasons, not the least of which is possible l10n implications

For these reasons, and the relatively short timeline I have to fix this, I'm taking the simplest and easiest path of introducing a new string specifically for in-product shortcut names, which lines up with the installer's values for BrandShortName. (We perhaps should also separate this out in the installer -- but it's unnecessary here, so I did not go to the trouble.)

Differential Revision: https://phabricator.services.mozilla.com/D156991
2022-09-12 18:39:19 +00:00