Commit Graph
33 Commits
Author SHA1 Message Date
Emilio Cobos Álvarez 529c9ee321 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
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
2023-06-23 10:01:32 +00:00
serge-sans-paille 71d5bc785e Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-04-01 08:31:12 +00:00
Cristian Tuns 29ebb2f54e Backed out 12 changesets (bug 1825325, bug 1825336, bug 1825333, bug 1825332, bug 1825324, bug 1824557, bug 1825328, bug 1825335, bug 1825330, bug 1825329, bug 1825327, bug 1825331) for causing build bustages in nsClipboard.cpp CLOSED TREE
Backed out changeset 9de3ed24d3a0 (bug 1825336)
Backed out changeset aef787728f19 (bug 1825335)
Backed out changeset a04c341244c1 (bug 1825333)
Backed out changeset e3ad15f762ba (bug 1825332)
Backed out changeset eed23da92a27 (bug 1825331)
Backed out changeset 8213bb54376e (bug 1825330)
Backed out changeset 747ec5ac4994 (bug 1825329)
Backed out changeset e91ff431f92d (bug 1825328)
Backed out changeset 59c18d13768b (bug 1825327)
Backed out changeset 538096d99e49 (bug 1825325)
Backed out changeset c76eb9d9b095 (bug 1825324)
Backed out changeset 8b81410eb686 (bug 1824557)
2023-03-31 12:58:53 -04:00
serge-sans-paille 1bf9d22652 Bug 1825324 - Make widget/* buildable outside of a unified build environment r=andi,geckoview-reviewers,m_kato
Depends on D173637

Differential Revision: https://phabricator.services.mozilla.com/D173969
2023-03-31 13:29:44 +00:00
Emilio Cobos Álvarez 87e89ea0d7 Bug 1824986 - Fix win build too.
MANUAL PUSH: Trivial fix CLOSED TREE
2023-03-28 17:59:57 +02:00
Emilio Cobos Álvarez 59e7b13fee Bug 1805414 - Remove nsMenuFrame and nsMenuParent. r=smaug,Jamie,desktop-theme-reviewers,settings-reviewers,dao
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
2023-01-04 19:01:13 +00:00
Csoregi Natalia 16528aebb2 Backed out changeset f11c529b2407 (bug 1805414) for failures on test_submenuClose.xhtml and nsMenuPopupFrame.cpp. CLOSED TREE 2023-01-04 01:48:30 +02:00
Emilio Cobos Álvarez dd6fd3a3b0 Bug 1805414 - Remove nsMenuFrame and nsMenuParent. r=smaug,Jamie,desktop-theme-reviewers,settings-reviewers,dao
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
2023-01-03 22:06:01 +00:00
James Teh dcc6da7ee4 Bug 1780318: Handle keyboard activation in Windows SystemStatusBar. r=mconley
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
2022-07-25 22:01:35 +00:00
Emilio Cobos Álvarez bcabeab0f8 Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel
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
2022-06-14 15:01:52 +00:00
Emilio Cobos Álvarez e48bb99524 Bug 1771564 - Constify ComputedStyle usage in nsComputedDOMStyle. r=dholbert
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
2022-05-28 01:04:24 +00:00
Kagami Sascha Rosylight 670285feb4 Bug 1539884 - Part 34: Mark StatusBarEntry::OnMessage as CAN_RUN_SCRIPT r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D134417
2021-12-23 16:27:25 +00:00
Doug Thayer e218c3114b Bug 1739030 - Call ::SetForegroundWindow before systemstatusbarclick event r=mconley
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
2021-11-07 20:35:02 +00:00
Doug Thayer 3c72c18b25 Bug 1737501 - Allow contextmenu option on Windows SystemStatusBar r=mconley
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
2021-10-28 16:07:31 +00:00
Emilio Cobos Álvarez 6c9d03dd32 Bug 1723921 - Cleanup nsComputedDOMStyle and related APIs. r=layout-reviewers,jfkthame
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
2021-08-07 09:47:15 +00:00
Markus Stange 6266a3a9bc Bug 1691861 - Move image region handling out of IconLoader. r=mconley
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
2021-02-12 00:32:06 +00:00
Markus Stange f59bef06e5 Bug 1691861 - Stop using IconLoaderHelperWin and remove it. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D104628
2021-02-12 00:32:04 +00:00
Markus Stange 6faa0d0f79 Bug 1691861 - Remove IconLoader's mContent field, and pass the node to LoadURI instead. r=mconley
Now IconLoader no longer has an unnecessary strong reference to the node.

Differential Revision: https://phabricator.services.mozilla.com/D104620
2021-02-12 00:32:01 +00:00
Mike Conley 27e9e41b67 Bug 1672419 - Make sure SystemStatusBar popup menus appear in the right spot regardless of device scaling. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D94372
2020-10-27 23:55:59 +00:00
Mihai Alexandru Michis 16040ce2ab Bug 1614465 - Revert mistakenly landed changes to SystemStatusBar.cpp
CLOSED TREE
2020-10-21 23:58:34 +03:00
Bernard Igiri 1252c9d1fa Bug 1614465 - Replacing ASRouter calls to MessageChannel with JSWindowActors to eliminate ASRouterFeed r=k88hudson
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
2020-10-21 20:04:13 +00:00
Mike Conley 391074ac3f Bug 1669649 - Use ShowPopupAtScreen to get the SystemStatusBar menu to open at the right coordinates. r=mhowell
Unfortunately, it's pretty difficult to write an automated test for this.

Differential Revision: https://phabricator.services.mozilla.com/D93123
2020-10-09 21:12:08 +00:00
Mike Conley 8a7f7e0452 Bug 1663784 - Make StatusBarEntry and IconLoader classes work with the cycle collector. r=mccr8
Depends on D90007

Differential Revision: https://phabricator.services.mozilla.com/D91644
2020-09-30 21:13:55 +00:00
Mike Conley 5aec5278f5 Bug 1663784 - Add Windows platform support for IconLoader. r=mhowell
Depends on D89972

Differential Revision: https://phabricator.services.mozilla.com/D90007
2020-09-30 21:14:00 +00:00
Mike Conley cfeef0fda9 Bug 1663784 - Implement basic nsISystemStatusBar service for Windows. r=mhowell
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
2020-09-30 21:14:05 +00:00
Narcis Beleuzu d67d02f05c Backed out 9 changesets (bug 1661474, bug 1668010, bug 1663784, bug 1665490) for bc failures on browser_all_files_referenced.js . CLOSED TREE
Backed out changeset 9a5e08c77923 (bug 1668010)
Backed out changeset 9bcba802456e (bug 1665490)
Backed out changeset 82ba64e4e81f (bug 1661474)
Backed out changeset 9b5d89c13aa3 (bug 1661474)
Backed out changeset e812f197f225 (bug 1663784)
Backed out changeset ddfbe96735f3 (bug 1663784)
Backed out changeset 282d763360a2 (bug 1663784)
Backed out changeset 9e5267b83d94 (bug 1663784)
Backed out changeset 53a57a5b60d3 (bug 1663784)
2020-10-01 00:08:50 +03:00
Mike Conley 45fdd3bc6c Bug 1663784 - Make StatusBarEntry and IconLoader classes work with the cycle collector. r=mccr8
Depends on D90007

Differential Revision: https://phabricator.services.mozilla.com/D91644
2020-09-30 15:15:27 +00:00
Mike Conley d7b1a30a40 Bug 1663784 - Add Windows platform support for IconLoader. r=mhowell
Depends on D89972

Differential Revision: https://phabricator.services.mozilla.com/D90007
2020-09-30 15:15:01 +00:00
Mike Conley 61d37077ae Bug 1663784 - Implement basic nsISystemStatusBar service for Windows. r=mhowell
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
2020-09-30 15:12:28 +00:00
Razvan Maries 80c4993f85 Backed out 8 changesets (bug 1661474, bug 1663784, bug 1665490) for build bustages on IconLoaderHelperCocoa.h and nsMenuItemIconX.mm. CLOSED TREE
Backed out changeset 4a035c0339f8 (bug 1665490)
Backed out changeset 573e8d8d1fc8 (bug 1661474)
Backed out changeset c2d5b0b0a1a3 (bug 1661474)
Backed out changeset 97be0dd0742d (bug 1663784)
Backed out changeset 428926be2268 (bug 1663784)
Backed out changeset a737df82383a (bug 1663784)
Backed out changeset d1faf309c9d0 (bug 1663784)
Backed out changeset 4ee61c4a6bc8 (bug 1663784)
2020-09-30 02:16:00 +03:00
Mike Conley d0ddb69733 Bug 1663784 - Make StatusBarEntry and IconLoader classes work with the cycle collector. r=mccr8
Depends on D90007

Differential Revision: https://phabricator.services.mozilla.com/D91644
2020-09-29 19:31:36 +00:00
Mike Conley 7fbe6332f5 Bug 1663784 - Add Windows platform support for IconLoader. r=mhowell
Depends on D89972

Differential Revision: https://phabricator.services.mozilla.com/D90007
2020-09-29 06:50:37 +00:00
Mike Conley dfe476ad5f Bug 1663784 - Implement basic nsISystemStatusBar service for Windows. r=mhowell
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
2020-09-29 06:48:34 +00:00