Since this is checked only at startup, to ensure it propagates to all
content processes we have to ensure we shut down and restart all
preallocated or cached processes (though the process running the current
page won't restart)
Differential Revision: https://phabricator.services.mozilla.com/D76188
Since this is checked only at startup, to ensure it propagates to all
content processes we have to ensure we shut down and restart all
preallocated or cached processes (though the process running the current
page won't restart)
Differential Revision: https://phabricator.services.mozilla.com/D76188
We should check the nested iframe in the
ContentBlocking::ShouldAllowAccessFor(channel) as well. This patch
implements this.
Differential Revision: https://phabricator.services.mozilla.com/D77075
The moves all decisions to perform a process switch into the DocumentLoadListerner. This removes the unnecessary need to go via a content process to start the load.
Differential Revision: https://phabricator.services.mozilla.com/D76315
This is needed to prevent a failed attempt to create the task from blocking
out the ability to try again later if the two attempts are run under different
user contexts, where the second is more limited than the first, because the
less privileged attempt is unlikely to have permission to write to the folder
created by the more privileged one. In particular the MSI installer runs into
this scenario, because it makes one attempt to register the task as SYSTEM,
followed by a second attempt as the unelevated interactive user.
This is also nice because it keeps us from leaving an empty folder behind
under any circumstances, not just this specific situation.
Differential Revision: https://phabricator.services.mozilla.com/D77184
This unifies toolbarbutton-text and toolbarbutton-multiline-text. We now
always use toolbarbutton-text for the button's text, but can either use
textContent or the value attribute, depending on the value of the wrap
attribute. This reduces DOM size and consumer complexity, at the cost of
adding some logic to toolbarbutton.js itself.
Differential Revision: https://phabricator.services.mozilla.com/D76383
Exclude Windows Maintenance Service-related C++ code and avoid linking
with unnecessary libraries when building with --disable-maintenance-service.
Differential Revision: https://phabricator.services.mozilla.com/D76349
If EAF+ is enabled for firefox.exe, the process does not launch because we parse
the PE headers of ntdll.dll at startup, which is prohibited by EAF+.
With this patch, we skip two operations when EAF+ is enabled.
The first one is to cache ntdll's IAT at startup. Because EAF+ is expected to
prevent an injected module from parsing PE headers and modifying IAT, we can skip
this caching safely.
The second one is to load ntdll's debug information for the profiler. With this
patch, the profiler's callstack will not show a raw address instead of a symbol
name. It's a bad side effect, but much better than startup crash.
Differential Revision: https://phabricator.services.mozilla.com/D76959
There's no use case for stateful comparators, so they can be just plain
function pointers.
This is used in some hot places like CSS selector matching.
Differential Revision: https://phabricator.services.mozilla.com/D77084
In Bug 1622749 a user preference for where to open new documents (from a
service worker notification) was temporarily overriden in order to quickly fix
a crash that was happening in mozilla::dom::ClientOpenWindow. The crash was
ocurring when the pref "browser.link.open_newwindow" was set to 2, meaning new
documents are opened in a new window, instead of a new tab. The reason the
browser crashed is because the path for opening a new document is different
depending on the current user setting, and in NEWWINDOW case we did not get a
browsing context returned when calling mozilla::dom::OpenWindow which resulted
in a failed assertion.
The solution is to pass in a callback to mozilla::dom::OpenWindow as part of
nsOpenWindowInfo object, and invoke that callback with a corresponding
BrowsingContext in nsFrameLoader when that browsing context is ready.
After we call mozilla::dom::OpenWindow, we wait on a promise, that will be
resolved when the callback is invoked, before executing the rest of the code
that depends on the browsing context for a newly opened document being
available.
Differential Revision: https://phabricator.services.mozilla.com/D72745
With recent fixes that can properly identify whitelisted domains, whitelisted
domain suffixed, valid known public suffixes, and forcing to visit URI-like
strings that end with a slash, it's time to re-evaluate the URIFixup behavior.
Until now URIFixup considered everything a URI unless it had specific search
characteristics, this patch inverts that behavior.
The scope of this change is to improve the urlbar behavior as the main Search
Access Point, since that's the direction we're moving towards.
This lands with a temporary hidden feature pref browser.fixup.defaultToSearch,
that will be removed once the feature has been released.
Differential Revision: https://phabricator.services.mozilla.com/D76852
We ship the `mozIExtensionStorageArea` interface on Android, so that
GeckoView can eventually provide its own implementation, but not the
C++ glue for the XPCOM class...so we shouldn't be linking the bridge
into gkrust, either.
This commit also removes Rusqlite linking, since it's now linked in
via webext_storage_bridge => webext_storage => rusqlite.
Differential Revision: https://phabricator.services.mozilla.com/D75619
This removes all docshell nsISecureBrowserUI and mixed content properties, and moves them into CanonicalBrowsingContext/WindowGlobalParent. It makes the mixed content blocker just compute the state for the current load, and then send the results to the parent process, where we update the security state accordingly.
I think we could in the future remove onSecurityChange entirely, and instead just fire an event to the <browser> element notifying it of changes to the queryable securityUI.
Unfortunately we have a lot of existing code that depends on specific ordering between onSecurityChange and onLocationChange, so I had to hook into the RemoteWebProgress implementation in BrowserParent to mimic the same timings.
Differential Revision: https://phabricator.services.mozilla.com/D75447
Detect a profile for the installation, if found offer refresh on welcome page:
- Replace text
- Add help link and button
Add a different prompt to close the browser for refresh.
When leaving the welcome page:
- via help link, launch a URL
- via Refresh button, launch Firefox with the necessary args
Add utility functions to launch the link and Firefox.
Remove the UN_CONFIRM_CLICK label and hide the subheading, this was an
addition to the design. Move down UN_CONFIRM_PAGE_TITLE to fill in the space.
Move the check for the install-specific profile to common.nsh from stub.nsi,
wrapped in stack ops to save regs and with _MOZFUNC_UN for uninstaller compat.
Move InitHashAppModelId to just after un.UninstallUnOnInitCommon (which sets
$INSTDIR correctly), so AUMID would be available in un.PreWelcome. I don't
think there's anything else that would change $INSTDIR in the uninstaller
so this should be ok.
Unrelated but adjacent cleanup: Remove inappropriate use of _MOZFUNC_UN
in CopyPostSigningData.
Differential Revision: https://phabricator.services.mozilla.com/D76435
This removes all docshell nsISecureBrowserUI and mixed content properties, and moves them into CanonicalBrowsingContext/WindowGlobalParent. It makes the mixed content blocker just compute the state for the current load, and then send the results to the parent process, where we update the security state accordingly.
I think we could in the future remove onSecurityChange entirely, and instead just fire an event to the <browser> element notifying it of changes to the queryable securityUI.
Unfortunately we have a lot of existing code that depends on specific ordering between onSecurityChange and onLocationChange, so I had to hook into the RemoteWebProgress implementation in BrowserParent to mimic the same timings.
Differential Revision: https://phabricator.services.mozilla.com/D75447
This drops `followLinks` as 1) it has been no-op on UNIX for a long time and 2) its Windows implementation never had a proper symlink support.
Differential Revision: https://phabricator.services.mozilla.com/D75569
The z-index: initial for the keep-open class was redundant (see https://bugzilla.mozilla.org/show_bug.cgi?id=1640410#c4 ).
However, one more change was necessary to fix this bug: the .narrating class
gets z-index: 1 in narrate.css, in order to position the word highlights
below it. But the toolbar-container also gets z-index: 1, and because it
comes before the reader mode content in the DOM, its content will never
appear above the reader mode content unless it gets a higher z-index. So
we give it a z-index of 2.
Differential Revision: https://phabricator.services.mozilla.com/D76851
This implements reading the list from remote settings. We only read it at startup if necessary, or on add-on installation.
We do not check for updates - if something is removed, we'll wait until next startup before processing it.
Also adds lots of tests for canOverride as this seems a critical part to get right.
Differential Revision: https://phabricator.services.mozilla.com/D76473
This also requires removing the registry value cleanup from the unregister-task
command and adding a new uninstall command which removes both the task and the
registry values, because this patch now runs unregister-task during updates to
remove the task before re-adding it, and that needs to leave the registry alone.
Differential Revision: https://phabricator.services.mozilla.com/D76354
RemoteSettings helpfully falls back to loading from the JSON dumps when
the list of records is empty. This breaks tests that load an empty
blocklist, because unexpected records may appear.
Fix this by inserting a dummy value in the blocklist. Invalid records
should be ignored anyway, so this is a good way to prevent the dump from
being loaded.
Differential Revision: https://phabricator.services.mozilla.com/D76875