Bug 2033191 made sure we only call ownerGlobal on nodes.
As per the discussion in dev-platform, the front-end ~always wants
.documentGlobal. This removes ownerGlobal from the bindings. Following
patch will rename internal GetOwnerGlobal in gecko to GetRelevantGlobal
as per the HTML spec terminology.
Differential Revision: https://phabricator.services.mozilla.com/D297183
Bug 2033191 made sure we only call ownerGlobal on nodes.
As per the discussion in dev-platform, the front-end ~always wants
.documentGlobal. This removes ownerGlobal from the bindings. Following
patch will rename internal GetOwnerGlobal in gecko to GetRelevantGlobal
as per the HTML spec terminology.
Differential Revision: https://phabricator.services.mozilla.com/D297183
Bug 2033191 made sure we only call ownerGlobal on nodes.
As per the discussion in dev-platform, the front-end ~always wants
.documentGlobal. This removes ownerGlobal from the bindings. Following
patch will rename internal GetOwnerGlobal in gecko to GetRelevantGlobal
as per the HTML spec terminology.
Differential Revision: https://phabricator.services.mozilla.com/D297183
Bug 2033191 made sure we only call ownerGlobal on nodes.
As per the discussion in dev-platform, the front-end ~always wants
.documentGlobal. This removes ownerGlobal from the bindings. Following
patch will rename internal GetOwnerGlobal in gecko to GetRelevantGlobal
as per the HTML spec terminology.
Differential Revision: https://phabricator.services.mozilla.com/D297183
This shouldn't have any behavior change, other than avoiding XUL / CSS
interaction issues.
I had to tweak a bit a few of the webconsole split styles to preserve
behavior (even though without the styles it ends up working out because
the collapsed console would be out of view anyways).
The reason for the changes are:
* visibility: collapse doesn't prevent min-height from applying on
modern flexbox. So just collapse it using height properly. We need to
use !important, at least on height, to override the style attribute
set by the splitter.
* Tweak the splitting setup of the console a bit more to match legacy
behavior.
* I need to contain: size on some scrollers and replaced elements so
that they flex properly rather than taking as much space as they need
(this kinda sucks but oh well). We could set min-width/height: 0
instead if you think it's easier to understand but contain is more
robust.
I needed to adjust the test since the fractional part of the container
wasn't getting rounded on my machine, but that's a pre-existing issue
that happens with my DPI settings both before and after the patch.
Differential Revision: https://phabricator.services.mozilla.com/D158183
This shouldn't have any behavior change, other than avoiding XUL / CSS
interaction issues.
I had to tweak a bit a few of the webconsole split styles to preserve
behavior (even though without the styles it ends up working out because
the collapsed console would be out of view anyways).
The reason for the changes are:
* visibility: collapse doesn't prevent min-height from applying on
modern flexbox. So just collapse it using height properly. We need to
use !important, at least on height, to override the style attribute
set by the splitter.
* Tweak the splitting setup of the console a bit more to match legacy
behavior.
* I need to contain: size on some scrollers and replaced elements so
that they flex properly rather than taking as much space as they need
(this kinda sucks but oh well). We could set min-width/height: 0
instead if you think it's easier to understand but contain is more
robust.
I needed to adjust the test since the fractional part of the container
wasn't getting rounded on my machine, but that's a pre-existing issue
that happens with my DPI settings both before and after the patch.
Differential Revision: https://phabricator.services.mozilla.com/D158183
Now what we show a warning message on pages with invalid/no doctype,
a lot of tests were failing because of it.
This patch only adds doctype on all webconsole test pages.
Differential Revision: https://phabricator.services.mozilla.com/D132793
Depends on D105999
This patch is mostly a mechanical rewrite of:
```lang=javascript
const target = await TargetFactory.forTab(tab);
const toolbox = await gDevTools.showToolbox(target, "inspector");
```
to
```lang=javascript
const toolbox = await gDevTools.showToolboxForTab(tab, { toolId: "inspector" });
```
The main changes are:
- if the target was actually used in the test, it is now retrieved from toolbox.target
- the arguments for showToolboxForTab are using an option argument, to avoid the occasional showToolbox("inspector", null, null, null, startTime, null, reason);
I suspect that any signature rewrite mistake would have been caught on try.
There a few less mechanical changes:
- devtools/client/framework/test/browser_toolbox_screenshot_tool.js the toolId "console" was omitted because this id doesn't match any tool (author probably meant "webconsole")
- a few tests were: 1/ first creating a target, 2/ looping on tool definitions to get supported tools 3/ opening the toolbox with each supported tool. To support this I extracted a helper called `getSupportedToolIds` which opens a temporary toolbox to list all supported tool ids
- all the tests under storage/ use a single helper to start the test, which can open toolboxes for both tab targets and other targets. This made it more complicated to refactor. We could also drop this part and just refactor each test when we actually modify forTab/showToolbox to only work with descriptors
All in all the goal of this stack is to pave the way to stop handling targets when using forTab/showToolbox, and behind the scenes stop replying on targets to cache open toolboxes. We don't aim to kill all the call sites, just get them to a smaller number so that the next refactors will be easier.
Differential Revision: https://phabricator.services.mozilla.com/D106000
Depends on D105999
This patch is mostly a mechanical rewrite of:
```lang=javascript
const target = await TargetFactory.forTab(tab);
const toolbox = await gDevTools.showToolbox(target, "inspector");
```
to
```lang=javascript
const toolbox = await gDevTools.showToolboxForTab(tab, { toolId: "inspector" });
```
The main changes are:
- if the target was actually used in the test, it is now retrieved from toolbox.target
- the arguments for showToolboxForTab are using an option argument, to avoid the occasional showToolbox("inspector", null, null, null, startTime, null, reason);
I suspect that any signature rewrite mistake would have been caught on try.
There a few less mechanical changes:
- devtools/client/framework/test/browser_toolbox_screenshot_tool.js the toolId "console" was omitted because this id doesn't match any tool (author probably meant "webconsole")
- a few tests were: 1/ first creating a target, 2/ looping on tool definitions to get supported tools 3/ opening the toolbox with each supported tool. To support this I extracted a helper called `getSupportedToolIds` which opens a temporary toolbox to list all supported tool ids
- all the tests under storage/ use a single helper to start the test, which can open toolboxes for both tab targets and other targets. This made it more complicated to refactor. We could also drop this part and just refactor each test when we actually modify forTab/showToolbox to only work with descriptors
All in all the goal of this stack is to pave the way to stop handling targets when using forTab/showToolbox, and behind the scenes stop replying on targets to cache open toolboxes. We don't aim to kill all the call sites, just get them to a smaller number so that the next refactors will be easier.
Differential Revision: https://phabricator.services.mozilla.com/D106000
- mochitest folder is renamed browser.
- unit folder is rename xpcshell.
- all the file and folder for mocha are put in a node folder.
We take this as an opportunity to revist our stub-generating
mochitests.
Previously we had 2 tests for each kind of stubs, one for check,
the other one for updating.
It was not ideal when you wanted to update all the stubs at once
because you add either to mention every 5 files, or unskip the
update test files.
We now merge the update and the check files in a single test.
By default, the test that the stubs are up to date, and if you
pass the --setenv WEBCONSOLE_STUBS_UPDATE=true param, it will
update the stubs.
This allow us to move the function that actually generate the stub
in the test file, and have a helper file for multi-purpose functions.
Because these tests are failing on TRY, let's disabled them so we
can land the test re-organization (we'll re-enable them in Bug 1572667).
Differential Revision: https://phabricator.services.mozilla.com/D41344