Commit graph

67 commits

Author SHA1 Message Date
Alexandre Poirot
7f9229d43d 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
Noemi Erli
539bbccc5d Backed out 2 changesets (bug 1780912) for causing failures in browser_aboutdebugging_addons_debug_console.js CLOSED TREE
Backed out changeset d2360a2a3d70 (bug 1780912)
Backed out changeset 21f1e9031be0 (bug 1780912)
2022-09-08 01:59:18 +03:00
Alexandre Poirot
80c9c861dd Bug 1780912 - [devtools] Make the local web extension toolbox be always on top. r=nchevobbe,eemeli
This allows to keep the DevTools visible while interacting with the Firefox
window where the extension is running.

This behavior is enabled by default, but can be disable on-demand via a button
in the top toolbar.
Note that it requires to close and reopen the window/toolbox as platform APIs
disallow changing this behavior "live" on a given window.

Differential Revision: https://phabricator.services.mozilla.com/D155843
2022-09-07 21:00:17 +00:00
Emilio Cobos Álvarez
a7401488af Bug 1784265 - Drop support for flex attribute values other than 0 and 1. r=dholbert,mconley,preferences-reviewers
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.

Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).

In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.

Add a debug-only assertion to ensure we preserve behavior for now.

Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.

Differential Revision: https://phabricator.services.mozilla.com/D154394
2022-08-12 23:13:41 +00:00
Marian-Vasile Laza
7f5e2711c6 Backed out 3 changesets (bug 1784265) for causing reftest failures on flex-emulation-1.xhtml. CLOSED TREE
Backed out changeset 415da4b53bdd (bug 1784265)
Backed out changeset e27b21c54b1f (bug 1784265)
Backed out changeset fcb1a053fbe2 (bug 1784265)
2022-08-13 01:14:13 +03:00
Emilio Cobos Álvarez
a2ec6564f3 Bug 1784265 - Drop support for flex attribute values other than 0 and 1. r=dholbert,mconley,preferences-reviewers
This makes it easier to get parity between legacy and regular flex
without having to either have tons of arbitrary attribute selectors in
the xul sheet, nor adding attribute lookup hacks to the html flexbox
layout.

Also, reimplement the remaining supported flex attribute-values (0 and 1)
purely in terms of CSS rules in xul.css (regardless of whether
emulate-moz-box-with-flex is enabled).

In practice these are pretty uncommon and the style attribute does the
trick in every case I've tried.

Add a debug-only assertion to ensure we preserve behavior for now.

Add a new test with another behavior difference between flexbox
emulation and old xul layout because the old reftest now passes. Use
replaced elements, which in modern flex are treated differently.

Differential Revision: https://phabricator.services.mozilla.com/D154394
2022-08-12 19:34:34 +00:00
Ben Hearsum
622826bf1d Bug 1766636: ensure Browser Content Toolbox groups with the correct Windows taskbar icon r=nchevobbe,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D152461
2022-08-08 15:59:38 +00:00
Mark Banner
a6855db57e 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
Emilio Cobos Álvarez
7829e5aab5 Bug 1774378 - Make select code harder to mess up. r=Gijs
Right now we rely on the menulist to be injected by hand in all the
relevant windows. Instead create it lazily, making the select code more
standalone.

The DevTools window was missing it, for example.

Differential Revision: https://phabricator.services.mozilla.com/D149620
2022-06-21 21:42:58 +00:00
Emilio Cobos Álvarez
b651bfe99a Bug 1744009 - Simplify combobox <select> code. r=mconley,dholbert
With this patch on its own we get some a11y tests failures, but those
are fixed on a later patch.

Combobox select no longer creates frames for its <options>, nor an
nsListControlFrame. Instead, it computes its right intrinsic size using
the largest size of the options. This is better, because we render the
option text using the select style so if the select and option styles
are mismatched it'd cause changes in the size of the select when text
changes. See the following in a build without the patch, for example:

  <select>
    <option>ABC</option>
    <option style="font-size: 1px">Something long</option>
  </select>

This seems like a rather obscure case, but it's important to get it
right, see bug 1741888.

With this patch we use the same setup in content and parent processes
(this needs bug 1596852 and bug 1744152). This means we can remove a
bunch of the native view and popup code in nsListControlFrame. A couple
browser_* tests are affected by this change and have been tweaked
appropriately (the changes there are trivial).

Not creating an nsListControlFrame for dropdown select means that we
need to move a bunch of the event handling code from nsListControlFrame
to a common place that nsComboboxControlFrame can also use. That place
is HTMLSelectEventListener, and I think the setup is much nicer than
having the code intertwined with nsListControlFrame. It should be
relatively straight-forward to review, mostly moving code from one part
to another.

Another thing that we need to do in HTMLSelectEventListener that we
didn't use to do is listening for DOM mutations on the dropdown. Before,
we were relying on changes like text mutations triggering a reflow of
the listcontrolframe, which also triggered a reflow of the
comboboxcontrolframe, which in turn updated the text of the anonymous
content. Now we need to trigger that reflow manually.

There are some further simplifications that can be done after this
lands (cleanup naming of openInParentProcess and so on, among others),
but I'd rather land this first (after the merge of course) and work on
them separately.

Differential Revision: https://phabricator.services.mozilla.com/D132719
2022-01-17 11:10:05 +00:00
Marian-Vasile Laza
35a88d897e Backed out 2 changesets (bug 1744009) for causing reftest failures on select-3.html.
Backed out changeset 3e44e31d3d12 (bug 1744009)
Backed out changeset 619389788775 (bug 1744009)
2022-01-17 11:14:27 +02:00
Emilio Cobos Álvarez
a8d469a8d0 Bug 1744009 - Simplify combobox <select> code. r=mconley,dholbert
With this patch on its own we get some a11y tests failures, but those
are fixed on a later patch.

Combobox select no longer creates frames for its <options>, nor an
nsListControlFrame. Instead, it computes its right intrinsic size using
the largest size of the options. This is better, because we render the
option text using the select style so if the select and option styles
are mismatched it'd cause changes in the size of the select when text
changes. See the following in a build without the patch, for example:

  <select>
    <option>ABC</option>
    <option style="font-size: 1px">Something long</option>
  </select>

This seems like a rather obscure case, but it's important to get it
right, see bug 1741888.

With this patch we use the same setup in content and parent processes
(this needs bug 1596852 and bug 1744152). This means we can remove a
bunch of the native view and popup code in nsListControlFrame. A couple
browser_* tests are affected by this change and have been tweaked
appropriately (the changes there are trivial).

Not creating an nsListControlFrame for dropdown select means that we
need to move a bunch of the event handling code from nsListControlFrame
to a common place that nsComboboxControlFrame can also use. That place
is HTMLSelectEventListener, and I think the setup is much nicer than
having the code intertwined with nsListControlFrame. It should be
relatively straight-forward to review, mostly moving code from one part
to another.

Another thing that we need to do in HTMLSelectEventListener that we
didn't use to do is listening for DOM mutations on the dropdown. Before,
we were relying on changes like text mutations triggering a reflow of
the listcontrolframe, which also triggered a reflow of the
comboboxcontrolframe, which in turn updated the text of the anonymous
content. Now we need to trigger that reflow manually.

There are some further simplifications that can be done after this
lands (cleanup naming of openInParentProcess and so on, among others),
but I'd rather land this first (after the merge of course) and work on
them separately.

Differential Revision: https://phabricator.services.mozilla.com/D132719
2022-01-16 23:31:22 +00:00
Nicolas Chevobbe
3971522a79 Bug 1732627 - Remove usage of Promise.jsm in toolbox-hosts.js. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D126662
2021-09-28 10:13:58 +00:00
Julian Descottes
2a85b4f393 Bug 1650963 - [devtools] Set non-fission flag when opening DevTools window from a non-fission host tab r=Honza
We cannot use swapFrameLoaders between a fission and a non fission window. We should make sure to open non-fission windows if the current host is not a fission one.

Differential Revision: https://phabricator.services.mozilla.com/D96696
2020-11-12 15:18:43 +00:00
Julian Descottes
19c8bdd3d8 Bug 1611099 - Do not set frame.tooltip when creating the devtools BrowserToolbox frame r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D60984

--HG--
extra : moz-landing-system : lando
2020-01-27 16:07:37 +00:00
Julian Descottes
c9c4a4d0a7 Bug 1610277 - Stop emitting unused "ready" event from DevTools host r=ochameau
Depends on D59132

Differential Revision: https://phabricator.services.mozilla.com/D60398

--HG--
extra : moz-landing-system : lando
2020-01-20 14:00:02 +00:00
Julian Descottes
8289090415 Bug 1607754 - Only load about:blank in the devtools frame when switching hosts r=ochameau
Depends on D58238

Differential Revision: https://phabricator.services.mozilla.com/D59132

--HG--
extra : moz-landing-system : lando
2020-01-20 13:11:25 +00:00
Julian Descottes
ec77c620a6 Bug 1585747 - Remove devtools preference devtools.toolbox.content-frame r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D47963

--HG--
extra : moz-landing-system : lando
2020-01-14 14:45:41 +00:00
Julian Descottes
502a2faa1f Bug 1604491 - Implement host raise/setTitle for browsertoolbox host r=ochameau
Depends on D58235. Move browsertoolbox host logic directly to browsertoolbox host

Differential Revision: https://phabricator.services.mozilla.com/D58236

--HG--
extra : moz-landing-system : lando
2020-01-08 12:58:55 +00:00
Julian Descottes
986ddfa2b7 Bug 1604491 - Rename CUSTOM DevTools host to BROWSERTOOLBOX r=ochameau
Only renaming methods/variables/files here.

Differential Revision: https://phabricator.services.mozilla.com/D58235

--HG--
rename : devtools/client/framework/test/browser_toolbox_custom_host.js => devtools/client/framework/test/browser_toolbox_browsertoolbox_host.js
extra : moz-landing-system : lando
2020-01-08 11:28:12 +00:00
Julian Descottes
1d6c24996c Bug 1581093 - Fix blank DevTools window in private browsing, set private flag on host window r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D56636

--HG--
extra : moz-landing-system : lando
2019-12-12 13:17:10 +00:00
Brian Grinstead
d4fff93546 Bug 1595636 - Rename xul->xhtml for non-tests in DevTools r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D52711

--HG--
rename : devtools/client/framework/toolbox-window.xul => devtools/client/framework/toolbox-window.xhtml
rename : devtools/client/framework/toolbox.xul => devtools/client/framework/toolbox.xhtml
rename : devtools/client/performance/index.xul => devtools/client/performance/index.xhtml
rename : devtools/client/storage/index.xul => devtools/client/storage/index.xhtml
rename : devtools/client/styleeditor/index.xul => devtools/client/styleeditor/index.xhtml
extra : moz-landing-system : lando
2019-11-13 23:44:19 +00:00
Julian Descottes
3f0e2f4c4f Bug 1592517 - Migrate devtools DOMHelpers.jsm from JSM to plain JS module r=ochameau
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
2019-10-30 11:25:01 +00:00
Julian Descottes
e266463281 Bug 1592513 - Move DOMHelpers.jsm from devtools/client/shared/ to devtools/shared/ r=rcaliman
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
2019-10-30 11:05:04 +00:00
Nika Layzell
62821fbf63 Bug 1581925 - Part 4: Use <browser> for the content devtools toolbox, r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D48094

--HG--
extra : moz-landing-system : lando
2019-10-07 19:35:07 +00:00
shindli
1f419c5c75 Backed out changeset 97efcd0fa370 (bug 1585747) for causing mochitest permafailures in /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/BrowsingContextGroup CLOSED TREE 2019-10-04 12:03:47 +03:00
Julian Descottes
5f317e2d24 Bug 1585747 - Remove devtools preference devtools.toolbox.content-frame r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D47963

--HG--
extra : moz-landing-system : lando
2019-10-03 15:15:49 +00:00
Julian Descottes
9e623bb5f5 Bug 1539979 - Use a frame with type=content for DevTools frames r=ochameau
This introduces a preference to load the DevTools toolbox
in a frame with type=content instead of type=chrome.
Having a preference will allow to keep the previous behavior in a
few intermittent tests, while we collect feedback on Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D40988

--HG--
extra : moz-landing-system : lando
2019-08-20 05:55:54 +00:00
Nicolas Chevobbe
925311bc77 Bug 1568779 - Remove editors settings comments in devtools files. r=pbro.
Differential Revision: https://phabricator.services.mozilla.com/D42300

--HG--
extra : moz-landing-system : lando
2019-08-19 12:48:16 +00:00
Victor Porof
f6db0ee557 Bug 1561435 - Format devtools/client/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35884

--HG--
extra : source : 60e4496cf9699dc59f2f4738cb60f87cbdb01e67
2019-07-05 11:24:38 +02:00
Julian Descottes
027cdd0432 Bug 1539979 - Create toolbox iframe for Window host with helper;r=bgrins
Depends on D26316
Instead of using a hardcoded iframe in toolbox-window.xul, reuse the same helper as for the other hosts.
Will facilitate switching to type="content".

Differential Revision: https://phabricator.services.mozilla.com/D26317

--HG--
extra : moz-landing-system : lando
2019-04-10 01:04:38 +00:00
Julian Descottes
edcc1fac74 Bug 1539979 - Add helper to create devtools iframes;r=bgrins
Shared helper to create DevTools frames for side and bottom hosts.
Will make it easier to swap to type="content" in a single spot.

Differential Revision: https://phabricator.services.mozilla.com/D26316

--HG--
extra : moz-landing-system : lando
2019-04-10 01:04:37 +00:00
Daisuke Akatsuka
0c01c764aa Bug 1521440: Avoid to move to about:blank after destroying. r=ochameau,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D17795

--HG--
extra : moz-landing-system : lando
2019-01-31 18:08:19 +00:00
Paolo Amadini
4270e25239 Bug 1505791 - Separate the browser panel from the notification box. r=dao,bgrins
This clarifies the intention of each caller, and opens up the possibility of converting the notificationbox element to a class that creates the DOM nodes on demand.

Differential Revision: https://phabricator.services.mozilla.com/D10577

--HG--
extra : rebase_source : e311dd7144cf9f7cd513761f97bb3dd0a35dce71
extra : source : 9532194794ba9c87025da92cf70f76c21a277220
2018-11-08 15:31:37 +00:00
Mark Banner
ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
Jan Odvarko
d48833fbbc Bug 1491749 - Stop using xul:keyset and xul:key in toolbox-window.xul; r=bgrins,flod
Differential Revision: https://phabricator.services.mozilla.com/D6015

--HG--
extra : moz-landing-system : lando
2018-09-19 09:58:08 +00:00
Brendan Dahl
f6923ccc24 Bug 1485426 - Use createXULElement instead of createElement in XUL docs. r=bgrins
Preparing for transitioning to XHTML.

MozReview-Commit-ID: JLlmUxsvhIB

Differential Revision: https://phabricator.services.mozilla.com/D4265

--HG--
extra : moz-landing-system : lando
2018-08-25 00:16:27 +00:00
Mantaroh Yoshinaga
b6192ab609 Bug 1470074 - Check direction when changing the dock position. r=gl
We add the devtool's iframe and splitter and browser content into XUL element.
If the environment is RTL, this element order is inverted.
So this patch will add the condition of direction to decide this element order.

Differential Revision: https://phabricator.services.mozilla.com/D4035

--HG--
extra : moz-landing-system : lando
2018-08-24 00:09:34 +00:00
sreeise
9a85cba264 Bug 1368199 - Replaced uses of 'defer' with 'new Promise' in the devtools/client/framework directory. r=jryans
MozReview-Commit-ID: CA1XPx90jwW

--HG--
extra : rebase_source : 358cbd7b43a41be1b6b2318bade89fcdcb564ccf
2018-07-03 02:16:31 -04:00
J. Ryan Stinnett
dab4d53aee Bug 1469602 - Clean up custom host messages. r=ochameau
Slightly simplify custom host messaging by removing the redundant stringify /
parse.  This makes it simpler to ignore messages you might overhear.

MozReview-Commit-ID: JZHAzZAVeHZ

--HG--
extra : rebase_source : b5ead61c02e210a1ad4ad98891898081fa5487a7
2018-06-19 18:46:49 -05:00
Mantaroh Yoshinaga
9418716ce8 Bug 1467679 - Clear the devtools.toolbox.host value if this value is unexpected. r=gl
Bug 1192642 introduced new host type. If updating to this version, previous
preference value will be unexpected. This patch will restore this preference to
default value if this pref is unexpected value.

MozReview-Commit-ID: LO3R6fFHWh6
2018-06-08 13:18:54 +09:00
Dorel Luca
1fa6e590fd Backed out changeset 120a4d4dced8 (bug 1467679) for Devtools failure on devtools/client/debugger/test/mochitest/browser_dbg_host-layout.js. CLOSED TREE 2018-06-08 19:33:15 +03:00
Mantaroh Yoshinaga
9f852ee8b4 Bug 1467679 - Clear the devtools.toolbox.host value if this value is unexpected. rgl
Bug 1192642 introduced new host type. If updating to this version, previous
preference value will be unexpected. This patch will restore this preference to
default value if this pref is unexpected value.

MozReview-Commit-ID: LO3R6fFHWh6
2018-06-08 13:18:54 +09:00
Gabriel Luong
e18a43e435 Bug 1192642 - Add a left host type for the toolbox. r=pbro 2018-06-07 12:45:53 -04:00
Julian Descottes
640fe52298 Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4

--HG--
extra : rebase_source : 65de1b0aba412d9044b5196115f74276caa058f2
2018-06-01 12:36:09 +02:00
Brian Grinstead
244cee4afd Bug 1448555 - Part 1 - Allow the devtools toolbox to shrink when the window shrinks;r=dao,Gijs,jdescottes
By setting flex=10000 on the siblings of the toolbox and flex=1 on the toolbox iframe
we ensure that free space gets allocated to the browser contents and that the devtools
toolbox can shrink when the window needs to resize.

MozReview-Commit-ID: oel3kRw9m6

--HG--
extra : rebase_source : b87d6c024d8e57085115550bdc1b9169d3d70983
2018-04-03 13:57:30 -07:00
Brian Birtles
0ced916915 Bug 1450624 - Remove toolbox minimize feature; r=pbro
--HG--
extra : rebase_source : ffa2e7283e61f61c693ace6c8760c50637ab3810
2018-04-04 09:12:45 +09:00
Julian Descottes
f960ea774c Bug 1447154 - Use AppConstants.jsm instead of devtools/shared/system to get constants;r=jryans,nchevobbe
devtools/shared/system is a complex module retrieving details device/platform
information. Modules that only need to get AppConstants should not pull down
such a complex dependency.

MozReview-Commit-ID: 2FmCO8nBSpP

--HG--
rename : devtools/client/shared/webpack/shims/system-stub.js => devtools/client/shared/webpack/shims/app-constants-stub.js
extra : rebase_source : 0ec5e4d320c8b1543d5fe579d8adf51c5fa4286d
2018-03-19 22:18:20 +01:00
Nicolas Chevobbe
5789c8f4fa Bug 1382581 - Remove old-event-emitter usage from devtools/client/framework; r=bgrins.
MozReview-Commit-ID: 4oQJ3391H9S

--HG--
extra : rebase_source : b7068d3b50cec893cb8b1e1b7ab49f37a13723bd
2018-03-14 17:31:12 +01:00
J. Ryan Stinnett
23ff4cc75d Bug 1443081 - Apply spacing via eslint --fix for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00