Commit Graph
41 Commits
Author SHA1 Message Date
Julian Descottes c6e7ad0994 Bug 1913529 - [devtools] Fix propTypes warnings when using the debugger r=devtools-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D219367
2024-09-02 10:05:45 +00:00
Alexandre Poirot c9c5297677 Bug 1853899 - [devtools] Introduce a new Menu Button dedicated to source maps. r=devtools-reviewers,nchevobbe
It allows
* toggling Source Map support entirely
* open the source map URL (when a bundle file is currently selected)
* open the mapped source (original or bundle)
* toggle the "open original source by default" setting
* show source map status (source map error, is it original or bundle file, is this a regular source?)

Differential Revision: https://phabricator.services.mozilla.com/D187577
2024-02-20 11:14:33 +00:00
Narcis Beleuzu e2b42b8b1d Backed out changeset 749f10073ff4 (bug 1853899) for dt failure on browser_dbg-sourcemaps-bogus.js CLOSED TREE 2024-02-09 03:56:22 +02:00
Alexandre Poirot 658bd889e8 Bug 1853899 - [devtools] Introduce a new Menu Button dedicated to source maps. r=devtools-reviewers,nchevobbe
It allows
* toggling Source Map support entirely
* open the source map URL (when a bundle file is currently selected)
* open the mapped source (original or bundle)
* toggle the "open original source by default" setting
* show source map status (source map error, is it original or bundle file, is this a regular source?)

Differential Revision: https://phabricator.services.mozilla.com/D187577
2024-02-08 16:43:59 +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 a85b82697f Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/shared. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D158379
2022-09-30 15:17:39 +00:00
Alexandre Poirot 0f32f335e3 Bug 1789201 - [devtools] Expose Services as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,julienw,AlexandruIonescu
This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests

Differential Revision: https://phabricator.services.mozilla.com/D156401
2022-09-09 07:22:51 +00:00
Tetsuharu Ohzeki 7c92bd768e Bug 1508688 - Add UNSAFE_ prefix to React deprecated lifecycle methods in devtools/client/shared/. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D149483
2022-06-16 10:03:11 +00:00
Nicolas Chevobbe 13579fb6a5 Bug 1616847 - When xulWrapper is visible move it instead of trying to show it again. r=jdescottes.
If the XUL wrapper was opened and a consumer called show again,
the panel wouldn't update its position. This can be fixed by checking the
state of the element, and if it's open move the panel using `_moveXulWrapperTo`.

With this change in place, we can remove the updateContainerBounds methods,
as it has the same arguments and is only used in one place.

Differential Revision: https://phabricator.services.mozilla.com/D63488
2020-03-06 13:02:22 +00:00
Narcis Beleuzu 4ee0475f73 Backed out 2 changesets (bug 1616847, bug 1609942) for dt failures on browser_jsterm_autocomplete_control_space.js . CLOSED TREE
Backed out changeset c1d7d5e9a18b (bug 1609942)
Backed out changeset 7a5178ee8cd2 (bug 1616847)
2020-02-28 22:05:05 +02:00
Nicolas Chevobbe df3967f5da Bug 1616847 - When xulWrapper is visible move it instead of trying to show it again. r=jdescottes.
If the XUL wrapper was opened and a consumer called show again,
the panel wouldn't update its position. This can be fixed by checking the
state of the element, and if it's open move the panel using `_moveXulWrapperTo`.

With this change in place, we can remove the updateContainerBounds methods,
as it has the same arguments and is only used in one place.

Differential Revision: https://phabricator.services.mozilla.com/D63488
2020-02-28 15:08:22 +00:00
Cosmin Sabou 3056d5d619 Backed out 2 changesets (bug 1616847, bug 1609942) for devtools failures on browser_jsterm_autocomplete_getters_cache.js.
CLOSED TREE

Backed out changeset 0ee1ac6bab06 (bug 1609942)
Backed out changeset 2357c3d7aa4a (bug 1616847)
2020-02-26 21:39:11 +02:00
Nicolas Chevobbe f178c1ae0e Bug 1616847 - When xulWrapper is visible move it instead of trying to show it again. r=jdescottes.
If the XUL wrapper was opened and a consumer called show again,
the panel wouldn't update its position. This can be fixed by checking the
state of the element, and if it's open move the panel using `_moveXulWrapperTo`.

With this change in place, we can remove the updateContainerBounds methods,
as it has the same arguments and is only used in one place.

Differential Revision: https://phabricator.services.mozilla.com/D63488
2020-02-26 13:03:41 +00:00
Daniel Varga 40fe6c63d5 Backed out changeset df563f103355 (bug 1616847) for causing devtools failure at devtools/client/shared/test/browser_html_tooltip_offset.js
CLOSED TREE
2020-02-24 23:50:19 +02:00
Nicolas Chevobbe e5a6d63a19 Bug 1616847 - When xulWrapper is visible move it instead of trying to show it again. r=jdescottes.
If the XUL wrapper was opened and a consumer called show again,
the panel wouldn't update its position. This can be fixed by checking the
state of the element, and if it's open move the panel using `_moveXulWrapperTo`.

With this change in place, we can remove the updateContainerBounds methods,
as it has the same arguments and is only used in one place.

Differential Revision: https://phabricator.services.mozilla.com/D63488
2020-02-24 16:09:28 +00:00
Daisuke Akatsuka f572ebfb1f Bug 1610594: Support icon for MenuButton component. r=jdescottes
Depends on D61149

Differential Revision: https://phabricator.services.mozilla.com/D61150
2020-02-06 02:31:47 +00:00
Csoregi Natalia 0a03c7c4dc Backed out 3 changesets (bug 1610594) for failures on e.g. browser_device_selector_items.js. CLOSED TREE
Backed out changeset a9a2395b667f (bug 1610594)
Backed out changeset c3f7182fd57f (bug 1610594)
Backed out changeset 3ec353a434f9 (bug 1610594)
2020-02-06 04:26:59 +02:00
Daisuke Akatsuka e6c00b3d06 Bug 1610594: Support icon for MenuButton component. r=jdescottes
Depends on D61149

Differential Revision: https://phabricator.services.mozilla.com/D61150
2020-02-05 16:15:55 +00:00
Nicolas Chevobbe 4bd90386e4 Bug 1590093 - Lazy load console components. r=Honza.
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
2019-10-29 10:46:51 +00:00
Ciure Andrei e1f7e6e59b Backed out changeset 0a516296693b (bug 1590093) for causing browser_jsterm_selfxss.js to permafail CLOSED TREE 2019-10-28 17:15:50 +02:00
Nicolas Chevobbe 7d2ac33079 Bug 1590093 - Lazy load console components. r=Honza.
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
2019-10-28 13:23:15 +00:00
Nicolas Chevobbe a56fb5fef6 Bug 1585923 - Rename MenuButton doc prop to toolboxDoc. r=jdescottes.
This should make it more obvious what kind of document
the component is expecting.

Differential Revision: https://phabricator.services.mozilla.com/D50240
2019-10-24 05:56:10 +00:00
Michael Ratcliffe 2afac0b5e0 Bug 1580631 - [Inactive CSS] Tooltip should hang off to right side in LTR mode r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D46284
2019-09-24 11:21:46 +00:00
Andreea Pavel d6c7e861b8 Backed out changeset b46946d6e446 (bug 1580631) dt failures at browser_html_tooltip_doorhanger-01.js on a CLOSED TREE 2019-09-20 17:41:19 +03:00
Michael Ratcliffe c41a4ac87a Bug 1580631 - [Inactive CSS] Tooltip should hang off to right side in LTR mode r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D46284
2019-09-20 10:34:29 +00:00
Yura Zenevich 35c0c6ddaa Bug 1565460 - improve accessibility and configurability of the shared menu components. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D39117
2019-08-03 23:12:58 +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
Mark Banner 3d6aaad3f5 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389
2018-10-19 12:55:39 +00:00
Mantaroh Yoshinaga 48dcf20430 Bug 1488721 - Prevent closing the popup menu by clicking the space of tooltip popup menu. r=birtles
Differential Revision: https://phabricator.services.mozilla.com/D9059
2018-10-18 05:48:55 +00:00
Mantaroh Yoshinaga 34b24f3485 Bug 1490358 - Hide menu popup when press the ctrl+t. r=birtles
If push the ctrl+t, browser will open the new tab. In this case,
the XUL popup panel doesn't hide automatically(autohide=false).
As the result of it, the popup menu will be displayed in the new tab
content. So this patch will hide the popup when receiving the ctr+t
shortcut in the MenuButton.

Differential Revision: https://phabricator.services.mozilla.com/D8809
2018-10-16 07:13:04 +00:00
Mantaroh Yoshinaga fd816e6326 Bug 1493659 - Skip the click event handler if touch event has occurred. r=birtles
Tapping the menu button during the panel has shown make the menu button to be unopenable. This cause reason is removing the pointer-events property before the mouse event happens.
The tapping event will happen many the event like the following:
1) touchstart
2) touchmove (Long tap only)
3) touchend
4) mousedown
5) mouseup
6) click

This patch will detect the touchend event to eat the click event.

Differential Revision: https://phabricator.services.mozilla.com/D7827
2018-10-07 17:52:11 +00:00
Gabriel Luong becc8fb549 Bug 1494162 - Part 43: Lazy load createPortal to avoid creating the children of the MenuButton. r=birtles 2018-10-04 15:46:23 -04:00
Mantaroh Yoshinaga 6f7df8a1ac Bug 1472942 - Part 2. Add setContentSize() instead of setContent() in HTMLTooltip. r=birtles
This patch will remove setContest(), and change the following things instead of this:

 * Use HTMLTooltip.panel.appendChild() instead of HTMLTooltip.setContent().
 * Add HTMLTooltip.setContetnSize() to specify the panel size if need this.

Differential Revision: https://phabricator.services.mozilla.com/D7044
2018-09-27 07:14:55 +00:00
Mantaroh Yoshinaga 65e9a515c8 Bug 1476549 - Part 3. Support the children of function type on the MenuButton. r=birtles
This patch will:
 - Call the children as function when rendering if MenuButton's children property is the function.
 - Add the callback which is called when the focused item changed.

Differential Revision: https://phabricator.services.mozilla.com/D6352
2018-09-20 06:28:00 +00:00
Mantaroh Yoshinaga 2f40fdbd52 Bug 1484595 - Remove the HTMLTooltip hidden event listener before destroying the HTMLTooltip. r=birtles
MenuButton will listen the HTMLTooltip hidden event even if HTMLTooltip is
destroyed. As a result of it, the timer which issued in the MenuButton's event
listener might fail due to the target window is destroyed. (e.g., switching the
dock mode to bottom  from window mode.)

This patch will remove this event listener before destroying the HTMLTooltip.

Differential Revision: https://phabricator.services.mozilla.com/D3759
2018-08-20 07:03:07 +00:00
shindli 4b359b43ba Backed out changeset fc5c57e9b65b (bug 1484595) for linting failure on a CLOSED TREE 2018-08-20 10:38:08 +03:00
Mantaroh Yoshinaga 86f14b469b Bug 1484595 - Remove the HTMLTooltip hidden event listener before destroying the HTMLTooltip. r=birtles
MenuButton will listen the HTMLTooltip hidden event even if HTMLTooltip is
destroyed. As a result of it, the timer which issued in the MenuButton's event
listener might fail due to the target window is destroyed. (e.g., switching the
dock mode to bottom  from window mode.)

This patch will remove this event listener before destroying the HTMLTooltip.

Differential Revision: https://phabricator.services.mozilla.com/D3759
2018-08-20 07:03:07 +00:00
Mantaroh Yoshinaga 9370afd91f Bug 1477088 - Part 1. Force adding the focus to the button in order to handle the key event. r=birtles
The menu button can't receive the key event on macOS since macOS doesn't leave the focus of the menu button even if click the menu button.
So this patch will add the focus to the button when clicking the button.

Differential Revision: https://phabricator.services.mozilla.com/D2585
2018-08-08 08:16:12 +09:00
Brian Birtles bb08c95913 Bug 1474234 - Don't pass internal props onto child button in MenuButton; r=jdescottes
Otherwise we will get errors like:

console.error: "Warning: React does not recognize the `menuId` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `menuid` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\n    in button (created by MenuButton)\n    in MenuButton (created by ToolboxToolbar)\n    in div (created by ToolboxToolbar)\n    in div (created by ToolboxToolbar)\n    in ToolboxToolbar (created by ToolboxController)\n    in ToolboxController"

console.error: "Warning: React does not recognize the `menuPosition` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `menuposition` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\n    in button (created by MenuButton)\n    in MenuButton (created by ToolboxToolbar)\n    in div (created by ToolboxToolbar)\n    in div (created by ToolboxToolbar)\n    in ToolboxToolbar (created by ToolboxController)\n    in ToolboxController"

console.error: "Warning: React does not recognize the `menuOffset` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `menuoffset` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\n    in button (created by MenuButton)\n    in MenuButton (created by ToolboxToolbar)\n    in div (created by ToolboxToolbar)\n    in div (created by ToolboxToolbar)\n    in ToolboxToolbar (created by ToolboxController)\n    in ToolboxController"

It's also not what we intend to do.

Differential Revision: https://phabricator.services.mozilla.com/D2640
2018-08-02 09:59:24 +09:00
Mantaroh Yoshinaga 0f95bb2e21 Bug 1473209 - Ignore the click event until popup is hidden. r=birtles.
The widget will hide the XUL panel when clicking to the outside of panel
automatically.
If a user clicks the MenuButton when opening the popup, the popup will hide
automatically and mouse click event will be fired on macOS and Linux.
(Windows will eat this click event since the consumeoutsideclicks of this panel
is false.)

As a result of it, the popup menu will be reopened. In order to prevent this,
this patch will disable the MenuButton until popup is hidden by using
the popuphidden event. This popuphidden event will be fired before the click
event of MenuButton, then the click event of MenuButton will be fired after
popuphidden immediately.

MozReview-Commit-ID: 42xV0aWDmkR
2018-07-27 13:38:12 +09:00
Brian Birtles f65051e51d Bug 1461522 - Add Menu components; r=jdescottes
MozReview-Commit-ID: DJVU4rRYQYU
2018-06-28 15:13:06 +09:00