This converts the tabmodalprompt binding to a class, to be constructed along side with the element
by TabModalPromptBox.
TabModalPromptBox will keep the instances in a map and pass it to the callers, instead of the element.
The tests and callers can access the class instance by passing the element reference to the map.
Differential Revision: https://phabricator.services.mozilla.com/D15505
--HG--
rename : toolkit/components/prompts/content/tabprompts.xml => toolkit/components/prompts/content/tabprompts.jsm
extra : moz-landing-system : lando
As decided during the last TPAC meeting the window rect commands
should not return the window state.
Differential Revision: https://phabricator.services.mozilla.com/D15681
--HG--
extra : moz-landing-system : lando
As decided during the last TPAC meeting the window rect commands
should not return the window state.
Differential Revision: https://phabricator.services.mozilla.com/D15681
--HG--
extra : moz-landing-system : lando
With the use of multiple content processes in Firefox a navigation
command can cause the active framescript to be moved to a different
process. This interrupts the currently executed command, and as such
needs to be executed again after the framescript has been finished
initializing.
Currently flushing the pending commands doesn't take into account
that the framescript can even be moved multiple times to a different
process during a single page navigation. As such all pending commands
are getting removed after the first process move. For navigation
commands this means that no page load listeners are attached for
subsequent process changes, and navigation commands could never
return, and cause a hang of Marionette.
To solve the problem the pending commands need to be flushed each
time the process changes. They will remove themselves from the list
once they have finished processing.
Depends on D10998
Differential Revision: https://phabricator.services.mozilla.com/D10999
--HG--
extra : moz-landing-system : lando
Until now Marionette assumed that the events `TabClose` and `unload`
indicate that a top-level browsing context or chrome window has been
closed. But both events are fired when the browsing context or chrome
window is about to close. As such a race condition can be seen for
slow running builds.
To clearly wait until the top-level browsing context or chrome window
has been closed, the appropriate message manager needs to be observed
for its destroyed state.
MozReview-Commit-ID: DCdaIiULqey
--HG--
extra : rebase_source : f5659c1aa640d5265240bb1c4fe2059fb46d3cac
Until now Marionette assumed that the events `TabClose` and `unload`
indicate that a top-level browsing context or chrome window has been
closed. But both events are fired when the browsing context or chrome
window is about to close. As such a race condition can be seen for
slow running builds.
To clearly wait until the top-level browsing context or chrome window
has been closed, the appropriate message manager needs to be observed
for its destroyed state.
MozReview-Commit-ID: DCdaIiULqey
--HG--
extra : rebase_source : 3f9248ebbdc696ce5e6856ecb167ab144739a52e
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
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 moves the WindowState enum from testing/marionette/wm.js to
testing/marionette/browser.js in order to make it easier to apply
the forthcoming Marionette window tracking refactoring patches.
In other words, this patch functionally does not change anything.
MozReview-Commit-ID: 53MKIRHl11p
--HG--
extra : rebase_source : d048086ab48449ba02853076451e6dd1909bafa6
This moves the WindowState enum from testing/marionette/wm.js to
testing/marionette/browser.js in order to make it easier to apply
the forthcoming Marionette window tracking refactoring patches.
In other words, this patch functionally does not change anything.
MozReview-Commit-ID: 53MKIRHl11p
--HG--
extra : rebase_source : 1d0dcbac2c5089a0b9249794548dee7506b6b568
The forthcoming window tracking refactoring introduces the new
abstractions ContentContext and ChromeContext that to a large extent
share the same interface. They make it possible to interact with
both types of browsing context in a uniform manner.
Marionette currently has a lot of convoluted if-conditions to
paper over the differences between ChromeWindow, <xul:browser>,
and browser.Context. Examples of this includes the assert.window
and assert.contentBrowser assertions: they essentially perform the
same job, but does not share the same API because the underlying
APIs they call are different.
In an effort to prepare Marionette for the window tracking refactoring,
this patch adds a bit of glue to combine them both into one assertion
called assert.open. This checks that the browsing context has not
been discarded.
MozReview-Commit-ID: K5e7Sr1mq0
There is no functional purpose of this patch apart from laying
groundwork to make the window tracking patches easier to review.
MozReview-Commit-ID: GOIysDLVWIf
--HG--
extra : rebase_source : b7ddbd91fa3bc53f30552a7a4761bbf7e9efda1b
This removes the last remenants of frame.Manager and
testing/marionette/frame.js from Marionette. The preceding commits
in this changeset has gradually removed the unused and duplicated
features that it implemented. The only remaining pieces are the
registrating of some chrome-side IPC message handlers which we can
leave attached for the duration of the Marionette session.
MozReview-Commit-ID: EYjrJBeTybz
--HG--
extra : rebase_source : cf8b2d04c05d22eea6fe24061ccb9b21680f0d3c
To avoid circular dependencies, where file A depends on B depending
on A, we should strive towards fewer inter-dependencies and more
autonomy between modules.
For example, if testing/marionette/browser.js needs access to
the Context enum it can currently only attain it by importing
testing/marionette/driver.js. Because driver.js imports browser.js,
we create a circular dependency and Cu.import enters an infinite
import recursion.
MozReview-Commit-ID: LGiA9sy9xrd
--HG--
extra : rebase_source : f1748894c4309a5bc34b72acd4931d7937e8810e
To avoid circular dependencies, where file A depends on B depending
on A, we should strive towards fewer inter-dependencies and more
autonomy between modules.
For example, if testing/marionette/browser.js needs access to
the Context enum it can currently only attain it by importing
testing/marionette/driver.js. Because driver.js imports browser.js,
we create a circular dependency and Cu.import enters an infinite
import recursion.
MozReview-Commit-ID: LGiA9sy9xrd
--HG--
extra : rebase_source : e4b69c91b9cf78705c902f1e5038d815b88114d0
The upcoming window tracking refactoring to Marionette will introduce
a new testing/marionette/wm.js module. It was originally the plan
to move WindowState there after it had landed, but it actually makes
sense to land any dependencies before to reduce churn in the window
tracking patches.
MozReview-Commit-ID: EpqnTYYGcmg
--HG--
extra : rebase_source : d6760feefa49c522738fd3930b339bc0af70e6a5
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
nsIDOMWindow is the XPCOM interface and not what we mean in all these
cases. We either want to refer to the ChromeWindow or to the WindowProxy,
depending on the context of the code.
MozReview-Commit-ID: 405po1XLXRi
--HG--
extra : rebase_source : 47a179f7caed76592dab28f8e10550cda5fe3d02
The window state was included for only some of the commands' responses
earlier.
MozReview-Commit-ID: DdNyR7vdgtY
--HG--
extra : rebase_source : b7c3c7376f8affff673c903ba2c90e2cee93878a
Various fixes to make the generated API documentation from
testing/marionette somewhat easier to read.
MozReview-Commit-ID: F9duuQoOYBt
--HG--
extra : rebase_source : 3ade69773ceba42826aedef05b1371240b51cf82
With multi-processes for content reloads of the frame script
can happen at any time, and not only for remoteness changes.
As such the current browser has to be re-registered with the
new id of the listener.
MozReview-Commit-ID: 48MOZfuPTR9
--HG--
extra : rebase_source : 60e91ae7e1cdc942d0ac9a9dd3aac3baeccc5ddf
This wrapper just calls back into the MarionetteDriver, and
doesn't have any value. Removing it simplifies the call stack.
MozReview-Commit-ID: GH1xUHX12Xi
--HG--
extra : rebase_source : a3b9e57e63809c9936fdb2686ad6016339ea7bf7
To retrieve the title of the currently selected content browser
it is not necessary to call into the frame script. Instead just
take the value from the parent process directly.
MozReview-Commit-ID: KEpYKLIydrJ
--HG--
extra : rebase_source : 8b179de7057f8655a81656bd4d95b1562edb9f54