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

7 Коммитов

Автор SHA1 Сообщение Дата
Victor Porof 2b036e45c5 Bug 1561435 - Format testing/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : c0948f31e520ca087279cf429ca5f1db5a8341b8
2019-07-05 11:01:24 +02:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Henrik Skupin 96e367f76b Bug 1507067 - [marionette] Add support for EventListener callback to WebElementEventTarget. r=ato
Depends on D16095

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

--HG--
extra : moz-landing-system : lando
2019-01-10 14:26:26 +00:00
Henrik Skupin 5638bd8735 Bug 1507067 - [marionette] Add logging of received DOM events to ContentEventObserverService. r=ato
Differential Revision: https://phabricator.services.mozilla.com/D16095

--HG--
extra : moz-landing-system : lando
2019-01-10 14:26:02 +00:00
Andreas Tolfsen 9ea4bc47c5 Bug 1441019 - Migrate dom module docs to RST. r=whimboo
MozReview-Commit-ID: FAgW1K0pIJs

--HG--
extra : rebase_source : e4b336e748a9baa0fb5b1f410955c82bc625930e
2018-02-26 11:21:14 +00:00
Andreas Tolfsen d28ce13224 Bug 1405279 - Remove unused variables. r=whimboo
MozReview-Commit-ID: CmiDVCw6xVK

--HG--
extra : rebase_source : e71cfb7da973d95c796a93cc1e4da6f709acf65e
2017-10-03 14:35:47 +01:00
Andreas Tolfsen 9ac995ab12 Bug 1400225 - Subscribe to and relay web content DOM events. r=automatedtester,whimboo
This makes it possible to subscribe to DOM events in web content, in
order to facilitate fixes for cases such as https://bugzil.la/1397007.

Although the current interface, WebElementEventTarget, is associated with
browser.Context (curBrowser) it is the intention that we in the future
will associate this with representations of the marshaled web element.
This will make it quack and act like an Element's EventTarget, which
has nice parity to it.

The WebElementEventTarget works by passing IPC messages to
a backend service in the content frame script implemented by
ContentEventObserverService.  This registers event handlers for specific
DOM events, and relays these events back to the browser-specific message
handler in chrome.

This will enable chrome code to wait for events to occur in content,
like this:

	await new Promise(resolve => {
	  webElement.addEventListener("visibilitychange", resolve, {once: true});
	  contentBrowser.minimize();
	});

MozReview-Commit-ID: B8MMHyG8n04

--HG--
extra : rebase_source : 25ac77fbcfb09435325719ac61614c4a8ce37996
2017-09-15 17:07:41 +01:00