Граф коммитов

93069 Коммитов

Автор SHA1 Сообщение Дата
Zibi Braniecki 749612612f Bug 1629291 - Don't set l10n as cached if there was any error during initial translation. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D74818
2020-05-14 16:56:57 +00:00
Bogdan Tara dc69f70165 Backed out 2 changesets (bug 1624802) for test_listOrigins.js failures CLOSED TREE
Backed out changeset e374ffe2e05e (bug 1624802)
Backed out changeset 8e2da4b3c32b (bug 1624802)
2020-05-14 19:56:00 +03:00
Alex Chronopoulos 9cce351cdc Bug 1596528 - Get the statistics under the same mutex to avoid inconsistency. r=padenot
Get all the statistics in one call, under the same mutex, and extract from them the decoded and total frames. The individual getters were previously used, created uncertainty since they lock the mutex separately.

Differential Revision: https://phabricator.services.mozilla.com/D75096
2020-05-14 16:36:19 +00:00
Jan Varga 17f553f88d Bug 1624802 - Run some dom/quota xpcshell tests in a child process as well; r=dom-workers-and-storage-reviewers,sg
For now, only test_listOrigins.js, test_originWithCaret.js and test_simpledb.js
can run in a child process because they don't need to set preferences or access
files in the profile directory.
We will be able to run more tests in a child process once we have SpecialPowers
for xpcshell implemented using JSProcessActors and when we expose the base
directory used by QuotaManager through a new QuotaManagerService method (to
avoid getting the profile directory using nsIDirectoryService because that
doesn't work in a child process).

Differential Revision: https://phabricator.services.mozilla.com/D75281
2020-05-14 15:35:29 +00:00
Jan Varga 3b74d7ea87 Bug 1624802 - Support running dom/quota xpcshell tests in a child process; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D75279
2020-05-14 15:27:38 +00:00
Emilio Cobos Álvarez ec9e0e8772 Bug 888884 - Make :read-write not apply for disabled controls to which readonly applies. r=edgar
Per https://html.spec.whatwg.org/#selector-read-write:

> The :read-write pseudo-class must match any element falling into one
> of the following categories [...]:
>
>   * input elements to which the readonly attribute applies, and that
>     are mutable (i.e. that do not have the readonly attribute
>     specified and that are not disabled)
>
>   * textarea elements that do not have a readonly attribute, and
>     that are not disabled.
>
>   * elements that are editing hosts or editable and are neither
>     input elements nor textarea elements.

This fixes the `:disabled` bits.

This matches Safari behavior and the spec, but not Chrome, which has our
behavior.

Fix the WPT, which had multiple issues, as :read-only is defined to be
just the opposite of :read-write. This will pass as soon as I unprefix
the pseudo-class.

Differential Revision: https://phabricator.services.mozilla.com/D75230
2020-05-14 13:58:20 +00:00
Perry Jiang b08afbc3a9 Bug 1620840 - give RemoteWorkerChild a StrongWorkerRef r=asuth
Allows RemoteWorkerChild to clean up its data appropriately - objects
that must be released on the worker thread should never outlive the worker
thread, and the StrongWorkerRef/WorkerControlRunnable helps guarantee that.

Differential Revision: https://phabricator.services.mozilla.com/D72798
2020-04-28 22:11:26 +00:00
Andrew Sutherland 2646de732f Bug 1619329 - Error propagation on main thread needs to be dispatched. r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D73249
2020-05-14 14:33:18 +00:00
sanketh d66dab82a7 Bug 1621433 - In RFP mode, turn canvas image extraction into a random 'poison pill' for fingerprinters r=tjr,jrmuizel
In RFP mode, canvas image extraction leads to an all-white image, replace that
with a random (sample 32 bytes of randomness and fill the buffer with that)
'poison pill'. This helps defeat naive fingerprinters by producing a random
image on every try. This feature is toggled using a new, default on, pref
`privacy.resistFingerprinting.randomDataOnCanvasExtract`.

Updated `browser_canvas_fingerprinting_resistance.js` to test this new feature
as well.

Updates and replaces D66308.

Differential Revision: https://phabricator.services.mozilla.com/D72716
2020-05-14 13:56:55 +00:00
Andrew Sutherland 852f914bb7 Bug 1634259 - Improve worker shutdown edge case handling. r=perry
Bug 1594572 attempted to fix a shutdown edge-case where a worker that was
started late enough would fail to create a PBackground connection and
early return.  This early return, however, left the worker never scheduled
for deletion, resulting in a shutdown hang.  See my restating block at
https://phabricator.services.mozilla.com/D73134#2224963 for more context.

The problem with this was that the attempt to clear the main event queue
ran afoul of pre/post event-processing hooks intended to ensure that control
runnables are processed if some non-worker code goes and spins a nested
event loop on the worker thread.  But because we never got around to
creating a cycle collected JS runtime on the thread, the call to get it
would return null and when we tried to get the recursion depth of a null
pointer, we would crash a little.

This patch addresses the immediate regression by adding a helper that returns
a depth of 1 in this edge-case.  It also fixes another problem with the fix
that is now more obvious having reviewed bug 1636147... we were failing to
mark the status of the worker as dead and drain any control runnables, which
could have resulted in the CrashIfHangingRunnable usage not working out right.
(Note that CrashIfHangingRunnable does handle Cancel() correctly, so the
fact that we end up canceling the runnable shouldn't break things.)

Differential Revision: https://phabricator.services.mozilla.com/D75185
2020-05-14 07:44:44 +00:00
Bogdan Tara edcb53f163 Backed out 2 changesets (bug 1558394) for nsDocShellLoadState related bustage CLOSED TREE
Backed out changeset 5889105bd089 (bug 1558394)
Backed out changeset 80a0ea17c9f8 (bug 1558394)
2020-05-14 15:17:32 +03:00
Sebastian Streich bb85ae41b1 Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-05-14 10:05:55 +00:00
Sebastian Streich 9ce86dc585 Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-14 10:04:44 +00:00
Simon Giesecke d11275bd72 Bug 1632128 - Dissolve FileHandleResultHelper class into a function. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D75053
2020-05-14 09:42:33 +00:00
Simon Giesecke 4fc4c0a9d9 Bug 1632128 - Dissolve ResultHelper class into a function. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D74890
2020-05-14 09:42:23 +00:00
Simon Giesecke 9ee13d3ec4 Bug 1632128 - De-virtualize IDBFileRequest::SetResult(Callback). r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D74875
2020-05-14 09:42:21 +00:00
Simon Giesecke 5f4d07aff0 Bug 1632128 - De-virtualize IDBRequest::SetResult(Callback). r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D74874
2020-05-14 09:42:18 +00:00
Simon Giesecke ae0940c00a Bug 1632128 - Use mozilla::Variant for FileHandleResultHelper. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D74870
2020-05-14 09:42:16 +00:00
Simon Giesecke 7a8f68d96f Bug 1632128 - Use mozilla::Variant for ResultHelper. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D71936
2020-05-14 09:42:13 +00:00
Simon Giesecke 79f1249dc9 Bug 1623278 - Use MovingNotNull in ActorsParent. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D73033
2020-05-14 09:14:17 +00:00
Simon Giesecke a892bc01f6 Bug 1633719 - Use *InitializedOnce* with NotNull instead of *InitializedOnce*NotNull for pointers. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D73025
2020-05-14 09:14:04 +00:00
Mirko Brodesser cb9ee320b9 Bug 1635709: part 18) Correct assignment to `aDidAddRange` in `Selection::MaybeAddTableCellRange`. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D75100
2020-05-14 10:08:55 +00:00
Mirko Brodesser 1f8f4485a5 Bug 1635709: part 16) Replace `GetTableCellLocationFromRange` with `GetTableSelectionMode`. r=masayuki
The location wasn't used from the caller of
`GetTableCellLocationFromRange`.

However, `GetTableCellLocationFromRange`
included flushing frames, this is now done in
`HTMLEditor::CellIndexes::Update`.

Differential Revision: https://phabricator.services.mozilla.com/D75098
2020-05-14 10:08:32 +00:00
Cosmin Sabou 3ed8e5317b Backed out 8 changesets (bug 1627999) for wpt failures on MediaPlaybackStatus.h. CLOSED TREE
Backed out changeset 98e98e2ecb56 (bug 1627999)
Backed out changeset 5533b1c9e3ed (bug 1627999)
Backed out changeset c9c9f78e131d (bug 1627999)
Backed out changeset 37b8f7a47ede (bug 1627999)
Backed out changeset 433a0eb70fc6 (bug 1627999)
Backed out changeset 72a1340bc112 (bug 1627999)
Backed out changeset 10e3550226eb (bug 1627999)
Backed out changeset 039ecd63e3fb (bug 1627999)
2020-05-14 12:29:01 +03:00
Bogdan Tara 078debe589 Backed out 2 changesets (bug 1623278, bug 1633719) for assertion failure on NotNull.h CLOSED TREE
Backed out changeset 8a21ea441fc7 (bug 1623278)
Backed out changeset ab6a041c0d57 (bug 1633719)
2020-05-14 11:34:50 +03:00
Simon Giesecke e0aafb232f Bug 1623278 - Use MovingNotNull in ActorsParent. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D73033
2020-05-13 10:44:52 +00:00
Simon Giesecke 98b9d42815 Bug 1633719 - Use *InitializedOnce* with NotNull instead of *InitializedOnce*NotNull for pointers. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D73025
2020-05-14 07:47:46 +00:00
alwu d6ea0a004a Bug 1627999 - part8 : remove audible check in media element. r=bryce
This patch will do :
- remove audible check from the logic of registering controller
- include audio channel affect on the media element's audible state

The advantage of doing so :
- it can help to reduce the intermittent failure during testing by earlier hooking media elements in the content process to the media controller in the chrome process

More details :
In D72497, we have added the audible check to postpone the activation of the media controller, which would ensure that we only control media after it become audible. Therefore, we can remove the previous implementation which we use to achieve that in media element.

When having that audible check in media element, it would postpone the timing of adding media element to `ContentMediaController` that causes some intermitent failures when I was writing test for bug1633565. When removing those checks, we can ensure that the media element would have always been added into `ContentMediaController` after calling `video.play()`. If the element haven't been added into `ContentMediaController`, then it would miss to handle the media key events when test generates a fake media key event, which causes an intermitent failure.

Differential Revision: https://phabricator.services.mozilla.com/D73335
2020-05-14 03:20:17 +00:00
alwu 203a7440ae Bug 1627999 - part7 : add test. r=bryce
This patch will do :
- add test cases
- introduce the test-only notification `media-displayed-metadata-changed` when the event source updates its metadata

The advantage of doing so :
- increase test coverage

Differential Revision: https://phabricator.services.mozilla.com/D72501
2020-05-14 02:56:40 +00:00
alwu 9262f91450 Bug 1627999 - part6 : modify 'test_trigger_actionhanlder.html'. r=bryce
This patch will do :
- play media from different frame, rather than alway playing media from the main frame

The advantage of doing so :
- to make the media session in child frame become the active media session because that can only be the context with the audio focus

Differential Revision: https://phabricator.services.mozilla.com/D72500
2020-05-13 22:01:07 +00:00
alwu 8fe88f56fa Bug 1627999 - part5 : remove out-of-date test. r=bryce
This patch will do :
- remove out-of-date test that uses the previous implementation of determining the active media session

The advantage of doing so :
- prevent the failure causing by out-of-date test

Differential Revision: https://phabricator.services.mozilla.com/D72499
2020-05-12 18:23:44 +00:00
alwu df4db27573 Bug 1627999 - part4 : listen to the playback change from the event source. r=bryce
This patch will do :
- listen to the playback change from the event source directly

The advantage of doing so :
- more close to the real situation because the event source is where we decide the information that should be displayed the virtual control interface

Differential Revision: https://phabricator.services.mozilla.com/D72498
2020-05-11 21:36:02 +00:00
alwu c78f03645d Bug 1627999 - part3 : activate controller when it first time becomes audible. r=bryce
This patch will do :
- postpone the timing of activating the media controller. Activate the controller after it first time becomes audible.

The advantage of doing so :
- prevent setting incorrect media metadata before the controller becomes audible

---

More details about this change :

The active media session would be chose after the context owns the audio focus. Therefore, if we would like to get the correct metadata from the media session, we should postpone the timimg of activate controller and wait until we decide the active media session then we can get the correct metadata.

Differential Revision: https://phabricator.services.mozilla.com/D72497
2020-05-12 04:00:52 +00:00
alwu ab3eb8aad3 Bug 1627999 - part2 : update the active media session when the owner of the audio focus changes. r=bryce
This patch will do :
- using the audio focus to decide which media session is the active media session. That is a recommend way of the spec [1].

The advantage of doing so :
- prevent to routing media control keys to incorrect media session
- prevent showing the incorrect metadata on the virtual control interface

[1] https://w3c.github.io/mediasession/#active-media-session

Differential Revision: https://phabricator.services.mozilla.com/D72496
2020-05-12 03:58:11 +00:00
alwu 36c9f9f54a Bug 1627999 - part1 : manage the audio focus in `MediaPlaybackStatus` r=bryce
This patch will do :
- introduce a concept `audio focus` among different contexts within a tab
- determine the audio focus owner when the context becomes audible or the owner destroys

The advantage of doing so :
- the audio focus helps us to decide the active media session that would be implemented in the following part

More details:
When there are serveral contexts playing at the same time within a tab, we would like to determine an audible context from them to represent the tab, and that is the `audio focus` we mean in this bug.

Differential Revision: https://phabricator.services.mozilla.com/D72495
2020-05-14 05:50:09 +00:00
Karl Tomlinson bba064955e Bug 1637159 provide XMLHttpRequest owner via DOMEventTargetHelper constructor r=smaug
Depends on D75039

Differential Revision: https://phabricator.services.mozilla.com/D75041
2020-05-14 05:28:36 +00:00
Karl Tomlinson d07bf2b285 Bug 1637159 specify DOMEventTargetHelper owner for IDBFileHandle via constructor r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D75037
2020-05-14 05:28:36 +00:00
Philip Chimento 672dc17ff4 Bug 1629293 - Make JS::ErrorReportBuilder::init exclusively support JS::ExceptionStack. r=evilpie,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D73522
2020-05-14 04:44:33 +00:00
Philip Chimento f93330de3e Bug 1629293 - Expose js::ErrorReport in public API. r=evilpie
Renames it to JS::ErrorReportBuilder, since it is used to 'build' a
JSErrorReport object.

Differential Revision: https://phabricator.services.mozilla.com/D73521
2020-05-14 04:44:15 +00:00
Matt Woodrow 98b902004c Bug 1637487 - Store mixed content security flags as a flags word on Document instead of bools. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75026
2020-05-14 01:27:42 +00:00
Matt Woodrow 2f85a514ca Bug 1637487 - Compute broken flag when we need to use it. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75025
2020-05-14 01:27:24 +00:00
Matt Woodrow 861c02747c Bug 1637487 - Factor out calls to log changes to mixed content security state. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75024
2020-05-14 01:27:11 +00:00
Matt Woodrow 6438ccaaf7 Bug 1637487 - Factor out updating root Document security flags. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75023
2020-05-14 01:27:03 +00:00
Matt Woodrow 7c1f4443d0 Bug 1637487 - Factor out setting of the broken security state flags. r=ckerschb
Factor out broken flag clearing

Differential Revision: https://phabricator.services.mozilla.com/D75022
2020-05-14 01:26:50 +00:00
Matt Woodrow 1b984fae62 Bug 1637487 - Fold the branches for each pref together, since they do the same thing. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75021
2020-05-14 01:26:38 +00:00
Matt Woodrow 8645f20d35 Bug 1637487 - Flatten the mixed content event runner into the calling code, so it's no longer needed. r=ckerschb
This looks like it was necessary a long time ago, but now just runs the same calls as the calling code, so unnecessarily splits the logic into two.

Differential Revision: https://phabricator.services.mozilla.com/D75020
2020-05-14 01:26:25 +00:00
Matt Woodrow f88593276e Bug 1637487 - Refactor calls to OnSecurityChange to all be a single call at the end of ShouldLoad. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75019
2020-05-14 01:26:17 +00:00
Matt Woodrow c47de00726 Bug 1637487 - GetState is infallible, so rely on the result. r=ckerschb
We previously were checking the nsresult inconsistently.

Differential Revision: https://phabricator.services.mozilla.com/D75018
2020-05-14 01:26:05 +00:00
Narcis Beleuzu 53167b2819 Backed out 9 changesets (bug 1637487) for bustages on nsMixedContentBlocker.cpp . CLOSED TREE
Backed out changeset 5633cc2aaa9b (bug 1637487)
Backed out changeset c4f0c757cae0 (bug 1637487)
Backed out changeset 65bb1114df87 (bug 1637487)
Backed out changeset 1a64ef10e773 (bug 1637487)
Backed out changeset d1709ebb7f46 (bug 1637487)
Backed out changeset 286e5ee6517f (bug 1637487)
Backed out changeset 83362625c297 (bug 1637487)
Backed out changeset ab9df2f2d11f (bug 1637487)
Backed out changeset b83f49bc11b0 (bug 1637487)
2020-05-14 02:41:40 +03:00
Imanol Fernandez b35d8070b6 Bug 1636509 - Add ProbablyShortLivingWrapper annotation to short living WebXR objects r=kip,daoshengmu,webidl,smaug
WebXR has a lot of short living objects. The ProbablyShortLivingWrapper should help a bit to improve the GC performance of those objects.

Differential Revision: https://phabricator.services.mozilla.com/D74423
2020-05-13 22:11:05 +00:00