The function is only used in tests, which is a bit concerning
as we should test the actual function being used (evaluateJSAsync).
Differential Revision: https://phabricator.services.mozilla.com/D52331
--HG--
extra : moz-landing-system : lando
The function is only used in tests, which is a bit concerning
as we should test the actual function being used (evaluateJSAsync).
Differential Revision: https://phabricator.services.mozilla.com/D52331
--HG--
extra : moz-landing-system : lando
It's not obvious to me what the culprit is, but it may be because
of the clearOutput call somehow.
Let's see if this fix the intermittent.
Differential Revision: https://phabricator.services.mozilla.com/D52321
--HG--
extra : moz-landing-system : lando
The tests are rewritten so we only have one test per
stub type. The stubs can be re-generated by passing
the --setenv WEBCONSOLE_STUBS_UPDATE=true arg when running
mach test.
We take this as an opportunity to not store the Messages
directly, but we generate them programmatically, which would
still reveal a bug as most of the test import messages.
Since we're doing that, some messages aren't localized, so
we need to add them to the L10N fixtures we have (which is
revamped a bit as getStr was getting too complex).
Differential Revision: https://phabricator.services.mozilla.com/D51596
--HG--
extra : moz-landing-system : lando
This situation can happen if a locale does not set a value for a localized devtools shortcut, ie writes
toolbox.elementPicker.key=
(with nothing after the = sign)
Differential Revision: https://phabricator.services.mozilla.com/D52099
--HG--
extra : moz-landing-system : lando
Using next-line is less error prone for refactorings than wrapping methods with enable/disable blocks.
Differential Revision: https://phabricator.services.mozilla.com/D51782
--HG--
extra : moz-landing-system : lando
The issue was in commands.js evaluateJSAsync function where
we were trying to use an undefined parameter.
The regression wasn't spotted earlier because we only have
mocha test for CSS warning, and they don't assert this
codepath.
A mochitest is added on this patch to ensure CSS Warnings
can be expanded, that they display the impacted elements
as expected, and that clicking on the icon selects the
expected element in the inspector.
Differential Revision: https://phabricator.services.mozilla.com/D51627
--HG--
extra : moz-landing-system : lando
This method is very asynchronous, called on reflows and throttled. Which means it has a high chance of intermittently failing after destroy.
Differential Revision: https://phabricator.services.mozilla.com/D51663
--HG--
extra : moz-landing-system : lando
When creating grid and display badges in the markup view, ensure they listen only to their corresponding highlighter events.
Differential Revision: https://phabricator.services.mozilla.com/D51137
--HG--
extra : moz-landing-system : lando
@gl can you take a look at the DevTools test added here?
@nika @mconley I used this.browsingContext.docShell.isContent here to rule out chrome-privileged documents. Do you know if there is better way to check if the current document is chrome-privileged or not?
Differential Revision: https://phabricator.services.mozilla.com/D51320
--HG--
extra : moz-landing-system : lando
Wait for the messages to be displayed, and requestLongerTimeout,
as test failures logs seem to indicate that slower machine take
more than 30s to run the test.
Differential Revision: https://phabricator.services.mozilla.com/D51562
--HG--
extra : moz-landing-system : lando
This makes it possible for the menus to not be constrained
to the panel boundaries if they are taller than the panel
itself (which could be the case for the simulate menu as
it has lots of items).
We need to style the button with a link role in the toolbox
CSS so they don't look like real buttons.
Differential Revision: https://phabricator.services.mozilla.com/D50461
--HG--
extra : moz-landing-system : lando
This revision refactors RDM's touch simulator to use modern touch web APIs where possible.
Differential Revision: https://phabricator.services.mozilla.com/D50147
--HG--
extra : moz-landing-system : lando
Since closing D50559, we're not using CSS Grid for the browser's container layout (see D48778 for context). This means positioning the device settings modal using CSS grid areas won't work.
An alternative to this is to contain the RDM toolbar inside the browser stack now that it uses CSS Grid. We can then use absolute positioning to have the RDM toolbar always positioning on top of the browser element and adjust its size when the device settings is opened.
Differential Revision: https://phabricator.services.mozilla.com/D51102
--HG--
extra : moz-landing-system : lando
A new parameter is added, and it expect an array
of filter objects (which contain a pattern and
a label properties), which are going to be used
by the save file dialog.
Depends on D51070
Differential Revision: https://phabricator.services.mozilla.com/D51078
--HG--
extra : moz-landing-system : lando
This test is setup to run both with and without the pref
"devtools.responsive.browserUI.enabled" set. Ideally, we can find a
way to refactor this structure into something that can be put into
devtools/client/responsive/test/browser/head.js, and other helper
functions in that file can be modified to work with the pref on or
off.
Differential Revision: https://phabricator.services.mozilla.com/D51022
--HG--
extra : moz-landing-system : lando
Depends on D51054
Summary of the changes here:
- move DOMHelpers.jsm to dom-helpers.js
- remove all unused methods
- converted to a static helper to avoid instanciating DOMHelpers objects for no reason
- updated call sites accordingly
Differential Revision: https://phabricator.services.mozilla.com/D51065
--HG--
rename : devtools/shared/DOMHelpers.jsm => devtools/shared/dom-helpers.js
extra : moz-landing-system : lando
Depends on D50466
reject-some-requires only supports require/lazyRequireGetter at the moment
We still have a few call sites for lazyImporter, even though they probably should be
migrated to lazyRequireGetter IMO.
Differential Revision: https://phabricator.services.mozilla.com/D50465
--HG--
extra : moz-landing-system : lando
1.Show sources and thread name after a thread is set to root
2.Show sources under chrome://
3.Show extension name and icon if an extension directory is set to root
{F1665109}
I'm building a better understanding of sources, sourcesTree and their utils. There could be better solutions than the ones I thought of. I'll appreciate feedback or discussions!
Differential Revision: https://phabricator.services.mozilla.com/D50438
--HG--
extra : moz-landing-system : lando
Ctrl+O (Cmd+O on OSX) will load file content into the console input.
Ctrl+S (Cmd+S on OSX) will show the file dialog for the user
to save the console input content into a file.
A test is added to ensure this works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D51070
--HG--
extra : moz-landing-system : lando
Since I started using this helper in devtools/server/ (Node actor), the file needs to move outside of devtools/client
Differential Revision: https://phabricator.services.mozilla.com/D51053
--HG--
rename : devtools/client/shared/DOMHelpers.jsm => devtools/shared/DOMHelpers.jsm
extra : moz-landing-system : lando
Depends on D50466
reject-some-requires only supports require/lazyRequireGetter at the moment
We still have a few call sites for lazyImporter, even though they probably should be
migrated to lazyRequireGetter IMO.
Differential Revision: https://phabricator.services.mozilla.com/D50465
--HG--
extra : moz-landing-system : lando
Now the `togglePrettyPrint` and `selectPrettyLocation` together handle the mapping.
mochitest is added.
Differential Revision: https://phabricator.services.mozilla.com/D50568
--HG--
extra : moz-landing-system : lando
We try to lazy load all the things we know we might
not need directly when opening the console.
Differential Revision: https://phabricator.services.mozilla.com/D50800
--HG--
extra : moz-landing-system : lando
Depends on D49941
Using ContentDOMReference instead of creating an array of selectors makes inspect element more stable in case the page is modified between after the contextmenu opens.
It will also make the feature easier to make fission compatible
Differential Revision: https://phabricator.services.mozilla.com/D49303
--HG--
extra : moz-landing-system : lando
Increase stability by replacing the arbitrary timeouts with waiting for the DOM.
Differential Revision: https://phabricator.services.mozilla.com/D50844
--HG--
extra : moz-landing-system : lando
The LongStringClient is removed and we replace its
usage with LongStringFront instead.
This require a few variable/function renaming, as
well as updating the mocks we use in node tests.
Switch usage to LongStringFront instead.
Differential Revision: https://phabricator.services.mozilla.com/D50579
--HG--
rename : devtools/client/debugger/packages/devtools-reps/src/object-inspector/tests/__mocks__/long-string-client.js => devtools/client/debugger/packages/devtools-reps/src/object-inspector/tests/__mocks__/string-front.js
rename : devtools/client/debugger/packages/devtools-reps/src/object-inspector/tests/component/create-long-string-client.js => devtools/client/debugger/packages/devtools-reps/src/object-inspector/tests/component/create-long-string-front.js
extra : moz-landing-system : lando
We try to lazy load all the things we know we might
not need directly when opening the console.
Differential Revision: https://phabricator.services.mozilla.com/D50800
--HG--
extra : moz-landing-system : lando
This patch ensures we get the cached messages
before setting the event listeners so we don't
risk having duplicated messages (coming from both
cache and event).
Differential Revision: https://phabricator.services.mozilla.com/D50602
--HG--
extra : moz-landing-system : lando
Depends on D49940
To support this feature we perform two main changes
- the node actor exposes a getAllSelectors method, and the inspector now stores all selectors rather than just one
- the node actor exposes a waitForFrameLoad method, and the walkerFront findNodeFront helper uses it to make sure frames are loaded before querying a selector
Also added a test
Differential Revision: https://phabricator.services.mozilla.com/D49941
--HG--
extra : moz-landing-system : lando
Depends on D49939
Small fix on the findNodeFront helper. The walker should be able to calculate its depth without relying on consumers to remove selectors from the array passed to findNodeFront.
Differential Revision: https://phabricator.services.mozilla.com/D49940
--HG--
extra : moz-landing-system : lando
Depends on D49938
This helper can be moved on the walker front and will be useful to find the selected node front after a page reload
Differential Revision: https://phabricator.services.mozilla.com/D49939
--HG--
extra : moz-landing-system : lando
Some callers of SpecialPowers.pushPermissions wrapped the call in a
promise. That is not needed; directly use the returned promise instead.
Differential Revision: https://phabricator.services.mozilla.com/D50487
--HG--
extra : moz-landing-system : lando
The change to await snapshotWindow is something that should have been
done in Bug 1573254.
Differential Revision: https://phabricator.services.mozilla.com/D47510
--HG--
extra : moz-landing-system : lando
This helper function awaits the new custom event sent by the RDM pane
frame script when zooming is done, then waits for the reflow to be
complete also. After this is done, resolution and window and content
sizes all have their correct, final values.
Differential Revision: https://phabricator.services.mozilla.com/D47366
--HG--
extra : moz-landing-system : lando
The ZoomChild actor normally caches its full zoom level only when it is
changed, then emits a FullZoomChange event. That event causes problems
with Responsive Design Mode, which receives the event after other
similar events that carry the full zoom level of the RDM pane content.
The RDM UI pane itself always stays at 1.0 zoom. This change makes the
ZoomChild cache its initial fullZoom level as soon as possible, which
prevents the first RDM zoom change from sending the unwanted event.
Differential Revision: https://phabricator.services.mozilla.com/D49793
--HG--
extra : moz-landing-system : lando
This change makes the RDM content frame script listen to the new
PreFullZoomChange event, and treat that as a trigger to save the
existing resolution. The content window will send 2 resize events
as it adjusts to the new RDM pane size set by the front end. After
these events are received, the resolution is restored and a new
event is fired that indicates the work of zooming is complete.
Differential Revision: https://phabricator.services.mozilla.com/D48624
--HG--
extra : moz-landing-system : lando
The change to await snapshotWindow is something that should have been
done in Bug 1573254.
Differential Revision: https://phabricator.services.mozilla.com/D47510
--HG--
extra : moz-landing-system : lando
This helper function awaits the new custom event sent by the RDM pane
frame script when zooming is done, then waits for the reflow to be
complete also. After this is done, resolution and window and content
sizes all have their correct, final values.
Differential Revision: https://phabricator.services.mozilla.com/D47366
--HG--
extra : moz-landing-system : lando
The ZoomChild actor normally caches its full zoom level only when it is
changed, then emits a FullZoomChange event. That event causes problems
with Responsive Design Mode, which receives the event after other
similar events that carry the full zoom level of the RDM pane content.
The RDM UI pane itself always stays at 1.0 zoom. This change makes the
ZoomChild cache its initial fullZoom level as soon as possible, which
prevents the first RDM zoom change from sending the unwanted event.
Differential Revision: https://phabricator.services.mozilla.com/D49793
--HG--
extra : moz-landing-system : lando
This change makes the RDM content frame script listen to the new
PreFullZoomChange event, and treat that as a trigger to save the
existing resolution. The content window will send 2 resize events
as it adjusts to the new RDM pane size set by the front end. After
these events are received, the resolution is restored and a new
event is fired that indicates the work of zooming is complete.
Differential Revision: https://phabricator.services.mozilla.com/D48624
--HG--
extra : moz-landing-system : lando
This adds a color scheme simulation toggle button in the rules view,
which will toggle between 4 different states: default, dark, light,
and no-preference.
This feature is currently hidden away under a preference:
devtools.inspector.color-scheme-simulation.enabled
The final UI/UX still needs to be figured out, however, this initial step is
to land the ability to prototype this feature.
Differential Revision: https://phabricator.services.mozilla.com/D49833
--HG--
extra : moz-landing-system : lando
This means we can also cleanup the package.json,
and remove file that were only needed for the
launchpad.
Differential Revision: https://phabricator.services.mozilla.com/D50174
--HG--
extra : moz-landing-system : lando
This revert the changes made in Bug 1587839, except the added test.
The safer fix to be uplifted is to only fix the original issue
in the SmartTrace component, where we remove any sourceId we might
have when creating the new mapped frame.
We also modify the browser_dbg-pretty-print-console test to ensure
clicking on a prettified location in the console does open the
debugger with the expected location.
Differential Revision: https://phabricator.services.mozilla.com/D50173
--HG--
extra : moz-landing-system : lando
This revert the changes made in Bug 1587839, except the added test.
The safer fix to be uplifted is to only fix the original issue
in the SmartTrace component, where we remove any sourceId we might
have when creating the new mapped frame.
We also modify the browser_dbg-pretty-print-console test to ensure
clicking on a prettified location in the console does open the
debugger with the expected location.
Differential Revision: https://phabricator.services.mozilla.com/D50173
--HG--
extra : moz-landing-system : lando
Unbind the ArrowLeft and ArrowRight keys in the request list and messages list, keeping only ArrowUp and ArrowDown, to be consistent with tree navigation and more predictable in RTL UI layout.
Differential Revision: https://phabricator.services.mozilla.com/D49457
--HG--
extra : moz-landing-system : lando
This adds a color scheme simulation toggle button in the rules view,
which will toggle between 4 different states: default, dark, light,
and no-preference.
This feature is currently hidden away under a preference:
devtools.inspector.color-scheme-simulation.enabled
The final UI/UX still needs to be figured out, however, this initial step is
to land the ability to prototype this feature.
Differential Revision: https://phabricator.services.mozilla.com/D49833
--HG--
extra : moz-landing-system : lando
The change to await snapshotWindow is something that should have been
done in Bug 1573254.
Differential Revision: https://phabricator.services.mozilla.com/D47510
--HG--
extra : moz-landing-system : lando
This helper function awaits the new custom event sent by the RDM pane
frame script when zooming is done, then waits for the reflow to be
complete also. After this is done, resolution and window and content
sizes all have their correct, final values.
Differential Revision: https://phabricator.services.mozilla.com/D47366
--HG--
extra : moz-landing-system : lando
The ZoomChild actor normally caches its full zoom level only when it is
changed, then emits a FullZoomChange event. That event causes problems
with Responsive Design Mode, which receives the event after other
similar events that carry the full zoom level of the RDM pane content.
The RDM UI pane itself always stays at 1.0 zoom. This change makes the
ZoomChild cache its initial fullZoom level as soon as possible, which
prevents the first RDM zoom change from sending the unwanted event.
Differential Revision: https://phabricator.services.mozilla.com/D49793
--HG--
extra : moz-landing-system : lando
This change makes the RDM content frame script listen to the new
PreFullZoomChange event, and treat that as a trigger to save the
existing resolution. The content window will send 2 resize events
as it adjusts to the new RDM pane size set by the front end. After
these events are received, the resolution is restored and a new
event is fired that indicates the work of zooming is complete.
Differential Revision: https://phabricator.services.mozilla.com/D48624
--HG--
extra : moz-landing-system : lando
This adds a color scheme simulation toggle button in the rules view,
which will toggle between 4 different states: default, dark, light,
and no-preference.
This feature is currently hidden away under a preference:
devtools.inspector.color-scheme-simulation.enabled
The final UI/UX still needs to be figured out, however, this initial step is
to land the ability to prototype this feature.
Differential Revision: https://phabricator.services.mozilla.com/D49833
--HG--
extra : moz-landing-system : lando
The race isn't trivial to reproduce and the test do not reproduce it.
But this was making target list tests to fail.
Differential Revision: https://phabricator.services.mozilla.com/D48856
--HG--
extra : moz-landing-system : lando
The accessibility panel is calculating the height of some of its containers by doing 100vh - toolbar height.
But the accessibility panel was relying on a local variable --accessibility-toolbar-height which was actually not used to set the height of the toolbar.
So when the toolbar height increased of 1px, all those calculations became wrong.
The --accessibility-toolbar-height is now the same as --theme-toolbar-height so I propose to remove the local variable and only use the devtools one.
Differential Revision: https://phabricator.services.mozilla.com/D50291
--HG--
extra : moz-landing-system : lando
This should make it more obvious what kind of document
the component is expecting.
Differential Revision: https://phabricator.services.mozilla.com/D50240
--HG--
extra : moz-landing-system : lando
This test is relying on a profiler feature that is not available in every
platform. This patch changes it to use the "js" feature, which should be
supported everywhere.
Differential Revision: https://phabricator.services.mozilla.com/D49948
--HG--
extra : moz-landing-system : lando