Reverse the array of node inspection selectors, so that are a bit more naturally
human-readable by starting from the root document and moving inwards.
MozReview-Commit-ID: BYXryJg7iR9
--HG--
extra : rebase_source : b88b1289aaa768a7a852b433cd07ed4cf167c51c
Since bug 1432509, the warmingTabs WeakSet has had warmed tabs
cleared from it once they have entered STATE_LOADED. This allowed
us to make decisions on tab switch operations based on whether or
not a tab was still being warmed.
This broke our Telemetry, which assumed that warming tabs would
still be in the warmingTabs WeakSet until either requested or
evicted. Now, instead, we look to see whether or not tab warming
is enabled, and whether tabs _could_ have been warmed in order to
add entries to the right buckets.
MozReview-Commit-ID: 94oiKYzf4au
--HG--
extra : rebase_source : 0b6be98ff93d9753fcdacbec15a2a7b08232bb3a
The transforms for turning an nsIScriptError into a payload that Sentry
understands were getting a bit complex for a single function, so they're
refactored into a list of transform functions that are applied in sequence to
produce the payload. This will make it easier to manage adding new transforms to
the list.
Refactoring this revaled a problem with the test code: it assumed that listeners
for console messages were notified in order of registration (since it used a
temporary listener to determine when the rest of the listeners had been notified
of a message). Changing the async evaluation of the code broke the tests, so
they had to be refactored as well.
Without a way to know when all console listeners have been notified, we can't
assert that a message will not be received by BrowserErrorReporter. We do two
things to get around this:
- Where possible, call `observe` directly on the reporter instance.
- Add constructor params for registering and unregistering listeners so we can
test that logic without relying on messages being received or not.
MozReview-Commit-ID: EEH6IROOuHD
--HG--
extra : rebase_source : a5af344c86e9756d4dbef761e4a6060515c87a61
extra : histedit_source : 5491c7359d2989a2735ec6d39de372154706c475
The amount of computational complexity and garbage array/string/object
generation for each update to a pageAction property went up astronomically
with the migration of WebExtension page actions to the Photon API. This
resulted in non-trivial talos regression when Screenshots attempted to switch
back to the built-in pageAction API.
These changes fix most of the garbage generation, and reduce a lot of the
duplicated work for each update.
MozReview-Commit-ID: 4uPLnAesdU2
--HG--
extra : rebase_source : 3f723f3f35abf032cf12e02ce38552e21ea4827f
The shims that this rule tests for no longer exist.
MozReview-Commit-ID: DMgP7Hczavc
--HG--
extra : rebase_source : 765ddd5c62c9449c07ed050e44d86a3bd5c0ae64
extra : amend_source : 627a7694ac07182200f876901ded7a34721cd228
When compartment-per-addon is disabled, browser mochitests will no longer
automatically run in an implicit Sandbox scope, which means that things like
Cu.importGlobalProperties will stop working.
MozReview-Commit-ID: AWloQ7gasEf
--HG--
extra : rebase_source : dacd0f8676dd3af60eeb372985e26d7850470e69
The module attribute for an exception is surfaced in Sentry as the "transaction"
tag, and is useful for errors that don't include stack traces.
Differential Revision: https://phabricator.services.mozilla.com/D727
MozReview-Commit-ID: JKwgmE2jBXB
--HG--
extra : rebase_source : af817b5709e5b596885cc1674bcaaf7f96a0a48f
extra : amend_source : 8b7820ca53c29429ea9d788b1cf84012c99fdf81
The context-menu change is technically not idempotent, since something like:
background-image: url(foo), linear-gradient(..);
Would throw before. But that didn't seem like a great deal to me.
MozReview-Commit-ID: 70pD1EyXDB
This removes the sync reflow from almost all cases. The only case where we keep it is when a keypress
caught in content triggers a sync message to the parent process. We should clean this up in bug 1371523.
I've tried to fix the tests, but a lot of them seem to be disabled anyway...
MozReview-Commit-ID: 9k36p7q8MKy
--HG--
extra : rebase_source : 311ee41ba9456a5c5d58b81a0cfa999bcef0027e
This removes the sync reflow from almost all cases. The only case where we keep it is when a keypress
caught in content triggers a sync message to the parent process. We should clean this up in bug 1371523.
I've tried to fix the tests, but a lot of them seem to be disabled anyway...
MozReview-Commit-ID: 9k36p7q8MKy
--HG--
extra : rebase_source : 311ee41ba9456a5c5d58b81a0cfa999bcef0027e
As described in the bug, this is intended as a temporary solution to
enable some experiments. If this becomes a real feature, UX will
put some thought into a better startup experience.
MozReview-Commit-ID: 4DGMHj29M3e
--HG--
extra : rebase_source : a108fd58d4703c3110790f99e4936e6fee323cd2
Note that this value, 300, is still far above the 95% threshold that telemetry is reporting (59 milliseconds) so this won't be noticeable to most users. The > 1% of users who are having this issue will benefit greatly from this change.
MozReview-Commit-ID: Bd51gjc5z83
--HG--
extra : rebase_source : 4a9e96eb555e8021012a3a06cb76e03413a8da20
CastingApps.jsm was removed from browser/modules/moz.build file in bug 1393582, but
the file itself and its usage was not removed from ContextMenu.jsm
MozReview-Commit-ID: DsqJTPP66xE
--HG--
extra : rebase_source : 077167587e492cb4a8054e134e374c3e18cfdb6b
Along with adding source code, this updates the reported to more closely follow
the Sentry SDK docs:
- Remove the "request" payload, which is for reporting errors related to HTTP
requests.
- Include SDK info in the payload.
- Reverse the order of stack frames; they are meant to be ordered oldest to
newest.
- Include a local UTC timestamp in the payload.
- Remove the in_app flag from stack traces, as it's not required or useful in
the context of Firefox.
MozReview-Commit-ID: 558KrZNah6d
Differential Revision: https://phabricator.services.mozilla.com/D648
--HG--
extra : rebase_source : 9346b4402eadffc87d3065b61fb5afd3316e0c0a
Importing this object is unnecessary after the updates to the WebIDL console from Bug 1425574
and the follow-ups blocking Bug 1430810. There are still callers that access Console.jsm
to create custom ConsoleAPI objects, but those will be handled separately.
MozReview-Commit-ID: 9ojFxtkpPId
--HG--
extra : rebase_source : 971bf99f709b8d2afe300f3693665724f747aa5e
* Code in XMLHttpRequestMainThread is converted to set the username and password individually. This is because when the parameters are empty, it ended up calling SetUserPass(":") which always returns an error.
MozReview-Commit-ID: 3cK5HeyzjFE
--HG--
extra : rebase_source : f34400c11245d88648b0ae9c196637628afa9517
Because BrowserErrorReporter instances process previously-logged messages when
they are initialized, multiple runs of each test case (such as during the test
verification suite) cause new instances to process messages from the previous
test run. Resetting the console at the end of each test case prevents tests from
affecting each other.
Differential Revision: https://phabricator.services.mozilla.com/D589
MozReview-Commit-ID: HwjbbE00o97
--HG--
extra : rebase_source : 94ea69f8dbe679ff228c5c9b016f131650be1671
extra : amend_source : 5a9d0b5018d28d2dfc4782e66c732b711cb67109
Note that this patch also replaces legacy VK_* with KEY_*, and replaces
synthesizeKey() for inputting some characters with sendString() because
it's better and clearer what it does and it sets shiftKey state properly.
MozReview-Commit-ID: De4enbjux3T
--HG--
extra : rebase_source : 2296b84bff8e22f01eeb48cd8614fac5db11136a
Since gBrowser is going to become a plain JS object instead of a DOM node,
we don't want any callers directly referring to the DOM node to get ahold of it.
MozReview-Commit-ID: KbE5dlTWmS
--HG--
extra : rebase_source : ef4caea778db406205b58b9f007846dabb062978
Errors are collected via nsIConsoleService, shaped to a Sentry-compatible
format, and sent off. Reporting is on by default, and can be disabled using a
checkbox added to the privacy prefs in about:preferences.
Collected errors are sampled to avoid overloading the collection service; the
sample rate was determined by a previous Shield study that measured the number
of errors occurring in Nightly.
The feature is hard-disabled outside of Nightly and local builds, and the
preference is disabled by default in local builds. It is intended as a prototype
that will be evaluated and replaced by a more robust collection system if it
proves helpful.
Differential Revision: https://phabricator.services.mozilla.com/D561
MozReview-Commit-ID: 6aqUatXyuYs
--HG--
extra : rebase_source : 574aa329069f80e0beb52d1fd15f43e65a548c5c
extra : amend_source : a817fa4691c520eafaef808531b10581d09aeb14
The promisePanelEvent function was unreliable because it did not raise an error if the provided panel did not exist, which caused one of the callers to ignore a missing panel silently. All the callers have now been updated based on whether they expect the panel to exist or not.
MozReview-Commit-ID: AGT4rHls4OB
--HG--
extra : source : 0857964174624b1cf3d4ea3ffa94ba21b090788a
extra : intermediate-source : 29972a52d5c4829eb7fd662792836c934b1d11d8
This patch was autogenerated by my decomponents.py
It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.
It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.
It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)
MozReview-Commit-ID: DeSHcClQ7cG
--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
The promisePanelEvent function was unreliable because it did not raise an error if the provided panel did not exist, which caused one of the callers to ignore a missing panel silently. All the callers have now been updated based on whether they expect the panel to exist or not.
MozReview-Commit-ID: AGT4rHls4OB
--HG--
extra : rebase_source : f95967444ffbd2bbdc99560104845af31b71e94b
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm
MozReview-Commit-ID: 1Nc3XDu0wGl
--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
This modifies mediaCaptureWindowState() to say whether a camera or microphone is
actively captured or not. Note that this is not the same as the device being
on or off. If we disallow a device from being off while disabled, we still
notify chrome that we're not actively capturing.
MozReview-Commit-ID: B1taormqc3j
--HG--
extra : rebase_source : 292d323c4b9711cc242170f5c5c139bb87658c44
These are all no-ops because the objects involved are already implementing one of the WebIDL interfaces that pulls in MozImageLoadingContent, and that's all script gets to see.
MozReview-Commit-ID: Io2mLHbv7qM
This makes it easy for accessibility clients to retrieve the reader mode state programmatically.
There are three possibilities:
1. Reader mode is available for the current page (reader:available).
2. Reader mode is being used now (reader:active).
3. Reader is not available (the reader attribute is not present).
We do this by setting/removing the aria-reader attribute on the node.
This is not a real ARIA attribute, but it causes Gecko to expose it as an object attribute.
MozReview-Commit-ID: B38G3AYyBnS
--HG--
extra : rebase_source : 9c66389037c34a6a433af514bc81ed4ee040bfe0
This makes it easy for accessibility clients to retrieve the reader mode state programmatically.
There are three possibilities:
1. Reader mode is available for the current page (reader:available).
2. Reader mode is being used now (reader:active).
3. Reader is not available (the reader attribute is not present).
We do this by setting/removing the aria-reader attribute on the node.
This is not a real ARIA attribute, but it causes Gecko to expose it as an object attribute.
MozReview-Commit-ID: B38G3AYyBnS
--HG--
extra : rebase_source : 9c66389037c34a6a433af514bc81ed4ee040bfe0
There's a heavy enough overhead to going through XPConnect for
every observer for every visit on the nsINavHistoryObserver
interface, so this patch reduces that by replacing the single-
visit notification with one which accepts an array of visits.
Some notes: To avoid problems with the orderings of the various
ways in which we notify about visits, we have to send our bulk
onVisits notification before doing any of the others. This does
mean it technically behaves slightly different than the prior
approach of interleaving the notifications, but I can't find any
way in which this has any consequences to the end result, and it
doesn't break any tests.
MozReview-Commit-ID: GdeooH8mCkg
--HG--
extra : rebase_source : 48b5f886c4650a756e70f4657cb9d62c8ce40f74
If the image request gets redirect on loading, HTMLImageElement.currentURI
(which corresponds to nsIImageLoadingContent.currentURI) would return the
original URI before redirect, making "Save Image" in the context menu use
incorrect URI and filename. Use currentRequestFinalURI instead to get
redirected URI.
MozReview-Commit-ID: Bd7Q36sH93b
--HG--
extra : rebase_source : 5a1cc56554d1429f3c5af1c8cecaa1d72471ed21
If the image request gets redirect on loading, HTMLImageElement.currentURI
(which corresponds to nsIImageLoadingContent.currentURI) would return the
original URI before redirect, making "Save Image" in the context menu use
incorrect URI and filename. Use currentRequestFinalURI instead to get
redirected URI.
MozReview-Commit-ID: Bd7Q36sH93b
--HG--
extra : rebase_source : b88ccf98bc2a41aac007d79060424eaa2c2aca88
This patch uses the same logic as BrowserReloadOrDuplicate to determine if the cache should be skipped. I didn't extract out the logic to a separate function because I didn't want to add another function to the global namespace of browser.js.
MozReview-Commit-ID: 15kztsqMnAM
--HG--
extra : rebase_source : d5ad3ee62062d5971c95281368a102298e367e59
Users can block the overriding of shortcuts using the permissions tab of the page info dialog, as with other permissions. Site permissions also allows the use of permissions.default.shortcuts to block overriding shortcuts for all sites.
Migrated to simply use PopupNotifications.jsm. Additionally, this
changes the behavior to always have two buttons and a remember
checkbox. When selecting allow with remember, it will behave like
the always allow option previously, but when selecting block with
remember, it will move that page into a quiet mode with respect
to Flash - i.e., no plugin overlays will show anymore, and instead
you will just see the plugin icon in the URL bar, which you can
continue to interact with as before.
MozReview-Commit-ID: EUFlI7nM09t
--HG--
extra : rebase_source : 4f6fdaa602ea6c398cc646ba98282ee5c154956e
Minor note:
reftests should've turned off uploadEnabled in the first place.
reftests should have unified telemetry on. It's the future.
MozReview-Commit-ID: 9spzuUAXwwP