The JavaScript tracer will log special format of links, including a precise location,
by appending `@${line}:${column}` to each frame's source's URL.
This URL pattern is later interpreted by DevTools command line handler in order
to automatically open the source's location in the debugger.
Differential Revision: https://phabricator.services.mozilla.com/D174098
Most of the API exposed on Debugger panel object were actually related to view-source code.
The code related to getOriginalLocation could be greatly factorized with existing helpers
within the debugger.
Differential Revision: https://phabricator.services.mozilla.com/D169327
This patch tries to cover a few things :-
1) The `location` object now also maintains an optional `sourceActorId` property
2) `selectSource` now takes an optional `sourceActor` argument which is used to
augument the `location` object and passed to `selectLocation` then onto
`loadSourceText` function to load the specific source text.
3) A new selector `getFirstSourceActorForGeneratedSource` to select the source actor to load the
source text.
4) `LoadSourceText`now always track the selected source actor (which should load the source text)
each time a location is selected.
Differential Revision: https://phabricator.services.mozilla.com/D155952
This patch tries to cover a few things :-
1) The `location` object now also maintains an optional `sourceActorId` property
2) `selectSource` now takes an optional `sourceActor` argument which is used to
augument the `location` object and passed to `selectLocation` then onto
`loadSourceText` function to load the specific source text.
3) A new selector `getFirstSourceActorForGeneratedSource` to select the source actor to load the
source text.
4) `LoadSourceText`now always track the selected source actor (which should load the source text)
each time a location is selected.
Differential Revision: https://phabricator.services.mozilla.com/D155952
In `viewSourceInStyleEditor`, we used to first load the styleeditor, and then
select the stylesheet and show the panel. This mean that when clicking on a location
from the rule view, there would be some delays before we show any feedback to the user.
Since the load promise for the panel only settles once we watched for all existing
stylesheets and loaded their content for each of them, it could take a while in
cases where we have lots of stylesheets, like in the BrowserToolbox.
So here we modify `viewSourceInStyleEditor` to directly select the styleeditor and
passing it a stylesheet that can be added right away, in case the panel wasn't
loaded yet, without waiting for the stylesheets to be watched.
We take this as an opportunity add a test when `viewSourceInStyleEditor` is called
with a stylesheet not used on the page, and check that it does open a view-source tab.
Differential Revision: https://phabricator.services.mozilla.com/D146540
Pass on column from props.onViewSourceInDebugger (///devtools/client/shared/components/reps/reps.js:6844//) to
//devtools/client/webconsole/webconsole-wrapper.js:267// as **frame.column**
Differential Revision: https://phabricator.services.mozilla.com/D22372
Pass CSS warning column location through viewSourceInStyleEditor
so clicking on CSS warnings in console jumps to the right location in style editor
Differential Revision: https://phabricator.services.mozilla.com/D21682
Along with removing the view source standalone windows and prefs this patch:
1) Re-structures several of the view source tests that were only testing the old
standalone windows to now test view source in tab.
2) Adds support viewSourceUtils.viewSource() to open a browser window when there
aren't any open (for browser toolbox view source).
3) Cleans up some of the API for viewSourceUtils and removes the old deprecated
ways of calling it.
MozReview-Commit-ID: DI6sgZwbCf
Currently viewSourceInDebugger() only waits for a source to be shown if it is
not the selected one. If the requested source is selected by default, it might
already be selected when the isLoading check is made. However, the actual
source text might still be loading since it is loaded asynchronously.
In this case the method does not wait for the source to be shown meaning the
method resolves before the source is ready in the debugger. This causes
browser_toolbox_view_source_01.js to fail intermittently with wrong
line number since it looks at the focused line BEFORE the source text has
loaded and the correct line is selected.
This changeset modifies the behavior of viewSourceInDebugger() to also wait for
source shown event if the source is already selected but still loading.
MozReview-Commit-ID: JvxjJ5Yt19a
For simple rules like function spacing, we can auto-fix these across the code
base so they are followed in a consistent way.
To generate this patch, I ran:
./mach eslint devtools --no-ignore --fix
After this, I reverted any changes to third party files that we really do want
to ignore.
MozReview-Commit-ID: 6Q8BApkAW20