I had to tune the versionized http helper to pass the right headers,
while still ensuring that http cache is kept disabled.
Differential Revision: https://phabricator.services.mozilla.com/D142348
This feature is currently not tested.
Summary of the issue: we have up to 2 tooltips for grid elements: cell and area.
To avoid overlapping, today they are restricted with two options: `position` (top for one, bottom for the other) and `hideIfOffscreen`.
`position` already ensures that, when there is enough room, the tooltips will not overlap.
However, when they don't have enough room to be displayed, they will start "sliding" to remain in the viewport.
This means that under extreme conditions, you could again have an overlap between the two tooltips.
To avoid this, the `hideIfOffscreen` option was added. Instead of sliding, the tooltip are purely and simply hidden.
While I understand the idea, I think this creates more problems than it solves. For the sake of avoiding rare overlaps, we just don't display the tooltips in many situations.
Ideally we would have a better logic to place the 2 tooltips in compatible positions, or maybe we should even combine them.
But this is an easy way of fixing the issue here.
Differential Revision: https://phabricator.services.mozilla.com/D142203
Before this patch, nsISiteSecurityService APIs took "flags" parameters that
differentiated private contexts from not private contexts. However, these
parameters were redundant with respect to origin attributes, which led to some
confusion for consumers of these APIs. This patch removes these parameters in
favor of using origin attributes.
Differential Revision: https://phabricator.services.mozilla.com/D142901
This replaces all `instanceof` uses for DOM interfaces, since the operator in priviliged context works same as .isInstance().
Differential Revision: https://phabricator.services.mozilla.com/D141785
Given that we only support samesite lax/strict/none in our storage schema,
it's useful to introduce a default value, as required by the spec.
However, that would it hard to distinguish between none/lax when we switch
the default.
So, instead of doing that we use the peculiarities of our current schema
to our advantage: There's a "sameSite" attribute and a "rawSameSite"
attribute, where the latter is the literal value we received from the
server. With this patch, we'll interpret the "sameSite" attribute
based on the laxByDefault pref. This also has the advantage that various
front-end code (e.g., in DevTools) is always reading the "sameSite"
value of nsICookies.
Differential Revision: https://phabricator.services.mozilla.com/D137460
I'm also improving waitForSourcesInSourceTree to timeout faster and have an helpful error message,
clearly highlight the unexpected or missing sources.
In source tree test, it looks like adding named eval slow things down for the quick open.
So I tuned the related assertion to avoid intermittents.
We were having intermediate updates showing up named eval instead of the source with query string.
Differential Revision: https://phabricator.services.mozilla.com/D142340
Remove httpi.css that was only used by the console, and load the individual
CSS files instead.
Remove widgets.css, which is a relic of the old console.
Remove textActions.ftl import, which doesn't seem to have any effect.
Differential Revision: https://phabricator.services.mozilla.com/D142658
This removes now unused rules (targetting element from the old webconsole), and
merge rules targetting similar elements.
Differential Revision: https://phabricator.services.mozilla.com/D142656
- `category` isn't being used for console messages, so we can remove it
- `chromeContext` is only helpful when it's true, so we can omit it when it is not
We take this as an opportunity to test more properties and more message types
in browser_resources_console_messages.js.
Differential Revision: https://phabricator.services.mozilla.com/D141599
Two noteworthy details that may seem random otherwise:
* Moving values around in nsStyleDisplay is needed so that the struct
remains under the size limit that we have to avoid jumping allocator
buckets.
* All the test expectation churn is because tests depend on
`container-type: size` parsing to run, and now they run. Tests for
the relevant bits I implemented are passing, with the only exception
of some `container-name-computed.html` failures which are
https://github.com/w3c/csswg-drafts/issues/7181. Safari agrees with
us there.
Other notes when looking at the spec and seeing how it matches the
implementation:
* `container` syntax doesn't match spec, but matches tests and sanity:
https://github.com/w3c/csswg-drafts/issues/7180
* `container-type` syntax doesn't _quite_ match spec, but matches tests
and I think it's a spec bug since the definition for the missing
keyword is gone:
https://github.com/w3c/csswg-drafts/issues/7179
Differential Revision: https://phabricator.services.mozilla.com/D142419
I'm also improving waitForSourcesInSourceTree to timeout faster and have an helpful error message,
clearly highlight the unexpected or missing sources.
In source tree test, it looks like adding named eval slow things down for the quick open.
So I tuned the related assertion to avoid intermittents.
We were having intermediate updates showing up named eval instead of the source with query string.
Differential Revision: https://phabricator.services.mozilla.com/D142340
we directly use what's returned from the `Frame` component. We allow to pass
an extra `className` prop to it so we can still add the `message-location` class
that is used in the console.
Differential Revision: https://phabricator.services.mozilla.com/D142097
This simplifies the markup a bit, and hopefully could contribute to improve
layout and styling performance in the console.
Differential Revision: https://phabricator.services.mozilla.com/D142096
This replaces all `instanceof` uses for DOM interfaces, since the operator in priviliged context works same as .isInstance().
Differential Revision: https://phabricator.services.mozilla.com/D141785
ExtensionParent.jsm cannot be loaded without a profile, as explained at
https://bugzilla.mozilla.org/show_bug.cgi?id=1761072#c5.
But ExtensionsBackgroundScriptStatusWatcher would try to (lazily) load
the module before a profile was ready, in order to subscribe to future
changes. To avoid loading this whole ExtensionParent.jsm module, I have
replaced the event propagation mechanism with observers.
Differential Revision: https://phabricator.services.mozilla.com/D142065
`ownPropertyLength` is different from platform to platform, so we reassign it
the existing value to avoid making the test failing.
Depends on D140354
Differential Revision: https://phabricator.services.mozilla.com/D140641
I think it's fair to say that this is not a new feature anymore. This avoids
showing the notification every time a developer uses devtools on a local build
or so (with a clean profile).
Differential Revision: https://phabricator.services.mozilla.com/D142000
The sourcemaps one was disabled.
In the new test, I'm now trying to assert the intermediate behavior of the debugger
when we haven't reloaded the page yet.
The test now also assert much more things about the content being displayed.
And also check for breakable lines.
Differential Revision: https://phabricator.services.mozilla.com/D141334
Because WASM debugging triggers different machine code with debugging instruction,
the memory usage very significantly increase.
So avoid enabling it until the debugger is opened.
Differential Revision: https://phabricator.services.mozilla.com/D140069
In _assertDebugLine, we weren't really asserting the actual paused column in CodeMirror.
And for both line and column, we weren't asserting the line and column passed
to assertPausedAtSourceAndLine. Instead it was using selector's values.
browser_browser_toolbox_debugger.js was having issues with the new assertion.
The column markers were set at wrong positions.
I simplified the test script to workaround this.
But I tracked it down to Debugger's Script.getOffsetMetadata returning buggy offsets.
Differential Revision: https://phabricator.services.mozilla.com/D141435
I'm keeping the method as it is part of assertPausedAtSourceAndLine,
but make it a private helper that should only be used within shared-head.js.
Differential Revision: https://phabricator.services.mozilla.com/D141434
The previous method wasn't really asserting the paused location.
In only ensured that reducer state was matching CodeMirror state.
Differential Revision: https://phabricator.services.mozilla.com/D141355
Chrome code should be able to rely on CSS pixel * devicePixelRatio =
device pixel.
Chrome code that cares about the override should use
BrowsingContext.overrideDPPX. We were exposing the no-override value in
WindowUtils but that's unneeded now.
Differential Revision: https://phabricator.services.mozilla.com/D141323
In PrivatePropertiesiteratorFront#_onResult, we were always
passing privateproperty.descriptor.value to getAdHocFrontOrPrimitiveGrip,
which was causing an error when dealing with getters.
This is fixed by doing the same thing we do in PropertyIteratorFront, i.e.
checking the multiple possible properties on the property descriptor.
The existing test around object with private properties is updated to
reflect this use case.
Differential Revision: https://phabricator.services.mozilla.com/D141224
Profiles of code executing with conditional breakpoints or log points are
dominated by calls to onNewScript. This suppresses those.
Differential Revision: https://phabricator.services.mozilla.com/D138610
The shortcut is already used to open view-source and we want to let it through.
CodeMirror is using Ctrl+U for its undoSelection command, but it doesn't seem
like an important feature, so we can simply drop it.
Differential Revision: https://phabricator.services.mozilla.com/D141229
This test assert that the debugger doesn't get unexpected request while debugging a page.
But for that, we should open the page while the debugger is opened.
Otherwise the page resources might be GC-ed, forcing the debugger to fetch some content again.
Differential Revision: https://phabricator.services.mozilla.com/D141078
The HTML page was sometime GC-ed, but not always.
This led to intermittent.
Now the test always ensure that we open the debugger when
both the HTMl and the JS script are GC-ed.
Differential Revision: https://phabricator.services.mozilla.com/D140985
The issue here was that we only cleanup resources relating to all the targets
on NAVIGATE which fires on the top-level document on reload / navigate. This
is not done for the resources relating to the specific target i.e when reloading
a specific remote iframe. This patch fixes tries to fix that.
In this patch, the thread information is stored for brekpoints, tabs, sources
and source actors, to eanble easy removal when the target is removed.
Differential Revision: https://phabricator.services.mozilla.com/D139268
This action provides little value since we have a "Export to clipboard" action
that goes a step further.
Removing it will also help with virtualization as it will be one less thing to
take care of.
Differential Revision: https://phabricator.services.mozilla.com/D140804
This action provides little value since we have a "Export to clipboard" action
that goes a step further.
Removing it will also help with virtualization as it will be one less thing to
take care of.
Differential Revision: https://phabricator.services.mozilla.com/D140804
- Accessing DebuggerObject.class is showing up in profile as it's a getter, so we
cache it before calling the previewers, and pass it as an extra argument.
- Remove object destructuring in some function signatures as it's
doing extra work we might end up not needing if the previewer isn't the one
that should be used for the object.
- For some previewers, add Sets for className to match so the lookup is faster
- Avoid checking `isWorker` upfront as it has some overhead
Test for Restricted grip is updated to check that we do get the url in preview.
Differential Revision: https://phabricator.services.mozilla.com/D140603
Store the window `innerWindowId` instead of retrieving it for each message.
Refactor `getWorkerType` to not use Array method.
Differential Revision: https://phabricator.services.mozilla.com/D140627
This should help save some cycle in JSActor communication when logging objects.
The client handles those propery only when they are not falsy, so we don't need
to do anything there with this change.
Differential Revision: https://phabricator.services.mozilla.com/D140604
This helps working on debugger performance as source objects are now immutable
and so won't trigger selector updates.
This also stop updating the object/map that contains all the text contents.
Differential Revision: https://phabricator.services.mozilla.com/D138261
Depends on D140686
Not directly related to backward compat cleanup, but I spotted this unused code.
No trace of any test checking isOOP in the codebase, so I think it's safe to remove.
Differential Revision: https://phabricator.services.mozilla.com/D140687
This is equivalent to the ResourceCommand, but isn't related to any context/descriptor.
This helps listen to things right away when connecting to a RDP server.
That, without having to instantiate any descriptor/watcher actor.
It works right away via the root actor which is instantiated by default.
Differential Revision: https://phabricator.services.mozilla.com/D140206
This helps cover sourcemap logic to update breakpoint locations with columns.
This patch also shuffle tests around to introduce "integration tests".
We start running the same test scripts with two distinct environment:
* uncompressed source maps bundles (the bundles are multilines and sources format is the same as the original files)
* compressed source mapss bundles (the bundles are compressed into a unique line)
Differential Revision: https://phabricator.services.mozilla.com/D139065
The other auto-generated stubs were generated again, this time without the autolint-fix
so they will stay in the same shape.
Differential Revision: https://phabricator.services.mozilla.com/D140354
Don't clone the whole message we receive as a result of a console API call, but select
properties that are being used on the client.
As a result, we're not sending some properties anymore (`functionName`, `addonId`, `workerType`),
and we also don't include some properties when they are falsy and wouldn't bring
any benefit (`counter`,`timer`, `private`, `prefix`, `stacktrace`)
Hopefully this helps save some cycle since we're not cloning an object, but also in the
JSActor communication since the packet we need to send is smaller.
We do similar changes to the webconsoleActor method, which is still used in non
fission scenarios, and remove WebConsoleUtils.cloneObject which is no longer used.
Differential Revision: https://phabricator.services.mozilla.com/D139686
This new method is being used in DevTools code to replace the usage
that was made of `getOwnPropertyNames` only to retrieve the length
property of the returned array.
Differential Revision: https://phabricator.services.mozilla.com/D139709
This test does a bunch of assertions for a series of events which
is complex and not reliable. It also becomes overly complicated when
Fission is enabled. Looks like this test isn't really needed, so
we are removing it.
Differential Revision: https://phabricator.services.mozilla.com/D139604
This patch is introducing the machinery to automatically generate/check some
stubs used by Reps.
We're focusing on stubs that shouldn't be represented by a front as it's easier
to deal with; we should then have follow up and incremental patches for each
stubs.
Some data can't be retrieved after being serialized/deserialized (`-0`, unsafe int, …),
and in such case the associated test was modified to directly pass the object.
Differential Revision: https://phabricator.services.mozilla.com/D139933
This patch is introducing the machinery to automatically generate/check some
stubs used by Reps.
We're focusing on stubs that shouldn't be represented by a front as it's easier
to deal with; we should then have follow up and incremental patches for each
stubs.
Some data can't be retrieved after being serialized/deserialized (`-0`, unsafe int, …),
and in such case the associated test was modified to directly pass the object.
Differential Revision: https://phabricator.services.mozilla.com/D139933
This version is as simple as I can make it. It simply expects the JS
debugger to stop on the breakpoint added automatically by the
backgroundtask debugger command line processing (using
`setBreakpointOnLoad`) and disconnects, expecting the task to continue
execution and exit with exit code 0.
In the future, we'd like to interact with the task environment, for example to:
1. stop on the automatic breakpoint
2. continue
3. stop on a `debugger;`
4. set the task's exit code from a failure code to exit code 0
5. continue
6. verifies the tasks's exit code is 0.
Sadly my attempts to do this fail intermittently in automation.
Differential Revision: https://phabricator.services.mozilla.com/D139156
Background task mode is roughly equivalent to `xpcshell`, but inside
the regular browser startup flow. There is no browser window (no
`Window` at all) and there should be no content processes. It's
sufficient to treat it like `xpcshell`, with its own stripped-down
actor and a few tweaks to the integration points.
The structural changes in this commit keep `--backgroundtask` mode
slim in the regular case when the Devtools are *not* requested. This
is reflected in the small changes needed to the
`browser_xpcom_graph_wait.js` test: loading the Devtools
unconditionally causes a huge amount of code to be loaded. In order
to load the Devtools framework conditionally, we check for
Devtools-specific command line flags and delegate to Devtools when
appropriate. In order to check the command line flags, we turn the
`BackgroundTasksManager` into an XPCOM service, which allows it to be
instantiated by XPCOM in order to handle the command line.
One final note: this leaves two XPCOM components, "backgroundtasks"
and "backgroundtasksmanager". Why not combine them? This is
technically possible but not attractive: we really do want a natural
place for native/C++ code ("backgroundtasks") and JavaScript code
("backgroundtasksmanager").
Differential Revision: https://phabricator.services.mozilla.com/D129771
We may get multiple lines or incomplete lines from the pipe, so we
need to split the data and keep the leftover. This simply makes
debugging a little more pleasant.
Differential Revision: https://phabricator.services.mozilla.com/D139155
We do create dedicated targets for frame documents, but
in isFrameWithChildTarget, we were only checking if the
passed element was an iframe, making some area of the code
not behaving correctly (e.g. using the node picker, or
the Inspect Element context menu entry).
This patch fixes this and add a test case to make sure we
don't regress.
Differential Revision: https://phabricator.services.mozilla.com/D140041
No significant gain to expect as we are mostly moving things around, but this could reduce the confusion around the debugger.
Differential Revision: https://phabricator.services.mozilla.com/D138759
This test does a bunch of assertions for a series of events which
is complex and not reliable. It also becomes overly complicated when
Fission is enabled. Looks like this test isn't really needed, so
we are removing it.
Differential Revision: https://phabricator.services.mozilla.com/D139604
We only need to store the id and status of the selected browsers
for the inspector.
Functions from compatibility-user-settings are renamed to better
convey what they are actually doing, and JSDoc is added to make
everything more explicit.
Differential Revision: https://phabricator.services.mozilla.com/D139394
A number of tests (and expectations) are updated here to either avoid
accidentally relying on the size of Courier New on Windows, or to
explicitly use Courier New instead of monospace, where it's harder to
work out how to rewrite the test correctly.
Differential Revision: https://phabricator.services.mozilla.com/D87222
This changeset adds a NotificationBox to the ResponsePanel that notifies
users that a XSSI string was removed. This NotificationBox is only
displayed when the user is viewing parsed JSON using properties view.
Furthermore, when XSSI stripped characters are detected the ResponsePanel
will default to raw view.
Depends on D115442
Differential Revision: https://phabricator.services.mozilla.com/D115573
This fix makes sure that only valid XSSI prevention sequences are removed
from JSON payloads. Before, any string prepending the JSON payload was
removed which meant malformed JSON could still be displayed in properties
view as if it was valid which confused users.
Differential Revision: https://phabricator.services.mozilla.com/D115442
This adds thread information to sources (generated, original and pretty-printed-original), tabs and breakpoints
as its already done with source actors. This will make it easy to apply retrieve and cleanup these resources
based on their thread info without having to do a lot of work. Might help improve perfomance is some of
the complex selectors.
Differential Revision: https://phabricator.services.mozilla.com/D139810
We only need to store the id and status of the selected browsers
for the inspector.
Functions from compatibility-user-settings are renamed to better
convey what they are actually doing, and JSDoc is added to make
everything more explicit.
Differential Revision: https://phabricator.services.mozilla.com/D139394
We only need to store the id and status of the selected browsers
for the inspector.
Functions from compatibility-user-settings are renamed to better
convey what they are actually doing, and JSDoc is added to make
everything more explicit.
Differential Revision: https://phabricator.services.mozilla.com/D139394
There was this unique check against non-breakable lines.
browser_dbg-breakable-lines.js now test this much more in depth.
This old unique assertion is not worth keeping.
Differential Revision: https://phabricator.services.mozilla.com/D139481