Commit Graph
55 Commits
Author SHA1 Message Date
Mark Banner 88ea51175c Bug 2004680 - Automatically fix issues raised by jsdoc/check-tag-names. r=frontend-codestyle-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D275753
2025-12-22 12:41:23 +00:00
Mark Banner b38cd3110b Bug 1999554 - Automatically fix ESLint rule jsdoc/check-types for devtools/. r=devtools-reviewers,devtools-backward-compat-reviewers,profiler-reviewers,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D272173
2025-11-21 16:16:08 +00:00
Nicolas Chevobbe 6cca86e7b1 Bug 1597411 - [devtools] Directly use node.isNativeAnonymous and cleanup usages. r=devtools-reviewers,ochameau.
Remove devtools/shared/layout/utils.js isNativeAnonymous/isAnonymous and switch
callsites to directly use node.isNativeAnonymous getter.
On the client rename isAnonymous into isNativeAnonymous so it's consistent
with the platform implementation.

Differential Revision: https://phabricator.services.mozilla.com/D271553
2025-11-14 10:31:48 +00:00
Nicolas Chevobbe b60d047590 Bug 1259390 - [devtools] Highlight search matches in markup view selected node. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D255449
2025-07-02 06:18:15 +00:00
iulian moraru 6095fd0571 Revert "Bug 1259390 - [devtools] Highlight search matches in markup view selected node. r=ochameau" for causing dt failures on browser_parsable_css.js.
This reverts commit e143886f93.
2025-07-01 13:53:26 +00:00
Nicolas Chevobbe e143886f93 Bug 1259390 - [devtools] Highlight search matches in markup view selected node. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D255449
2025-07-01 12:56:33 +00:00
Nicolas Chevobbe ea74335b28 Bug 1207637 - [devtools] Add guard in NodeActor#scrollIntoView. r=devtools-reviewers,jdescottes.
The RDP method can be called for a Node actor whose underlying node
doesn't have the scrollIntoViewMethod (e.g. a Text or a Comment).

We also now use the same method between the context menu entry and the keyboard
shortcut to bail out when scrollIntoView isn't supported by the selected node,
which means that we allow scrolling into view pseudo elements.

There was no test for the context menu entry, so we add one in browser_inspector_menu-06-other.js

Differential Revision: https://phabricator.services.mozilla.com/D243905
2025-04-02 08:45:34 +00:00
Nicolas Chevobbe 2fe126109a Bug 1908669 - [devtools] Use proper private properties and method in Selection. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D216964
2024-07-22 09:22:04 +00:00
Nicolas Chevobbe d12e2b31a9 Bug 1908669 - [devtools] Turn Selection into a proper ES6 class. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D216963
2024-07-22 09:22:04 +00:00
Nicolas Chevobbe b2fe6dce88 Bug 1907932 - [devtools] Pick detached-front parentNode from mutation's remove node. r=devtools-reviewers,ochameau.
When there's a mutation and the client sees that the currently selected node
isn't connected anymore, a detached-front event is emitted with a node we think
is the parent node of the removed node, and select it.

Unfortunately, we were picking the first node who was mutated as the one we
should select, without checking that this mutation was the one triggered by the
node removal.

The fix is pretty simple: only pick a parent node if the currently selected node
is in the list of removed nodes from the mutation.

We're not adding a specific test for it, the next patch on the queue (for Bug 1173057),
has a test which was failing intermittently without this fix.

Differential Revision: https://phabricator.services.mozilla.com/D216667
2024-07-18 13:25:58 +00:00
Alexandre Poirot 59fe57c052 Bug 1793396 - [devtools] Use absolute URLs in all usages of loader.lazyRequireGetter. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D158489
2022-10-03 18:57:13 +00:00
Alexandre Poirot 9beeb07755 Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/framework. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158373
2022-09-30 15:17:36 +00:00
Mark Banner 6d03c63e2d Bug 1330099 - Enable object-shorthand eslint rule. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153567
2022-08-03 14:57:05 +00:00
Raphael Ferrand 0c21333914 Bug 1498224 - [devtools] Apply new classnames as you type in the .cls section of the rule-view r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D129515
2021-11-18 12:52:22 +00:00
Nicolas Chevobbe bfffa85102 Bug 1733523 - [devtools] Handle moving node selection when selected node's target gets destroyed. r=jdescottes.
Toolbox's Selection instance listens for `mutations` walkerFront event in order to detect if the selected node
was removed from the DOM tree, and in such case, emits a `detached-front` event that can be consumed by
the markup view.
But, when an iframe gets removed and EFT (or Fission for a remote iframe) is enabled we don't get the `mutations` event.
To fix this, we add a `onTargetDestroyed` method to `Selection`, that we call from the toolbox.

This fixes the browser_inspector_delete-selected-node-* tests when EFT is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D127224
2021-10-05 09:58:19 +00:00
Alexandre Poirot 4da661202f Bug 1729925 - [devtools] Avoid leaking Commands/DevToolsClient/Fronts when closing the toolbox. r=nchevobbe
Currently, we do leak the Toolbox/Inspector and some Documents when
closing the toolbox.
So that these classes are kept in memory, while not nullifying all its references
to client classes.

By adding these few nullications we can at least avoid leaking the fronts and commands.

(also fix a failure due to null markup.walker in browser_rules_add-rule-with-menu.js)

Differential Revision: https://phabricator.services.mozilla.com/D125535
2021-09-16 14:43:44 +00:00
Butkovits Atila 68a259ed57 Backed out 9 changesets (bug 1729925) for causing leaks. CLOSED TREE
Backed out changeset 509a0601481a (bug 1729925)
Backed out changeset ac9a15005a5b (bug 1729925)
Backed out changeset 331ffa0bd2f9 (bug 1729925)
Backed out changeset 22097d7a00c2 (bug 1729925)
Backed out changeset e9f40c89753f (bug 1729925)
Backed out changeset 14619c743301 (bug 1729925)
Backed out changeset 61dfd48f3409 (bug 1729925)
Backed out changeset 9b1eb369d679 (bug 1729925)
Backed out changeset 955138a73fa4 (bug 1729925)
2021-09-16 01:07:41 +03:00
Alexandre Poirot 70c8f3b535 Bug 1729925 - [devtools] Avoid leaking Commands/DevToolsClient/Fronts when closing the toolbox. r=nchevobbe
Currently, we do leak the Toolbox/Inspector and some Documents when
closing the toolbox.
So that these classes are kept in memory, while not nullifying all its references
to client classes.

By adding these few nullications we can at least avoid leaking the fronts and commands.

(also fix a failure due to null markup.walker in browser_rules_add-rule-with-menu.js)

Differential Revision: https://phabricator.services.mozilla.com/D125535
2021-09-15 20:08:32 +00:00
Ankit 4a3fcbd878 Bug 1690880 - Made label for element Edit option change dynamically depending on the element's namespace. r=sebo
Differential Revision: https://phabricator.services.mozilla.com/D106574
2021-03-02 12:51:57 +00:00
Julian Descottes 96670683c4 Bug 1629890 - Use Front/Actor::isDestroyed to replace actorID checks r=nchevobbe
Depends on D86325

Differential Revision: https://phabricator.services.mozilla.com/D86356
2020-08-12 11:33:44 +00:00
Nicolas Chevobbe 290ba5cb21 Bug 1568779 - Remove editors settings comments in devtools files. r=pbro.
Differential Revision: https://phabricator.services.mozilla.com/D42300
2019-08-19 12:48:16 +00:00
Gabriel Luong e5c013e044 Bug 1572460 - Refactor selection out of the InspectorFront. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D41314
2019-08-14 05:07:38 +00:00
Victor Porof b7732ae890 Bug 1561435 - Format devtools/client/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35884
2019-07-05 11:24:38 +02:00
Luca Greco 4e807eca4c Bug 1393760 - Avoid to fire multiple new-node-front events for undefined nodeFront. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D8856
2018-10-16 17:54:47 +00:00
Belén Albeza 040e021420 Bug 1473917 - Show #shadow-root in breadcrumbs. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D3017
2018-08-10 10:55:41 +00:00
Julian Descottes 9e691865a0 Bug 1465873 - part6: Allow selection and breadcrumbs to walk from shadowRoot to host element;r=bgrins
By returning the shadow root as the parentNode of some elements, the breadcrumbs could no longer
display the chain of elements correctly, because shadowRoot.parentNode is null.

This changeset:
- returns the host actor ID as part of the shadowRoot form
- adds a parentOrHost convenience method on the node form
- uses said method in selection and breadcrumbs when walking up the ancestor chain

I don't think we should unconditionally return the host element as the parentNode of the
shadow root, because that is too disconnected from the reality.

MozReview-Commit-ID: JLeDb4VuT1q
2018-06-28 13:11:08 +02:00
Julian Descottes 82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
Julian Descottes 00231e7711 Bug 1053898 - Update framework/selection setNodeFront signature to use object argument;r=gl
Both reason and isSlotted arguments of setNodeFront are optional, switching to an
object argument avoids weird calls such as setNodeFront(front, null, true) in favor
of a more explicit setNodeFront(front, { isSlotted: true });

MozReview-Commit-ID: A6nziH3QQYe
2018-03-05 14:15:57 +01:00
Julian Descottes 89f6a3a670 Bug 1053898 - Update framework/selection to support slotted selections;r=gl
With shadow dom support, a node front can be represented twice in the
markup view, once as a "slotted" version inserted in a <slot> element
and once a regular element.

We should be able to know if the selection was made on the regular or
on the slotted version.

MozReview-Commit-ID: CUpREkL0TzL
2018-03-05 13:56:00 +01:00
Nicolas Chevobbe f50726549e Bug 1382581 - Remove old-event-emitter usage from devtools/client/framework; r=bgrins.
MozReview-Commit-ID: 4oQJ3391H9S
2018-03-14 17:31:12 +01:00
J. Ryan Stinnett 8d1c817851 Bug 1443081 - Apply spacing via eslint --fix for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00
ZER0 d78f1c54ef Bug 1381542 - renamed "devtools/shared/event-emitter" in "devtools/shared/old-event-emitter"; r=ochameau
MozReview-Commit-ID: GkF8HcUg5u8
2017-08-11 03:47:30 +02:00
Wes Kocher aa1caed330 Backed out changeset 58f678547059 (bug 1381542) for conflicting with the incoming m-c merge a=backout
MozReview-Commit-ID: 1wKVHbOAUdc
2017-08-10 18:23:14 -07:00
ZER0 c91b128704 Bug 1381542 - renamed "devtools/shared/event-emitter" in "devtools/shared/old-event-emitter"; r=ochameau
MozReview-Commit-ID: GkF8HcUg5u8
2017-08-11 02:43:47 +02:00
Stanford Lockhart a158431154 Bug 1345119 - Part 1: Move functions out of grid-inspector into inspector for sharing with boxmodel. r=pbro
MozReview-Commit-ID: KlHinf9jgFX
2017-03-17 22:58:11 -03:00
Iris Hsiao 206cfb29fd Backed out 5 changesets (bug 1345119) dor mochitest failure in test_inspector_getOffsetParent.html
Backed out changeset c9be65ad95f6 (bug 1345119)
Backed out changeset 4e4817e5b6d4 (bug 1345119)
Backed out changeset 6a01debcc43c (bug 1345119)
Backed out changeset 2c6f67f420d0 (bug 1345119)
Backed out changeset ba020c15393d (bug 1345119)
2017-03-24 15:01:47 +08:00
Stanford Lockhart 36256ef3c8 Bug 1345119 - Part 1: Move functions out of grid-inspector into inspector for sharing with boxmodel. r=pbro
MozReview-Commit-ID: KlHinf9jgFX
2017-03-17 22:58:11 -03:00
Sebastian Hengst a6004f8f08 Backed out changeset ca6b6c3fe79f (bug 1345119) for failing various devtools tests, e.g. devtools/client/inspector/test/browser_inspector_textbox-menu.js. r=backout 2017-03-23 22:01:09 +01:00
Stanford Lockhart 3c0cc223ff Bug 1345119 - Part 1: Move functions out of grid-inspector into inspector for sharing with boxmodel. r=pbro
MozReview-Commit-ID: KlHinf9jgFX
2017-03-17 22:58:11 -03:00
Sebastian Hengst c6d9ef3e98 Backed out changeset 6bc38f188ef2 (bug 1330099) for devtools failures. r=backout 2017-01-11 23:21:56 +01:00
Tim Nguyen 548b6bdbef Bug 1330099 - Enable object-shorthand eslint rule. r=jryans
MozReview-Commit-ID: 3wA25rfznBv
2017-01-11 21:22:15 +00:00
Alexandre Poirot 3532d2af79 Bug 985517 - Keep pseudo class locked when selecting another node in the markup view. r=pbro
MozReview-Commit-ID: 4davyHgBtUh
2016-11-02 04:48:05 -07:00
Julian Descottes 00701306a6 Bug 1309650 - remove non remote friendly APIs from selection.js;r=pbro
MozReview-Commit-ID: 4EZIn2NWiZ5
2016-10-12 20:04:17 +02:00
Tom Tromey ffe3669aa5 Bug 1281931 - remove some unused Selection methods; r=gregtatum
MozReview-Commit-ID: 9CHYLyH30fp
2016-07-27 09:55:05 -06:00
Tom Tromey 9c7340fa09 Bug 1281931 - remove unused parameters from Selection constructor; r=gregtatum
MozReview-Commit-ID: 51wgSBIOcp8
2016-07-26 13:35:22 -06:00
Tom Tromey 85bda75417 Bug 1281931 - make framework/selection.js eslint-clean; r=gregtatum
MozReview-Commit-ID: AhPQwws4WaQ
2016-07-26 13:26:10 -06:00
Julian Descottes f53bd5b9dd Bug 1202458 - part1: inline text nodes in markupview only if they are short enough;r=pbro
The markup view will now inline a textnode in its container if and only if:
- the text node is the only child (pseudo elements included)
- the text node length is smaller than a predefined limit

If a container is expanded, its text nodes will now always be rendered in full,
no longer as a short version with an ellipsis. When selecting or navigating on
a textnode, the layout will no longer be modified on the fly.

MozReview-Commit-ID: HcDMqjbOesN
2016-06-02 10:41:49 +02:00
James Long d86f63cef0 Bug 1265854 - replace uses of nsiDOMNode constants in devtools frontend r=tromey 2016-06-03 09:47:58 -04:00
Carsten "Tomcat" Book d83db65f33 Backed out changeset f3bdf3ebaf4c (bug 1202458) for test failures in test_inspector-mutations-value.html - missed that changeset in the backout before, sorry 2016-06-02 16:32:05 +02:00
Julian Descottes 57f9c7e9d0 Bug 1202458 - part1: inline text nodes in markupview only if they are short enough;r=pbro
The markup view will now inline a textnode in its container if and only if:
- the text node is the only child (pseudo elements included)
- the text node length is smaller than a predefined limit

If a container is expanded, its text nodes will now always be rendered in full,
no longer as a short version with an ellipsis. When selecting or navigating on
a textnode, the layout will no longer be modified on the fly.

MozReview-Commit-ID: HcDMqjbOesN
2016-06-02 10:41:49 +02:00