We have more readable and faster versions (that just omit the namespace
arg).
Mostly done via sed, with a couple helpers to use the faster lookups
where possible.
Differential Revision: https://phabricator.services.mozilla.com/D181795
Move most the event handling stuff to the DOM. I've left nsMenuBarFrame
for now, but I will be removing that in the future.
The basic set up is:
* nsMenuParent becomes XULMenuParentElement (menubar or popup, manages
the current active menu item)
* nsMenuFrame -> XULButtonElements that return true for IsMenu().
Can't use XULMenuElement because of <button type=menu>, which
behaves like a, well, menu.
This makes the a11y events for menus (DOMMenuItem{Active,Inactive}) make
sense (before that we were firing duplicate Inactive events etc, and the
event order was rather suspicious).
Differential Revision: https://phabricator.services.mozilla.com/D164210
Move most the event handling stuff to the DOM. I've left nsMenuBarFrame
for now, but I will be removing that in the future.
The basic set up is:
* nsMenuParent becomes XULMenuParentElement (menubar or popup, manages
the current active menu item)
* nsMenuFrame -> XULButtonElements that return true for IsMenu().
Can't use XULMenuElement because of <button type=menu>, which
behaves like a, well, menu.
This makes the a11y events for menus (DOMMenuItem{Active,Inactive}) make
sense (before that we were firing duplicate Inactive events etc, and the
event order was rather suspicious).
Differential Revision: https://phabricator.services.mozilla.com/D164210
When the user wishes to open the window with the mouse, the shell sends NIN_SELECT.
We could continue to use WM_LBUTTONUP there, but the semantic notification is probably better.
When the user presses the space/enter key to open the window, the shell sends NIN_KEYSELECT.
When the user activates the context menu either with the mouse or the keyboard (applications/shift+f10 key), the shell sends WM_CONTEXTMENU.
Differential Revision: https://phabricator.services.mozilla.com/D152234
In bug 1773342 I made OS text scale factor behave like a full zoom
factor which applies to all pages (including the browser chrome). That's
generally straight forward but it makes some callsites that use unzoomed
CSS coordinates misbehave (or behave correctly accidentally actually in
some other cases).
The main fix here is making
nsIBaseWindow::UnscaledDevicePixelsPerCSSPixel() and
nsIScreen::GetDefaultCSSScaleFactor() account for OS zoom as necessary.
However, I also went through the relevant code and cleaned it up to use
typed units and operations when possible.
The setup means:
* nsIWidget::GetDefaultScale() doesn't account for OS full zoom.
* nsIBaseWindow and nsIScreen does.
These are the places where this should matter and stuff can get
confused, but this works surprisingly well for all callers (except one
nsDeviceContext one which we use only for PuppetWidget and we can
remove by falling back to 1.0 like all other widgets until the update
comes).
Differential Revision: https://phabricator.services.mozilla.com/D149033
None of the consumer need to mutate styles, and this saves some ugly
const_casting on the next patch.
Doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D147555
Essentially, we just want to make sure that one of our windows has focus before
we run this handler, as it will likely want to focus a specific window. We can
focus any window we want as long as *one* of our windows has been focused
already with ::SetForegroundWindow. This patch just does that.
Additionally, per cmartin's request, I added MOZ_DIAGNOSTIC_ASSERTs before some
of the early exits here, as I don't think they should be reachable? But please
do let me know if you'd prefer to keep them out or if I'm wrong about them
being reachable.
Differential Revision: https://phabricator.services.mozilla.com/D130222
We want to be able to have a different behavior for interactions with an entry
in the Windows system tray - specifically, we want to be able to open a window
on left click, and show a menu on right click. This patch allows us to control
this with a "contextmenu" attribute on the menu passed in to `AddItem`, and
receive a "systemstatusbarclick" event in the case of a left click.
Regarding tests, I don't know that we have a good way of testing this?
Suggestions are of course welcome here.
Differential Revision: https://phabricator.services.mozilla.com/D129413
This will make implementing the new behavior behind a pref
really straight-forward, and is generally nicer.
Depends on D121858
Differential Revision: https://phabricator.services.mozilla.com/D121705
On Windows we were passing an empty rect to signal "entire image", and on macOS we can move the logic into MOZIconHelper.
Differential Revision: https://phabricator.services.mozilla.com/D104633
Patch by Bernard Igiri <[email protected]>
Replacing async events with async method calls that use JSWindowActors to communicate with the parent process.
This will simplify these calls, bring the relevant code into local scope, and eliminate the need for MessageChannel.
Eliminating the MessageChannel dependency allows us to move the ASRouter initialization out of ASRouterFeed and into
JSWindowActors.
Differential Revision: https://phabricator.services.mozilla.com/D71796
This basic implementation uses the application icon for the icon that goes
into the system tray for now. A later patch in this series will change that
icon to one defined within the associated <xul:menu> element's styles.
Differential Revision: https://phabricator.services.mozilla.com/D89787
This basic implementation uses the application icon for the icon that goes
into the system tray for now. A later patch in this series will change that
icon to one defined within the associated <xul:menu> element's styles.
Differential Revision: https://phabricator.services.mozilla.com/D89787
This basic implementation uses the application icon for the icon that goes
into the system tray for now. A later patch in this series will change that
icon to one defined within the associated <xul:menu> element's styles.
Differential Revision: https://phabricator.services.mozilla.com/D89787