Pending figuring out how we want to block autoplay of WebAudio content, we
should just not block it by default for the initial release of block autoplay,
and follow up once we've figured out how to not break the web.
MozReview-Commit-ID: ClfdrHcugLs
--HG--
extra : rebase_source : 54f61b0765f1d0ed9c754c90da9c2809a7de8676
Right now consumers can't know when the parent process has finished talking
to the permission manager. It would be nice to enable consumers to depend
on the status of the asynchronous task using a promise.
Right now consumers can't know when the parent process has finished talking
to the permission manager. It would be nice to enable consumers to depend
on the status of the asynchronous task using a promise.
At some point, either bindgen will begin generating not-related-to-Stylo
things or we will start using bindgen in multiple places. Either way,
the references to Stylo should go away.
This patch applies the following changes to the storage.local data migration behaviors:
- An about:config preference is set when an extension has been migrated successfully to the
storage.local IndexedDB backend (cleared automatically if the addon is uninstalled).
- If the above about:config preference is set, the storage.local IndexedDB backend is enabled
without attempting to open an IndexedDB connection for the new backend.
- While migrating an extension, if we fail to open the IndexedDB connection, the data migration
is cancelled and the storage.local API is going to fallback to the storage.local JSONFile backend
(until the next extension startup, when a new data migration is going to be tried).
- When a migration is completed successfully, the old JSONFile is renamed (by appending ".migrated"
to its original file name) instead of being removed.
MozReview-Commit-ID: LPM0fQUagTd
--HG--
extra : rebase_source : 11c3e291ac8323a679c2bb29efc7df3700023591
The new "tooltip.css" file allows styling the default tooltip, which is created as native anonymous content.
MozReview-Commit-ID: ADWsFTNPfhw
--HG--
rename : toolkit/themes/linux/global/popup.css => toolkit/themes/linux/global/tooltip.css
rename : toolkit/themes/osx/global/popup.css => toolkit/themes/osx/global/tooltip.css
rename : toolkit/themes/windows/global/popup.css => toolkit/themes/windows/global/tooltip.css
extra : rebase_source : bd79b86fb44ac0dc77d0d21fdc003105da6f43eb
extra : intermediate-source : a06a200098013d5dbc42c2431f845ca1dd8b0b76
extra : source : 4d511f7fc5b5c16fdfea91242dea6086cd57c8c3
This also registers the locale through the build system and browser glue since
it's the first ftl file in toolkit/.
MozReview-Commit-ID: 7XDqKmVU0vh
--HG--
extra : rebase_source : b179e78554f667fdaf3c3fc32a020a8c176b5021
Believe it or not, the memory these references hold alive is significant.
Nulling them out saves 5-10K per process.
MozReview-Commit-ID: JONjE48yE8I
--HG--
extra : rebase_source : 49adc538070eecb9183e6e052e6e43db9c4c7a99
extra : histedit_source : 699f49fad1bfa69b8c511bf96187096e751c8606
I initially tried to avoid this, but decided it was necessary given the number
of times I had to repeat the same pattern of casting a variable to void*, and
then casting it back in a part of code far distant from the original type.
This changes our preference callback registration functions to match the type
of the callback's closure argument to the actual type of the closure pointer
passed, and then casting it to the type of our generic callback function. This
ensures that the callback function always gets an argument of the type it's
actually expecting without adding any additional runtime memory or
QueryInterface overhead for tracking it.
MozReview-Commit-ID: 9tLKBe10ddP
--HG--
extra : rebase_source : 7524fa8dcd5585f5a31fdeb37d95714f1bb94922
Similar to the previous part, we convert mBreakpadId to an nsCString to
avoid issues with locale-dependent std::string operations.
There are a lot of non-profiler changes here because a bunch of things
depend on the SharedLibrary object that the profiler defines.
Using operator<< on stringstream on Windows dives into the registry for
locale-specific formatting details. This behavior is neither desired
or (probably) anticipated by the code. Instead, let's use our normal
Gecko string classes for SharedLibrary::mVersion.
Use the fact that a JobIntentService is still a Service to keep most of the
previous implementation and method of starting CrashReportingService.
On 26+ devices it will be called with "start-foreground-service".
This ensures it can be started even from background and the crash reporting
process would work as before but ActivityManager will post an ANR error to
logcat after 5 seconds because we aren't calling Service.startForeground()
(which would mean a user visible notification).
Will use different Job Ids depending on if the app is Firefox Release or
Firefox Beta.
The Job Id will be passed to GeckoThread when first initializing and then be
made available to CrashHandler and nsExceptionHandler.cpp to be sent in the
Intent that starts the CrashReporterService.
MozReview-Commit-ID: GATl6Waa9St
--HG--
extra : amend_source : 70bc130b9411df336181e825ebb3e19bdc5a778c
This test was testing that files are loaded/executed/etc in the page, but
what we really care about is that the webrequest api works. Other tests
are responsible for stuff like css and js actually work. The patch does
maintain (fixed) the js test, but removes the css test for lack of a good
way to properly wait for css to apply.
MozReview-Commit-ID: B2uByaxNeK2
--HG--
extra : rebase_source : 6779116f9f1a4a7ce24cd32c3648d1027343db93
This patch addresses an issue with Firefox's proxy detection on networks which
do not have their a proxy auto-configuration (PAC) file hosted at
http://wpad/wpad.dat, and instead make use of DHCP option 252 for broadcasting
the address of the PAC file. See https://findproxyforurl.com/wpad-introduction/
for an introduction to the protocol.
Prior to this patch, proxy auto-detect missed out the DHCP query stage, and just
looked for a PAC file at http://wpad/wpad.dat
This patch only addresses the issue for Firefox on Windows, although it defines a
DHCP client interface which could be implemented on other platforms.
The high-level components of this patch are:
* nsIDHCPClient.idl - this is an interface which has been defined for querying the
DHCP server.
* nsPACMan.cpp - where previously when the PAC URL was simply set to a constant of
http://wpad/wpad.dat, it now dispatches an asynchronous command to the proxy
thread. The class ExecutePACThreadAction has been augmented to include an
instruction to 'ConfigureWPAD' (Configure Web-proxy auto-detect), and a new class,
'ConfigureWPADComplete' has been created to relay the result (the URL of the PAC
file) back to the nsPACMan object.
* nsProtocolProxyService.cpp
Minor changes to reflect the fact that the PAC URL not being set does not always
mean there is no PAC to be used; instead it could be in the process of being
detected.
* TestPACMan.cpp
This is a new file, and tests only the DHCP auto-detect functionality.
Some tests use multiple threads, as they test the non-blocking proxy detection.
* DHCPUtils.cpp
A class containing the main logic for querying DHCP.
* WindowsNetworkFunctionsWrapper.cpp
A very thin wrapper around the Windows API calls needed by DHCPUtils.
This class was introduced so it could be mocked out in tests.
* nsWindowsDHCPClient.cpp
* An implementation of the interface defined in nsIDHCPClient.idl. Fairly thin:
most logic is implemented in DHCPUtils.
* TestDHCPUtils.cpp
Tests for DHCPUtils and nsWindowsDHCPClient
MozReview-Commit-ID: 4xFQz3tOLEx
--HG--
extra : rebase_source : dfd5c588406a8b0d92f91cc8a0038ca722b7140a
If we're showing a permission UI prompt for "autoplay-media", the user can
still actually play media without interacting with the doorhanger; if they
click a "play" button in the document, they'll "gesture activate" the document
and unblock autoplay and be able to start playback.
It doesn't make sense to keep showing the permission doorhanger to approve
autoplay when the page is already playing, as playback has already started, and
if they clicked on "block" then the site would receive a promise reject on the
promise returned on the first call to HTMLMediaElement.play() for which we were
showing the permission prompt for, even though the media is actually playing.
This will likely confuse JS video players.
So we should hide the permission prompt when playback in the page starts.
MozReview-Commit-ID: 1XU47AfT6vf
--HG--
extra : rebase_source : 3d5c164527e26ba8f58f0baac3474d5b2d7fb587
Support for "listbox" in preferences is also removed, in preparation for the removal of the "listbox" element and binding.
MozReview-Commit-ID: Bi2VKKi5rdk
--HG--
extra : source : 762819bac1b9efe0e939be07394bd7d293638c40
This patch:
* Exposes a global Sync change counter on `nsINavBookmarksService`.
This is similar to SQLite's `total_changes()`, but just for changes
to bookmarks that affect Sync, and accounts for changes from multiple
threads and connections.
* Adds a SQL function to bump the counter, and extends the
`moz_bookmarks` triggers to call it.
* Moves merging outside the transaction in the bookmarks mirror, and
checks that the counters match before applying.
Differential Revision: https://phabricator.services.mozilla.com/D2004
--HG--
extra : moz-landing-system : lando
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.
MozReview-Commit-ID: CToSEVp1oqP
--HG--
extra : rebase_source : 28e8c6075bacf5f610058227a9731aeadb50f320
extra : absorb_source : f63602a163ed19fb65e26640319750fdd9b92ad1
The specificity of some Windows rules is reduced to match other platforms.
MozReview-Commit-ID: 28oUf7b6vCW
--HG--
extra : source : 3c131dac495ed46d524f4de2f92cfe79049aff8f
extra : intermediate-source : 7c1de225e4ab5dff9443c763ad59f5aecd72a593
Add assertions to highlight what the various data structures
should look like.
Also assert to ensure that mIndexPrefixes is always the same
length as mIndexDeltas and avoid writing the prefixes to disk
if that's not the case.
Do a single fallible allocation before we create the indexStarts
array instead of checking on each AppendElement() to simplify
the loop and emphasize the number of elements that the array
will receive (indexSize + 1). Remove the last element since we
don't actually end up writing it to disk.
MozReview-Commit-ID: HIg7ZmgaL7x
Differential Revision: https://phabricator.services.mozilla.com/D2063
--HG--
extra : moz-landing-system : lando
This simplifies the logic around clearing the prefix set and also adds
the clearing of the mIndexDeltasChecksum which should have been done
as part of 3a00711bb0e6.
Additionally, the checks for whether or not the prefix set is empty
include some sanity-checking asserts.
Finally, mTotalPrefixes could be out of sync with mIndexPrefixes
and mIndexDeltas if LoadPrefixes() or MakePrefixSet() fail so we
now only update it once all elements have been added successfully.
There is now a release assert to catch grossly out-of-sync (or
corrupt) values of mTotalPrefixes.
MozReview-Commit-ID: BSbyD2dGsUY
Differential Revision: https://phabricator.services.mozilla.com/D2062
--HG--
extra : moz-landing-system : lando
(This patch was first presented for review in bug 1463919, I've split it off
into its own bug here).
If the user opens a tab in the background, and that tab tries to play media,
we'll delay playing that media until the tab is brought to the foreground.
But the user can explicitly start playback of such delayed media by clicking
the "play" icon we show in the tab indicator. Then if autoplay is disabled,
we'll block the play (unless the origin is whitelisted). This is bad, as the
user has clearly indicated intent to play media in this tab.
So this patch "gesture activates" the root content document when the tab audio
indicator play button is pressed. This means the block autoplay logic will
behave as if there's been a user gesture in the tab (mouse click or keypress),
and not block the play. Gesture activation state is per document, so it does
not persist across document loads.
MozReview-Commit-ID: 3pgrADRrJqt
***
fix
--HG--
extra : rebase_source : a099cd3eedf6785a7af0b95613c5bd210e791a53
initialProcessData has the unfortunate side-effect of sending an entire copy
of all of its data to all content processes, and eagerly decoding it. For the
extension framework, this means that we wind up loading an entire copy of all
of our schema data, and of every extension's manifest and locale data, into
every process, even if we'll never need it.
The sharedData helper allows us to store an encoded copy of that data in a
shared memory region, and clone it into the current process only when we need
it, which can be a significant savings. For screenshots alone, it saves about
15K on locale and manifest data per content process, plus the size we save on
not copying schema data.
MozReview-Commit-ID: KkIOoLsBd99
--HG--
extra : rebase_source : 21cb433e8897a3d33943ebbd3d788d8d54e0844b
extra : source : 8074c985095c9951171311dac840684b915a57f6
Filters out empty categories when ChromeUtils.requestPerformanceMetrics() is called.
This test also:
- adds more test coverage
- uses the worker windowId when it has no linked window.
- properly walk to the worker parent
MozReview-Commit-ID: 3UH9a0UtVmx
--HG--
extra : rebase_source : 337b95466c7e7a30f881e881358d3b8d290f8f5b
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.
MozReview-Commit-ID: CToSEVp1oqP
--HG--
extra : intermediate-source : ff41551f5ff1b98b72ed771a6f2a3f66a8b79a57
extra : absorb_source : c9fe7423fcbb47655b05209b44fb02b69b272d07
extra : source : 4b7a8a35ed956159e2f443c6211164c0cbf3d926
extra : histedit_source : b98b792791274f00a5e649c82dc25043cc1d699a
Telemetry probes reporting the status of app.update.enabled or nsUpdateService::_enabled have been removed since those values no longer exist. They were replaced with a probe indicating whether update was disabled by policy.
MozReview-Commit-ID: 3YhY5P0gFYG
--HG--
extra : rebase_source : 7c5d110fda6d6372020182f31553abd31301fb42
extra : intermediate-source : c264598b210e39a88c65efff31bb93f1b63617fb
extra : source : b225a413e86801989ce48fc670f8a24734f5b690
Getting rid of this pref allowed some other code to be removed:
- Changed nsIUpdateService::stopChecking(duration) to nsIUpdateService::stopCurrentCheck() and got rid of the constants representing durations. The available durations were CURRENT_CHECK, CURRENT_SESSION, and ANY_CHECKS, but only CURRENT_CHECK was ever used.
- nsIUpdateChecker::stopChecking(CURRENT_SESSION) and nsIUpdateChecker::stopChecking(ANY_CHECKS) were the only mechanisms for setting Checker::_enabled to false, so Checker::_enabled and Checker::enabled were removed. References to Checker::enabled were replaced with checks for nsUpdateService::canCheckForUpdates.
- In browser/base/content/aboutDialog-appUpdater.js, the updateDisabledAndLocked() function was renamed to updateDisabledByPolicy, since the old name is no longer accurate and the new function name is a better description of the function's actual use.
MozReview-Commit-ID: 4wwqo4ROr1V
--HG--
extra : rebase_source : ea2e0f157dccc02eece585d3d15ebb67a38813d8
extra : intermediate-source : 00f6d87c63dfb940c439b49c8310b3a91be3a912
extra : source : 83c69c5f289572aee6ff5a8c85237bbeaac3cb8b
Telemetry probes reporting the status of app.update.enabled or nsUpdateService::_enabled have been removed since those values no longer exist. They were replaced with a probe indicating whether update was disabled by policy.
MozReview-Commit-ID: 3YhY5P0gFYG
--HG--
extra : rebase_source : 65823dd48715e978242df34c29e68a66d7af7ab9
extra : source : b225a413e86801989ce48fc670f8a24734f5b690
Getting rid of this pref allowed some other code to be removed:
- Changed nsIUpdateService::stopChecking(duration) to nsIUpdateService::stopCurrentCheck() and got rid of the constants representing durations. The available durations were CURRENT_CHECK, CURRENT_SESSION, and ANY_CHECKS, but only CURRENT_CHECK was ever used.
- nsIUpdateChecker::stopChecking(CURRENT_SESSION) and nsIUpdateChecker::stopChecking(ANY_CHECKS) were the only mechanisms for setting Checker::_enabled to false, so Checker::_enabled and Checker::enabled were removed. References to Checker::enabled were replaced with checks for nsUpdateService::canCheckForUpdates.
- In browser/base/content/aboutDialog-appUpdater.js, the updateDisabledAndLocked() function was renamed to updateDisabledByPolicy, since the old name is no longer accurate and the new function name is a better description of the function's actual use.
MozReview-Commit-ID: 4wwqo4ROr1V
--HG--
extra : rebase_source : 036099b7cd1f5fc74284ae8800ec30b3037f0d4a
extra : source : 83c69c5f289572aee6ff5a8c85237bbeaac3cb8b
The new version of breakpad imported in bug 1309172 doesn't demangle
rust symbols at all, contrary to before, where it tried to C++ demangle
them, which worked for many, although far from all. It however has
rust-demangle support as long as it's linked against a copy of the
rust-demangle-capi crate from https://github.com/luser/rust-demangle-capi/
This imports the code from the rust-demangle-capi crate but because of
some build system complications it's not taken as-is:
- it uses rusty-cheddar, which is deprecated, to generate a C header.
- rusty-cheddar depends on syntex_syntax, which now fails to build.
- rust-demangle-capi has crate-type staticlib, which can't be used
as a dependency in a Cargo.toml. For that reason, we can't create
a fake crate that depends on it to have it vendored.
Overall, it's only a few lines of rust, and the C header can be written
manually, so this is what we do here. The created crate is named in a way
specific to dump_syms.
The build system doesn't know how to figure out what system libraries
are required to link rust static libraries, although the rust compiler
has /some/ support to get the information, so we handle that manually.
--HG--
extra : rebase_source : 9f5a9bfe2148d3040e11c7121a88e85a7f2d5c53
Also change PlacesUtils.history.removeVisitsByFilter to be able to remove by transition type.
MozReview-Commit-ID: Bkiv0ScUi07
Differential Revision: https://phabricator.services.mozilla.com/D2056
--HG--
rename : toolkit/components/places/tests/unit/test_download_history.js => toolkit/components/places/tests/history/test_download_history.js
extra : moz-landing-system : lando
navigator.platform returns "Win64" in 64-bit Firefox and IE, but "Win32" in 64-bit Chrome and Edge. "Win32" appears to be the de facto platform value for Windows. This change doesn't hide the OS architecture from web content because navigator.userAgent still mentions "Win64; x64" in 64-bit Firefox, Chrome, Edge, and IE.
MozReview-Commit-ID: CplYnGDQgTe
--HG--
extra : rebase_source : c00a1a7462ea91d44700dd0581c88c1c4cad2346
extra : source : 1976c327f251702be255a9d0769121c6bc5303a1
Some pages, like the Google login form, submit information on keydown, that
causes us to not autocomplete, because we handle keypress instead.
The patch changes autocomplete to happen on keydown.
Unfortunately formautofill also uses keydown and tries to access popup data too
late, thus it needs some hacks to work properly.
In general the formautofill code has too many indirections due to e10s, and that
makes the fix more fragile than we'd want. Ideally content autocomplete should
have its own codebase, rather than sharing the same controller as chrome code.
MozReview-Commit-ID: oAyASmDFm1
--HG--
extra : rebase_source : 64c1e7c85b203904b59e3a1e019e7f52f290cfea
Instead of re-dispatch an untrusted event, simply make sure the keyboard event is handled
by the video controls.
MozReview-Commit-ID: 9Kj7E3UP77w
--HG--
extra : rebase_source : 8bbc787c7e5dd3d4351270b17f521f49b0f1a21c
The test was incorrect and the timestamp should be milliseconds, not microseconds.
MozReview-Commit-ID: 2d79r6PHH4Z
--HG--
extra : rebase_source : edd97899f0646f2cae2fbf119206ec470a6b97a0
We will apply the URI_CAN_LOAD_IN_PRIVILEGED_CHILD flag to Activity Stream about: pages instead of hardcoding the URLs in a Set.
MozReview-Commit-ID: F6AGmsKs1SR
--HG--
extra : rebase_source : e0435776b7bd390a2a62190ba6c72d4d312538d1
The content of this element is always overridden and the "xul:button" display mode is unnecessary, so the binding can be removed. The styles that control color are moved to "richlistbox.css" in preparation for the removal of the "listbox" element.
MozReview-Commit-ID: 5pGVE6n34EL
--HG--
extra : rebase_source : 8c5e37736c92382486ac605cc2d30085c16b7de7
extra : source : 8be7c63ea5c620641816664d9be81e58a912f9f3
These simple lists are converted to normal layout by setting a fixed height that isn't a multiple of the row height, which is already the case for most other lists in the user interface.
MozReview-Commit-ID: 1tV4MIoRp0d
--HG--
rename : toolkit/themes/windows/global/richlistbox.css => toolkit/themes/linux/global/richlistbox.css
extra : rebase_source : d6c53aa341bc5711f6ecf16485b5bd03d4f9caf2
extra : intermediate-source : 1355778929be17234ca3ced4f9930f05fb2cf20a
extra : source : 2e4527da76bba52492353aa5a40c128b09f389f1
- modifies how we get the top window id, adds isTopLevel
- renames pwid to windowId, worker to isWorker
- removes the wid field
- uses the url in case the host is empty
It also fixes PerformanceInfoDictionary.host type
MozReview-Commit-ID: 4AzO3UnJ2LM
--HG--
extra : rebase_source : 5dee8a650064fd45e7a9e694c2593d517f74d766
Now that we've generated an order file of the first N functions invoked
during startup, let's tell the linker about said functions so it can
cluster them appropriately.
This ChromeUtils API now returns a promise that gets resolved once all the data
has been collected via IPDL and the main process. The existing notification
design and its related XPCOM classes are removed.
MozReview-Commit-ID: CYKukBOC8yh
--HG--
extra : rebase_source : 1e27524726ace0bfed5297d48af8be268c5b4945
This adds an ID selector to the rules meant to override "richlistitem". This was missing only in the Downloads Panel and the Downloads View.
MozReview-Commit-ID: D6NEQlICGQi
--HG--
extra : source : 6e8b64c40476c995c94440c38a6263fd9989770c
We introduced these measures in bug 1033860 because of the variety of different
things besides pings we were sending using Telemetry. We don't do that any more
and haven't looked at these probes in at least two years.
Differential Revision: https://phabricator.services.mozilla.com/D2008
--HG--
extra : moz-landing-system : lando
This patch fixes up user content roots that aren't children of the
Places root. This patch also changes the Sync mirror to always prefer
the local root structure when merging, since the roots on the server
might be wrong.
Differential Revision: https://phabricator.services.mozilla.com/D1904
--HG--
extra : moz-landing-system : lando
Because of bug 1423822, we can't enable elfhack and lld at the same
time. OTOH, elfhack is not really useful on local builds: it's only used
on `make package`. Since we're going to make lld the default if it's
available, let's just completely disable elfhack by default on local
builds.
While here, hide the configure flag when compile environment is
disabled.
--HG--
extra : rebase_source : 154d3059db4f0f073bd219670ef4c9bc6ebcfd26
We introduced these measures in bug 1033860 because of the variety of different
things besides pings we were sending using Telemetry. We don't do that any more
and haven't looked at these probes in at least two years.
Differential Revision: https://phabricator.services.mozilla.com/D2008
--HG--
extra : moz-landing-system : lando
This patch unifies `updateBookmark` and `moveBookmark`.
`update` already handles the Sync change counter, and `move` specially
optimizes for moves. We can consolidate the two by reusing the queries
from `move` in `update`, moving its extra `setAncestorsLastModified`
call to `PlacesUtils.bookmarks.update`, and removing its transaction
and wrapper.
Differential Revision: https://phabricator.services.mozilla.com/D2016
--HG--
extra : moz-landing-system : lando
This follows the steps from the specification and also ensures sending
the optout ping is only tried once and discarded if that fails.
Depends on D1947
MozReview-Commit-ID: 99peURNq9jx
Differential Revision: https://phabricator.services.mozilla.com/D1948
--HG--
extra : moz-landing-system : lando
Support for "listitem" in preferences is also removed, in preparation for the removal of the "listbox" element and binding.
MozReview-Commit-ID: JQgdITzKoUz
--HG--
extra : source : f85e8811f574e7e75ffbbe2b9782ef601251db93