Commit Graph

3729 Commits

Author SHA1 Message Date
Kris Maglione
3e44c16cf9 Bug 1541557: Part 5 - Update callers of ChromeScript.sendSyncMessage to use sendQuery instead. r=nika
Since JSWindowActors don't have direct access to synchronous messaging,
ChromeScript callers are going to need to migrate to asynchronous messaging
and queries instead.

Since there's no comparable API to sendQuery for frame message managers, this
patch adds a stub that uses synchronous messaging, but makes the API appear
asynchronous, and migrates callers to use it instead of direct synchronous
messaging. This will be replaced with a true synchronous API in the actor
migration.

Fortunately, most of the time, this actually leads to simpler code. The
`sendQuery` API doesn't have the odd return value semantics of
`sendSyncMessage`, and can usually just be used as a drop-in replacement. Many
of the `sendSyncMessage` callers don't actually use the result, and can just
be changed to `sendAsyncMessage`. And many of the existing async messaging
users can be changed to just use `sendQuery` rather than sending messages and
adding response listeners.

However, the APZ code is an exception. It relies on intricate properties of
the event loop, and doesn't have an easy way to slot in promise handlers, so I
migrated it to using sync messaging via process message managers instead.

Differential Revision: https://phabricator.services.mozilla.com/D35055

--HG--
extra : rebase_source : d5707e87f293a831a5cf2e0b0a7e977090267f78
extra : source : 75ebd6fce136ab3bd0e591c2b8b2d06d3b5bf923
2019-06-12 12:40:51 -07:00
Kris Maglione
f70e67ad2d Bug 1541557: Part 4 - Stop relying on synchronous preference getters/setters. r=nika
The SpecialPowers set*Pref/get*Pref APIs currently use synchronous messaging
to set and get preference values from the parent process. Aside from directly
affecting callers of those APIs, it also affects callers of `pushPrefEnv`,
which is meant to be asynchronous, but is in practice usually synchronous due
to the synchronous messaging it uses.

This patch updates the getPref APIs to use the in-process preference service
(which most callers are expecting anyway), and also updates the callers of
the setPref and pushPrefEnv APIs to await the result if they're relying on it
taking effect immediately.

Unfortunately, there are some corner cases in tests that appear to only work
because of the quirks of the current sync messaging approach. The synchronous
setPref APIs, for instance, trigger preference changes in the parent
instantly, but don't update the values in the child until we've returned to
the event loop and had a chance to process the notifications from the parent.
The differnce in timing leads some tests to fail in strange ways, which this
patch works around by just adding timeouts.

There should be follow-ups for test owners to fix the flakiness.

Differential Revision: https://phabricator.services.mozilla.com/D35054

--HG--
extra : rebase_source : 941298157e7c82f420cf50ce057154ce9b85301c
extra : source : 189dc8a359815e059a4a217f788d183260bb2bfe
2019-06-13 09:34:39 -07:00
Kagami Sascha Rosylight
509d2d30b6 Bug 1366738: Implement [LegacyWindowAlias] r=bzbarsky
Add [LegacyWindowAlias] extended attribute support for WebKitCSSMatrix and webkitURL.

Differential Revision: https://phabricator.services.mozilla.com/D35601

--HG--
extra : moz-landing-system : lando
2019-07-03 08:37:01 +00:00
Kagami Sascha Rosylight
e8b452e9d2 Bug 1560119: Remove DOMMatrix scaleNonUniformSelf() r=bzbarsky
We probably just can remove it given that no other implementations are there.

Differential Revision: https://phabricator.services.mozilla.com/D36491

--HG--
extra : moz-landing-system : lando
2019-07-01 21:07:20 +00:00
Kagami Sascha Rosylight
5e70c0e2ab Bug 1397945: Align DOMMatrix scale* operations to the spec r=bzbarsky
Adjusted scale() to receive six arguments, scale3d() to allow zero argument, and scaleNonUniform to support only two arguments.  Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e6484802f1961c7fe881b4d1d7f4309ec19110a7

Differential Revision: https://phabricator.services.mozilla.com/D36147

--HG--
extra : moz-landing-system : lando
2019-06-28 15:11:00 +00:00
Makoto Kato
c2694625b5 Bug 1444847 - part 4: Implement mozilla::dom::StaticRange and static factory methods r=smaug
This patch is based on Makoto Kato-san's patch.

This patch implements `mozilla::dom::StaticRange` class and creating some
static factory methods.

Then, makes `AbstractRange` has a utility method of `SetStartAndEnd()`
method of `nsRange` and `StaticRange` for sharing same logic in one place.
However, there are some additional work is required only in `nsRange`, e.g.,
`nsRange` needs to start observing mutation of the range, but `StaticRange`
does not it.  Therefore, it's implemented as a template method which takes
`nsRange*` or `StaticRange*` as a parameter.  Then, each `DoSetRange()`
method of them can do different things without virtual calls.

Note that `StaticRange` does not have any properties, methods nor constructor.
Therefore, we need additional API to test it.

Differential Revision: https://phabricator.services.mozilla.com/D35143

--HG--
extra : moz-landing-system : lando
2019-06-28 07:48:52 +00:00
Makoto Kato
5f9abd3366 Bug 1444847 - part 1: Create mozilla::dom::AbstractRange r=smaug
This patch is based on the patch created by Makoto Kato-san.

`Range` and `StaticRange` have common base interface, `AbstractRange`.
https://dom.spec.whatwg.org/#abstractrange

This interface has simply returns `startContainer`, `endContainer`,
`startOffset`, `endOffset` and `collapsed`.

Different from the original patch's approach, this patch moves related
members in `nsRange` to `AbstractRange` since this approach avoids
virtual call cost.  Additionally, this patch makes them not throw as
declared by the spec.  As far as I know, the destruction cost of
`ErrorResult` may appear in profile so that we should avoid creating
the instance if we can avoid it.

Unfortunately, the instance size of `nsRange` becomes larger with this
patch.  The size is changed from 176 to 184.  I.e., now, `nsRange`
requires bigger chunk.

Differential Revision: https://phabricator.services.mozilla.com/D35140

--HG--
extra : moz-landing-system : lando
2019-06-28 07:46:35 +00:00
Gabriele Svelto
74276da797 Bug 1536221 - Re-enable mochitests and xpcshell tests that depend on the crash reporter on Windows/AArch64 r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D35995

--HG--
extra : moz-landing-system : lando
2019-06-26 13:15:24 +00:00
Brendan Dahl
62645647cf Bug 1558980 - Convert all XUL mochitest plain tests to chrome. r=mossop
Two benefits:

1) Align test setup with shipping Firefox - We don't allow content
privilege XUL in shipping versions of Firefox, so having the tests be
chrome would be more realistic to our use case.

2) Support the XUL to XHTML migration. These files will soon become XHTML
files, but will still need to load XUL elements, so they'll need to be
marked as chrome privileged to continue working.

Differential Revision: https://phabricator.services.mozilla.com/D35870

--HG--
rename : dom/xul/test/test_bug486990.xul => dom/xul/test/test_bug486990.xhtml
rename : layout/base/tests/file_bug465448.html => layout/base/tests/chrome/file_bug465448.html
rename : layout/base/tests/test_bug465448.xul => layout/base/tests/chrome/test_bug465448.xul
extra : moz-landing-system : lando
2019-06-26 18:00:53 +00:00
Mihai Alexandru Michis
c4808ba596 Backed out changeset 7a0ba8a3de05 (bug 1558980) for mochitest-chrome failures. CLOSED TREE
--HG--
rename : layout/base/tests/chrome/test_bug465448.xul => layout/base/tests/test_bug465448.xul
2019-06-27 05:48:11 +03:00
Mihai Alexandru Michis
cc9e91253e Backed out 2 changesets (bug 1528031) for causing crashtests to time out. CLOSED TREE
Backed out changeset 27ce9b212d26 (bug 1528031)
Backed out changeset 0a18aa212ee6 (bug 1528031)
2019-06-27 05:45:20 +03:00
Brendan Dahl
c7f754871d Bug 1558980 - Convert all XUL mochitest plain tests to chrome. r=mossop
Two benefits:

1) Align test setup with shipping Firefox - We don't allow content
privilege XUL in shipping versions of Firefox, so having the tests be
chrome would be more realistic to our use case.

2) Support the XUL to XHTML migration. These files will soon become XHTML
files, but will still need to load XUL elements, so they'll need to be
marked as chrome privileged to continue working.

Differential Revision: https://phabricator.services.mozilla.com/D34782

--HG--
rename : layout/base/tests/test_bug465448.xul => layout/base/tests/chrome/test_bug465448.xul
extra : moz-landing-system : lando
2019-06-20 21:29:50 +00:00
Jan-Ivar Bruaroey
8fd4637236 Bug 1528031 - Update tests to work with [SecureContext] navigator.mediaDevices. r=pehrsons,smaug
Differential Revision: https://phabricator.services.mozilla.com/D35970

--HG--
extra : moz-landing-system : lando
2019-06-26 18:15:50 +00:00
Eden Chuang
44bb94af31 Bug 1427396 - Twice the dom.serviceWorkers.idle_timeout value for tests under dom/tests/mochitest/fetch/ to reduce the impact SW termination by timeout. r=perry
The ServiceWorker is terminated by idleWorkerTimer timeout, and in slow platforms/machines, it would cancel the uncompleted fetching and make unexpected behavior during running tests.

The SW idle termination implementation has no defects, so the fix would just double the dom.serviceWorkers.idle_timeout to let fetchings have more chance to finish before idleWorkerTimer timeout.

Differential Revision: https://phabricator.services.mozilla.com/D35555

--HG--
extra : moz-landing-system : lando
2019-06-25 15:21:15 +00:00
Mirko Brodesser
db8f5b7184 Bug 1551425: Part 1) Test reference to childNodes' NodeList keeps its items alive. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32836

--HG--
extra : moz-landing-system : lando
2019-06-25 06:56:01 +00:00
Edwin Gao
407cdf5dc3 Bug 1558642 - disable test_bug1224790 on macosx1014 due to persistent failures r=arai,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D35489

--HG--
extra : moz-landing-system : lando
2019-06-21 17:09:43 +00:00
Nika Layzell
f3363ff093 Bug 1559460 - Support subframe process switches into embedder process, r=mccr8
This change comes in two parts. First, the code in WindowGlobalChild was changed
to detect the in-process case, and instruct the nsFrameLoader to become a
non-remote nsFrameLoader, and second the logic in WindowGlobalParent was updated
to ensure that the OwnerProcessID is updated after the change.

Differential Revision: https://phabricator.services.mozilla.com/D35060

--HG--
extra : moz-landing-system : lando
2019-06-21 16:34:30 +00:00
Kagami Sascha Rosylight
795d0eebcc Bug 1559874: Always create 3D DOMMatrix from 16 elements r=bzbarsky
Currently Firefox creates a 2D DOMMatrix when certain values of 16 elements are zero, so this change fixes it to align with the spec.

Differential Revision: https://phabricator.services.mozilla.com/D35326

--HG--
extra : moz-landing-system : lando
2019-06-20 03:59:59 +00:00
Kagami Sascha Rosylight
a235dfa68b Bug 1558387: Remove DOMError constructor r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D35184

--HG--
extra : moz-landing-system : lando
2019-06-17 15:43:38 +00:00
Mark Banner
201255ab84 Bug 1558485 - Turn on ESLint for all of dom/ disabling most of the failing rules. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34761

--HG--
extra : moz-landing-system : lando
2019-06-13 20:21:46 +00:00
Nika Layzell
d2fa23f7c9 Bug 1557730 - Enable HTTPResponseProcessSelection for windowProxy_transplant test, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D34907

--HG--
extra : moz-landing-system : lando
2019-06-13 18:09:22 +00:00
Boris Chiou
36f22dc0e1 Bug 1543839 - Update test_interfaces.js for ResizeObserver. r=smaug
Drop nightly true because it is enabled on all versions.

Differential Revision: https://phabricator.services.mozilla.com/D34757

--HG--
extra : moz-landing-system : lando
2019-06-12 18:29:46 +00:00
Tom Ritter
fe4d5dc7b8 Bug 1559087 - Fix renamed constant for privileged about process r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D34882

--HG--
extra : moz-landing-system : lando
2019-06-13 13:50:45 +00:00
Ehsan Akhgari
b3c4267b3c Bug 1557887 - Part 6: Pass a storage principal to the rest of the call sites for createAboutBlankContentViewer(); r=baku
Differential Revision: https://phabricator.services.mozilla.com/D34460

--HG--
extra : moz-landing-system : lando
2019-06-12 09:07:33 +00:00
Mark Banner
a4e4befb74 Bug 1513639 - Re-enable ESLint rule mozilla/reject-importGlobalProperties for dom/. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D34578

--HG--
extra : moz-landing-system : lando
2019-06-12 19:14:07 +00:00
Sean Feng
36865676e1 Bug 1512388 - Add loading cross domain iframes in background r=smaug
This patch adds the ability to load cross domain iframes in the
background to make the top level documents finish earlier.

This is an experiment feature that we'll keep it disabled by default.

Differential Revision: https://phabricator.services.mozilla.com/D24938

--HG--
extra : moz-landing-system : lando
2019-06-11 20:43:40 +00:00
Nika Layzell
de01a8cd7e Bug 1555488 - Part 2: Add initial tests for WindowProxy cache clearing, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D33545

--HG--
extra : moz-landing-system : lando
2019-06-06 14:57:25 +00:00
Edgar Chen
1ea67058f6 Bug 1525554 - Enable promise rejection event and update tests result; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D31734

--HG--
extra : moz-landing-system : lando
2019-06-04 12:55:57 +00:00
shindli
6b4074617b Backed out 2 changesets (bug 1555488) for ES lint failure in /builds/worker/checkouts/gecko/dom/tests/browser/browser_windowProxy_transplant.js CLOSED TREE
Backed out changeset bcc2d99534d1 (bug 1555488)
Backed out changeset 1bef4720c4ee (bug 1555488)
2019-06-03 23:41:46 +03:00
Nika Layzell
ad730a9ef9 Bug 1555488 - Part 2: Add initial tests for WindowProxy cache clearing, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D33545

--HG--
extra : moz-landing-system : lando
2019-06-03 20:06:46 +00:00
Edgar Chen
6c45f02a32 Bug 1553852 - Mark eCompositionChange as composed event; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33387

--HG--
extra : moz-landing-system : lando
2019-06-03 09:18:47 +00:00
Daosheng Mu
fc4437c39c Bug 1523351 - Part 2: Add tests for GamepadTouch and GamepadLightIndicator. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D29289

--HG--
extra : moz-landing-system : lando
2019-05-29 22:15:25 +00:00
Daosheng Mu
7b8a1cc7ba Bug 1523351 - Part 1: GamepadTouch and GamepadLightIndicator WebAPI implementation. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D20744

--HG--
extra : moz-landing-system : lando
2019-05-29 22:44:24 +00:00
Daniel Varga
b173205f5e Backed out 5 changesets (bug 1523351) for build bustage at builds/worker/workspace/build/src/dom/gamepad/GamepadRemapping.cpp on a CLOSED TREE
Backed out changeset 723d0a919d71 (bug 1523351)
Backed out changeset 13dcba81ff07 (bug 1523351)
Backed out changeset 6209717410be (bug 1523351)
Backed out changeset 80b34e6ce876 (bug 1523351)
Backed out changeset 7bdb7982c3af (bug 1523351)
2019-05-30 01:10:11 +03:00
Daosheng Mu
304abbd74d Bug 1523351 - Part 2: Add tests for GamepadTouch and GamepadLightIndicator. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D29289

--HG--
extra : moz-landing-system : lando
2019-05-29 20:48:29 +00:00
Daosheng Mu
f1193f9f17 Bug 1523351 - Part 1: GamepadTouch and GamepadLightIndicator WebAPI implementation. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D20744

--HG--
extra : moz-landing-system : lando
2019-05-29 21:44:28 +00:00
Daniel Varga
943f938b03 Backed out 5 changesets (bug 1523351) for causing build bustage at /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/StaticPrefList.h on a CLOSED TREE
Backed out changeset 607b23dcc62a (bug 1523351)
Backed out changeset b8169dcf0631 (bug 1523351)
Backed out changeset 982cd43dc8d9 (bug 1523351)
Backed out changeset 053540f0b00a (bug 1523351)
Backed out changeset cac2a77abd09 (bug 1523351)
2019-05-29 23:45:15 +03:00
Daosheng Mu
8b44d0d2b9 Bug 1523351 - Part 2: Add tests for GamepadTouch and GamepadLightIndicator. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D29289

--HG--
extra : moz-landing-system : lando
2019-05-22 05:54:43 +00:00
Daosheng Mu
fc365d059b Bug 1523351 - Part 1: GamepadTouch and GamepadLightIndicator WebAPI implementation. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D20744

--HG--
extra : moz-landing-system : lando
2019-05-23 05:36:31 +00:00
Kershaw Chang
993dce095a Bug 1546041 - Throw TypeError if mode is Navigate r=baku
According to spec, we should throw TypeError if the mode is Navigate.

Differential Revision: https://phabricator.services.mozilla.com/D31245

--HG--
extra : moz-landing-system : lando
2019-05-27 13:51:16 +00:00
Jared Wein
08b8f771db Bug 1552441 - Test to verify that only unlinkable about pages can load script[type=module]. r=smaug,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D31678

--HG--
extra : moz-landing-system : lando
2019-05-21 18:02:21 +00:00
J.C. Jones
a13c53a0db Bug 1552602 - Disable FIDO U2F API for Android r=keeler,bzbarsky
Per https://bugzilla.mozilla.org/show_bug.cgi?id=1550625#c5 there is no
mechanism available for FIDO U2F JS API operations on Android. The exposed API
is FIDO2/WebAuthn-only. As such, Firefox cannot support FIDO U2F JS API
operations on Android, and we should disable the u2f preference so that
window.u2f is not set inappropriately.

Updated to fix test_interfaces.js

Differential Revision: https://phabricator.services.mozilla.com/D31695

--HG--
extra : moz-landing-system : lando
2019-05-20 16:46:43 +00:00
Sean Feng
170e44e58f Bug 1534012 - Use a low priority ThrottledEventQueue for postMessages during page load r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D27386

--HG--
extra : moz-landing-system : lando
2019-05-16 19:35:30 +00:00
Dorel Luca
48ee5185e0 Backed out changeset 158eb97dfd5e (bug 1552441) for browser-chrome failures in dom/tests/browser/browser_unlinkable_about_page_can_load_module_scripts.js. CLOSED TREE
--HG--
extra : histedit_source : fc81d91d500af7599b59e913b6517c926d9debaa
2019-05-20 22:41:11 +03:00
Brendan Dahl
543c10a1d2 Bug 1551320 - Replace all CreateElement calls in XUL documents with CreateXULElement. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D31295

--HG--
extra : moz-landing-system : lando
2019-05-20 16:50:28 +00:00
Jared Wein
a64e4ed3bf Bug 1552441 - Test to verify that only unlinkable about pages can load script[type=module]. r=smaug,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D31678

--HG--
extra : moz-landing-system : lando
2019-05-20 15:59:28 +00:00
Jonas Allmann
50275c5d2b Bug 1549326 - Remove simpletest.js from eval()-whitelist, r=ckerschb
Amend several test files for triggering eval() assertion through simpletest.js

Differential Revision: https://phabricator.services.mozilla.com/D30474

--HG--
extra : moz-landing-system : lando
2019-05-16 13:44:36 +00:00
Ryan VanderMeulen
8f5477d25e Bug 1313741 - Use AppConstants in DOM and XPConnect tests instead of manual detection. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D30973

--HG--
extra : moz-landing-system : lando
2019-05-14 21:01:05 +00:00
Andrea Marchesini
dc7545548e Bug 1551055 - StoragePrincipal should be supported by localStorage - part 1, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D30801

--HG--
extra : moz-landing-system : lando
2019-05-14 05:49:46 +00:00
Geoff Brown
167de4a58d Bug 1551226 - Run Android x86_64 7.0/debug mochitests; r=snorp
We can run /debug mochitests against geckoview for the cost of another dozen
or so test annotations. Both /opt and /debug mochitests are nearly worthy of
tier 1, but still waiting for bug 1534732.

Differential Revision: https://phabricator.services.mozilla.com/D30931

--HG--
extra : moz-landing-system : lando
2019-05-13 20:52:36 +00:00