We need to do things a bit differently than for other pseudo elements as
`InspectorUtil.getCSSStyleRules` expects the highlight function + the highlight
name (e.g. `::highlight(myHighlight)`.
We loop through all registered Highlights via `CSS.highlights` and only consider
the ones that are currently used in the page (i.e. their `size` is > 0).
A test is added to ensure everything works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D184551
Don't display the arrow on the root node, and remove the ability to collapse it.
Add a border at the bottom of the root node so it looks like a header
Add a new `HEADER` Rep mode that will be used for the root node, so we're
showing relevant information in this context (e.g. the object type/class name)
but not the preview when it would be redundant with the content of the tooltip.
For example, we don't want to show the preview for simple objects, arrays, maps, …
but we still have a "longer" description for objects where the properties in
the preview are handpicked (e.g. elements, window, document, …)
Differential Revision: https://phabricator.services.mozilla.com/D185770
If our line numbers etc are wrong, then we might throw and retry later.
Given the empty string already represents failure, make
getAuthoredCssText not throw and just return the empty string on
failure.
This avoids retrying over and over just to fail. It doesn't fix the
initial hang, but makes it more manageable.
Will still try to find a proper fix / root cause of course, but this
seems harmless enough either way.
Differential Revision: https://phabricator.services.mozilla.com/D185906
This could cause the event tooltip to not be displayed for some jQuery events.
A test is added to ensure we don't regress this.
Differential Revision: https://phabricator.services.mozilla.com/D185976
We are already refreshing the view when the sidebar is selected (so for example,
going from the layout to the rules view), but we were not refreshing it when
selecting the panel (so for example, going from the styleeditor to the inspector,
while the rule view is the active sidebar panel).
While writing a test, I realized `CssRuleView#isPanelVisible` was always returning
true when the 3 pane mode is enabled, even if the inspector isn't the active tool,
which is incorrect, so I fixed it.
A test is added to ensure we covers this, by adding a stylesheet from the style editor.
Differential Revision: https://phabricator.services.mozilla.com/D185560
The property isn't used anywhere, but those objects would still be serialized
(via `form()`) and sent to the client.
Specs are updated to reflect the new situation, and handle backward compatibility.
Differential Revision: https://phabricator.services.mozilla.com/D184728
We were using a unique tab for all sources without a URL.
This forced to update tab's title and text content everytime a new source without a URL was notified by the server.
Even if we don't pause on these new evaled scripts, we would still update the text content which may freeze firefox when instantiating lots of scripts.
Differential Revision: https://phabricator.services.mozilla.com/D185549
Don't display the arrow on the root node, and remove the ability to collapse it.
Add a border at the bottom of the root node so it looks like a header
Add a new `HEADER` Rep mode that will be used for the root node, so we're
showing relevant information in this context (e.g. the object type/class name)
but not the preview when it would be redundant with the content of the tooltip.
For example, we don't want to show the preview for simple objects, arrays, maps, …
but we still have a "longer" description for objects where the properties in
the preview are handpicked (e.g. elements, window, document, …)
Differential Revision: https://phabricator.services.mozilla.com/D185770
This reproduces the current setup of PDF.js.
Using request's `owner` attribute to allow JSON files to load devtools modules
used to implement the JSON Viewer.
This helps use the same URL for devtools modules.
Differential Revision: https://phabricator.services.mozilla.com/D158318
This appears to be unused and only page-actor is reading the list of all pseudo elements
by querying InspectorUtils directly.
Differential Revision: https://phabricator.services.mozilla.com/D185664
Don't check if rules are instances of `CSSGroupingRule` (as `CSSStyleRule` would
match now, so it's not providing the guard we want anymore).
Avoid retrieving stylesheet window and document until it's needed, and only
compute rule line and column for the at-rules we'll return.
Differential Revision: https://phabricator.services.mozilla.com/D185636
The test has been incorrectly refactored and did not assert the resent requests.
We are fixing the test and also checking that the requests are not blocked.
Differential Revision: https://phabricator.services.mozilla.com/D185537
In layout, we build a default `path("m 0 0")` for now. We will implement
it later.
Besides, we don't support compositor animations for `url()`, so we don't
have to serialize it for IPC.
Note:
`<url>` includes `url()` and `src()`. For now we only support `url()`.
We should revisit `src()` in Bug 1845390.
Differential Revision: https://phabricator.services.mozilla.com/D184429
In order to keep the compatibility with DevTools internal methods, the existing
behavior where all bindings are shadowed is kept as `useInnerBindings` option.
Differential Revision: https://phabricator.services.mozilla.com/D184197