зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1562881 - Part 5: Change the anchor point of protections popup to the shield icon container and make identity popup and protection popup mutual exclusive. r=johannh
This patch changes the anchor point of the protections popup to the shield icon container. Also remove the alt key which is needed to open the protection icon. In addtion, this also makes these two popups are mutual exclusive. Differential Revision: https://phabricator.services.mozilla.com/D37791 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ac4cf4bf8b
Коммит
866ed8ffca
|
@ -1000,12 +1000,6 @@ var gIdentityHandler = {
|
|||
* Click handler for the identity-box element in primary chrome.
|
||||
*/
|
||||
handleIdentityButtonEvent(event) {
|
||||
// For Nightly users, show the WIP protections panel if the meta key was held.
|
||||
if (this._protectionsPanelEnabled && event.altKey) {
|
||||
gProtectionsHandler.handleProtectionsButtonEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
event.stopPropagation();
|
||||
|
||||
if (
|
||||
|
@ -1077,6 +1071,11 @@ var gIdentityHandler = {
|
|||
// Add the "open" attribute to the identity box for styling
|
||||
this._identityBox.setAttribute("open", "true");
|
||||
|
||||
// Check the panel state of the protections panel. Hide it if needed.
|
||||
if (gProtectionsHandler._protectionsPopup.state != "closed") {
|
||||
PanelMultiView.hidePopup(gProtectionsHandler._protectionsPopup);
|
||||
}
|
||||
|
||||
// Now open the popup, anchored off the primary chrome element
|
||||
PanelMultiView.openPopup(this._identityPopup, this._identityIcon, {
|
||||
position: "bottomcenter topleft",
|
||||
|
|
|
@ -1574,10 +1574,15 @@ var gProtectionsHandler = {
|
|||
// blocking something or not.
|
||||
gProtectionsHandler.toggleBreakageLink();
|
||||
|
||||
// Check the panel state of the identity panel. Hide it if needed.
|
||||
if (gIdentityHandler._identityPopup.state != "closed") {
|
||||
PanelMultiView.hidePopup(gIdentityHandler._identityPopup);
|
||||
}
|
||||
|
||||
// Now open the popup, anchored off the primary chrome element
|
||||
PanelMultiView.openPopup(
|
||||
this._protectionsPopup,
|
||||
gIdentityHandler._identityIcon,
|
||||
gIdentityHandler._trackingProtectionIconContainer,
|
||||
{
|
||||
position: "bottomcenter topleft",
|
||||
triggerEvent: event,
|
||||
|
|
|
@ -847,7 +847,9 @@
|
|||
pageproxystate="invalid">
|
||||
<!-- Use onclick instead of normal popup= syntax since the popup
|
||||
code fires onmousedown, and hence eats our favicon drag events. -->
|
||||
<box id="tracking-protection-icon-container" align="center">
|
||||
<box id="tracking-protection-icon-container" align="center"
|
||||
onclick="gProtectionsHandler.handleProtectionsButtonEvent(event);"
|
||||
onkeypress="gProtectionsHandler.handleProtectionsButtonEvent(event);">
|
||||
<box id="tracking-protection-icon-box" animationsenabled="true">
|
||||
<image id="tracking-protection-icon"/>
|
||||
<box id="tracking-protection-icon-animatable-box" flex="1">
|
||||
|
|
|
@ -143,7 +143,8 @@ panelview {
|
|||
#downloadsPanel,
|
||||
#widget-overflow,
|
||||
#appMenu-popup,
|
||||
#customizationui-widget-panel {
|
||||
#customizationui-widget-panel,
|
||||
#protections-popup {
|
||||
margin-top: -6px;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче