Commit Graph
16 Commits
Author SHA1 Message Date
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
Gabriel Luong 8a04f6330d Bug 1467572 - Part 9: Use native context menu instead of select elements in the reload condition menu of RDM. r=Honza
- Converts the reload condition <select> to use native context menu
- Converts the showMenu util to be reusable by both RDM and the Network Monitor
- Renames getToplevelWindow to getTopLevelWindow
- Renames the reload condition menu to be a setting menu in RDM according to the designs
- Uses the new photon setting icon in RDM
2018-08-15 17:27:41 -04:00
Csoregi Natalia df9db8ee3d Backed out 19 changesets (bug 1467572) for devtools failures on browser_net_telemetry_throttle_changed.js. CLOSED TREE
Backed out changeset 39123899178c (bug 1467572)
Backed out changeset 62fcbe25665c (bug 1467572)
Backed out changeset 5ef6c1c42747 (bug 1467572)
Backed out changeset e295be61276e (bug 1467572)
Backed out changeset 41d85a6f8a2a (bug 1467572)
Backed out changeset 4e6b95a6c506 (bug 1467572)
Backed out changeset 36d459a24020 (bug 1467572)
Backed out changeset abb52c2c68ab (bug 1467572)
Backed out changeset 470b9ce4ba0f (bug 1467572)
Backed out changeset 37609995dc8f (bug 1467572)
Backed out changeset 636bf5ce96f7 (bug 1467572)
Backed out changeset 5880a55d2ee8 (bug 1467572)
Backed out changeset 0f19f84bb2ed (bug 1467572)
Backed out changeset e83526778ccd (bug 1467572)
Backed out changeset c42448ca6e4a (bug 1467572)
Backed out changeset 934fb24dad26 (bug 1467572)
Backed out changeset 6102b9ef805b (bug 1467572)
Backed out changeset 7aaea1245d27 (bug 1467572)
Backed out changeset 7793f8a2b14f (bug 1467572)
2018-08-16 03:43:41 +03:00
Gabriel Luong 443afc34b9 Bug 1467572 - Part 9: Use native context menu instead of select elements in the reload condition menu of RDM. r=Honza
- Converts the reload condition <select> to use native context menu
- Converts the showMenu util to be reusable by both RDM and the Network Monitor
- Renames getToplevelWindow to getTopLevelWindow
- Renames the reload condition menu to be a setting menu in RDM according to the designs
- Uses the new photon setting icon in RDM
2018-08-15 17:27:41 -04: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
Brian Birtles 128622e480 Bug 1474234 - Add keys for MeatballMenu and MenuItem children; r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D2639
2018-08-02 09:41:47 +09:00
Brian Birtles a7abca9cfc Bug 1477354 - Add role=presentation to MenuItem wrapper element; r=Jamie
Currently we have a structure like the following:

  <div role="menu" id="toolbox-meatball-menu">
    <li class="menuitem">
      <button
        role="menuitemcheckbox"
        aria-checked="true">
        <span class="label">Dock to Bottom</span>
      </button>
    </li>
    <li class="menuitem">
      <button
        role="menuitemcheckbox">
        <span class="label">Dock to Right</span>
      </button>
    </li>
    <hr></hr>
    <li class="menuitem">
      <button
        class="command"
        role="menuitem">
        <span class="label">Documentation…</span>
      </button>
    </li>
  </div>

As a result there is an <li> wrapper element between the role="menuitem" element
at the role="menu" element. By setting role="presentation" on the <li> wrapper
we can produce a more sensible accessibility tree.

Differential Revision: https://phabricator.services.mozilla.com/D2642
2018-08-02 03:55:26 +00: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 294b67d240 Bug 1472938 - Defer image pre-loading until idle; r=jdescottes
This should prevent introducing further delay when opening DevTools.

MozReview-Commit-ID: D9XDieFoU8a
2018-07-25 13:09:01 +09:00
Brian Birtles 3666f78ee2 Bug 1472938 - Preload images used on MenuItem labels; r=jdescottes
This is to avoid rendering for a frame or two without the menu item icons being
visible which causes flicker, particularly on lower-end machines.

MozReview-Commit-ID: Aq7AOkPwu9V
2018-07-23 13:17:24 +09:00
Brian Birtles f3895af11d Bug 1472938 - Convert MenuItem to a class; r=jdescottes
This is so that we can hook into the componentDidMount method.

MozReview-Commit-ID: 5NCDgvDPbe1
2018-07-23 13:12:40 +09:00
Mantaroh Yoshinaga 0e4d2568e9 Bug 1474221 - Part 1. Allow specifying MenuItem icons from Javascript. r=birtles
This patch introduces the icon property for MenuItem. It also add padding to
allow for checkboxes only if there is at least one MenuItem using a checkbox.

MozReview-Commit-ID: CvvlR51mA53
2018-07-19 16:11:26 +09:00
Brian Birtles f65051e51d Bug 1461522 - Add Menu components; r=jdescottes
MozReview-Commit-ID: DJVU4rRYQYU
2018-06-28 15:13:06 +09:00