Issue #1751 -- Remove XP_MACOSX conditionals from the rest of the tree.

This also removes some PP abuse and takes file entries out of PP when no longer
needed without XP_MACOSX conditionals.
This commit is contained in:
Moonchild 2021-05-06 09:24:03 +00:00 committed by roytam1
commit a4b0f333ba
153 changed files with 173 additions and 4556 deletions

View file

@ -315,27 +315,16 @@
group="system" action="this.onKeyAction('default', event);"/>
<handler event="keypress" keycode="VK_ESCAPE"
group="system" action="this.onKeyAction('cancel', event);"/>
#ifdef XP_MACOSX
<handler event="keypress" key="." modifiers="meta"
group="system" action="this.onKeyAction('cancel', event);"/>
#endif
<handler event="focus" phase="capturing">
let bnum = this.args.defaultButtonNum || 0;
let defaultButton = this.ui["button" + bnum];
#ifdef XP_MACOSX
// On OS X, the default button always stays marked as such (until
// the entire prompt blurs).
defaultButton.setAttribute("default", true);
#else
// On other platforms, the default button is only marked as such
// when no other button has focus. XUL buttons on not-OSX will
// react to pressing enter as a command, so you can't trigger the
// default without tabbing to it or something that isn't a button.
// The default button is only marked as such when no other button has focus.
// XUL buttons will react to pressing enter as a command, so you can't trigger
// the default without tabbing to it or something that isn't a button.
let focusedDefault = (event.originalTarget == defaultButton);
let someButtonFocused = event.originalTarget instanceof Ci.nsIDOMXULButtonElement;
defaultButton.setAttribute("default", focusedDefault || !someButtonFocused);
#endif
</handler>
<handler event="blur">
// If focus shifted to somewhere else in the browser, don't make