No RDP request should be done when the toolbox closes as there no guarantee that
the request will complete. Instead, such cleanup should be done by the actors.
Differential Revision: https://phabricator.services.mozilla.com/D38309
All fronts are destroyed when we call TargetMixin.destroy.
All but the inspector. This changeset move the inspector front destruction
from being done in parallel to panels destruction to do it after.
This highlight races in tests that are not waiting correctly for the full
loading of the grid sidebar.
Differential Revision: https://phabricator.services.mozilla.com/D39408
InspectorFront.destroy isn't returning a promise. So the `await` in the toolbox
code is not relevant and is only spinning the event loop.
Removing it introduce races which should be fixed.
The toolbox buttons shouldn't try to unhighlight if the inspector isn't used.
Differential Revision: https://phabricator.services.mozilla.com/D39407
All fronts are destroyed when we call TargetMixin.destroy.
All but the inspector. This changeset move the inspector front destruction
from being done in parallel to panels destruction to do it after.
This highlight races in tests that are not waiting correctly for the full
loading of the grid sidebar.
Differential Revision: https://phabricator.services.mozilla.com/D39408
InspectorFront.destroy isn't returning a promise. So the `await` in the toolbox
code is not relevant and is only spinning the event loop.
Removing it introduce races which should be fixed.
The toolbox buttons shouldn't try to unhighlight if the inspector isn't used.
Differential Revision: https://phabricator.services.mozilla.com/D39407
Due to how highlighters work, it requires the inspector to be initialized.
It can happen than the user will mouseenter/mouseout on an element that
calls highlight/unhighlight very quickly.
Since the hightlight can take some time, it might happen that the unhighlight
call is handled first, before the highlight call, meaning that we now have an
highlighter displayed, even though the user isn't hovering anything that
should cause this anymore.
This patch introduces a new toolbox function called `getHighlighter` that
returns an object with a `highlight and a `unhighlight` function.
We keep a reference to any possible pending `highlight` call so we can wait
for it to be done in `unhighlight`, before destroying it.
The console makes use of the new helper function, and a test is added to ensure
we don't have zombie highlighters anymore.
Differential Revision: https://phabricator.services.mozilla.com/D34562
This is the first part of getting rid of framework/attach-thread.js -- here we move the
toolbox related logic back into the toolbox.
Differential Revision: https://phabricator.services.mozilla.com/D29193
Depends on D28036
If a context menu is opened in the toolbox document when running in a frame with type=content, keyboard navigation will not move to the context menu when it's opened.
Differential Revision: https://phabricator.services.mozilla.com/D27695
Depends on D27693
Menu::popup and popupAtZoom are expecting a toolbox argument as last argument.
However, half of the callsites do not have access to the toolbox and just pass
a { doc } object. This is misleading when trying to work on menu.js because you
cannot rely on toolbox APIs.
Differential Revision: https://phabricator.services.mozilla.com/D28036
Using chromeEventHandler will allow us to catch events fired from any frame.
By default when DevTools are in a type=chrome frame, events also bubble across frames.
With type=content this is no longer the case.
Differential Revision: https://phabricator.services.mozilla.com/D27693
Depends on D28036
If a context menu is opened in the toolbox document when running in a frame with type=content, keyboard navigation will not move to the context menu when it's opened.
Differential Revision: https://phabricator.services.mozilla.com/D27695
Depends on D27693
Menu::popup and popupAtZoom are expecting a toolbox argument as last argument.
However, half of the callsites do not have access to the toolbox and just pass
a { doc } object. This is misleading when trying to work on menu.js because you
cannot rely on toolbox APIs.
Differential Revision: https://phabricator.services.mozilla.com/D28036
Using chromeEventHandler will allow us to catch events fired from any frame.
By default when DevTools are in a type=chrome frame, events also bubble across frames.
With type=content this is no longer the case.
Differential Revision: https://phabricator.services.mozilla.com/D27693
Depends on D27686
Toolbox, zoom keys and inspector search should use the chromeeventhandler as event target.
They need to capture events from inner frames.
Differential Revision: https://phabricator.services.mozilla.com/D27688
As we will move shortcuts to use chromeEventHandler as their target, we need an easy way to add and remove them on host switch.
The chromeEventHandler will change when switching from window to docked hosts (and vice versa)
Differential Revision: https://phabricator.services.mozilla.com/D27685
Using the toolbox window to read the "direction" seems to fix the issue.
Added a mochitest, had to create a dedicated browser ini file in order to setup RTL properly.
Differential Revision: https://phabricator.services.mozilla.com/D28841
The server should not be driven by a client-side performance about which perf panel is enabled.
To preserve the behavior, the performance connection will not be initiated by the toolbox if the new perf panel is enabled.
Differential Revision: https://phabricator.services.mozilla.com/D28042
Some classes in DevTools will not have an easy way to get access to the toolbox.
However they might still want to use the topmost chrome window.
Extract the logic from toolbox.js to a shared helper.
Differential Revision: https://phabricator.services.mozilla.com/D27672
Depends on D26320
@miker: We are moving devtools iframes to use type=content, and win.top will no longer be available.
We could use another getter to get the topmost chrome window, but reading the code here, I thought that maybe using the toolbox window would be better.
Today if you open several toolboxes in different tabs of the same window, the events for the various toolboxes will be mixed together, because win.top is the same for all the toolboxes that live in the same window.
It might be better to use an object which is unique to the toolbox?
Differential Revision: https://phabricator.services.mozilla.com/D26324