Files
tubestation/browser/base/content/unified-extensions-viewcache.inc.xhtml
William Durand 9ea8c792f2 Bug 1782456 - Move unified extensions context menu to main popupset. r=rpl,Gijs
I noticed some missing context menu style when loading the context menu
from our own viewcache, which explains the difference between primary
and secondary button click. Not sure ecavtly what was missing as the
styles are all over the place.

The menu item actually works, the actions are called and for
checkbox-like menu items, the `checked` attribute is correctly set in
the "HTML". Also it looked like sub-menus weren't affected (e.g. Tree
Style Tab didn't have any issue).

While investigating, I also noticed that most (if not all) `menupopup`
elements are declared in the main popupset, so I tried to move the
unified extensions context menu to this main popupset and lazy-load the
l10n strings (similar to the toolbar context menu [1]).

That fixed the bug.

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1609556

Differential Revision: https://phabricator.services.mozilla.com/D153330
2022-08-02 13:24:28 +00:00

26 lines
1.0 KiB
HTML

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<!--
This is the template used for the `unified-extensions-item` custom element,
defined in `browser/base/content/browser-addons.js`.
-->
<html:template id="unified-extensions-item-template">
<image class="unified-extensions-item-icon"
role="presentation"
src="chrome://mozapps/skin/extensions/extensionGeneric.svg" />
<vbox class="unified-extensions-item-contents">
<label class="unified-extensions-item-name" />
<label class="unified-extensions-item-message">
<!-- A notification could be printed here -->
</label>
</vbox>
<toolbarbutton class="unified-extensions-item-open-menu subviewbutton subviewbutton-iconic"
closemenu="none"
context="unified-extensions-context-menu"
data-l10n-id="unified-extensions-item-open-menu" />
</html:template>