Граф коммитов

256 Коммитов

Автор SHA1 Сообщение Дата
J. Ryan Stinnett b1df6f0420 Bug 1580117 - Pause composition for minimized windows on macOS. r=mstange
This pauses composition when a window becomes minimized.

This is particularly important for platforms like macOS, where minimized /
hidden windows historically would remain compositing, potentially on every vsync
if the hidden window contained animations. This should lead to a nice power
savings by skipping this unnecessary work.

This change affects both the WebRender and legacy compositor paths.

As bug 1580117 is believed to be a macOS specific issue, this is currently
implemented for macOS only, but could in the future be generalized to other
platforms as well.

Differential Revision: https://phabricator.services.mozilla.com/D85954
2020-09-17 16:57:31 +00:00
Bogdan Tara e30a2f5c84 Backed out 2 changesets (bug 1580117) for mochitest and webrender failures CLOSED TREE
Backed out changeset aba57d4f19cb (bug 1580117)
Backed out changeset 70b864f4b6a5 (bug 1580117)
2020-09-01 15:15:29 +03:00
J. Ryan Stinnett 643a99c8fa Bug 1580117 - Pause composition for occluded windows on macOS. r=mstange
This pauses composition when a window becomes fully occluded.

This is particularly important for platforms like macOS, where minimized /
hidden windows historically would remain compositing, potentially on every vsync
if the hidden window contained animations. This should lead to a nice power
savings by skipping this unnecessary work.

This change affects both the WebRender and legacy compositor paths.

As bug 1580117 is believed to be a macOS specific issue, this is currently
implemented for macOS only, but could in the future be generalized to other
platforms as well (likely using size mode changes since other platforms do not
notify on occlusion change).

Differential Revision: https://phabricator.services.mozilla.com/D85954
2020-08-31 13:54:24 +00:00
Gijs Kruitbosch f5a71f797d Bug 1644212 - reintroduce an attribute to limit which windows allow full screen, r=xidorn,haik
Differential Revision: https://phabricator.services.mozilla.com/D79109
2020-06-15 15:51:48 +00:00
Haik Aftandilian 0a19d8eeb2 Bug 1592416 - Right click opens context menu on wrong monitor or virtual desktop (mac OS Catalina) r=spohl
Add the NSWindowCollectionBehaviorMoveToActiveSpace behavior to nsCocoaWindow
popups so that they override the "Assign To" space setting and display on the
active space.

This also addresses bug 1589893 where, when "Assign To" space is used, popup
menus are not visible in full screen mode.

With mutiple displays, recreate the popup widget each time it is displayed
to workaround a problem where the re-shown popup appears on the "Assign To"
display instead of the current display.

Differential Revision: https://phabricator.services.mozilla.com/D75419
2020-05-28 04:00:02 +00:00
Razvan Maries c2dda9f2ae Backed out changeset 854feb05fff6 (bug 1592416) for assertion failures. CLOSED TREE 2020-05-28 03:42:16 +03:00
Haik Aftandilian 76c2f2d30d Bug 1592416 - Right click opens context menu on wrong monitor or virtual desktop (mac OS Catalina) r=spohl
Add the NSWindowCollectionBehaviorMoveToActiveSpace behavior to nsCocoaWindow
popups so that they override the "Assign To" space setting and display on the
active space.

This also addresses bug 1589893 where, when "Assign To" space is used, popup
menus are not visible in full screen mode.

With mutiple displays, recreate the popup widget each time it is displayed
to workaround a problem where the re-shown popup appears on the "Assign To"
display instead of the current display.

Differential Revision: https://phabricator.services.mozilla.com/D75419
2020-05-27 22:41:34 +00:00
Butkovits Atila 8a87d1b582 Backed out changeset 09ccf334001b (bug 1592416) for causing bug 1640077 to fail. 2020-05-22 09:37:16 +03:00
Haik Aftandilian 624ed03701 Bug 1592416 - Right click opens context menu on wrong monitor or virtual desktop (mac OS Catalina) r=spohl
Add the NSWindowCollectionBehaviorMoveToActiveSpace behavior to nsCocoaWindow
popups so that they override the "Assign To" space setting and display on the
active space.

This also addresses bug 1589893 where, when "Assign To" space is used, popup
menus are not visible in full screen mode.

With mutiple displays, recreate the popup widget each time it is displayed
to workaround a problem where the re-shown popup appears on the "Assign To"
display instead of the current display.

Differential Revision: https://phabricator.services.mozilla.com/D75419
2020-05-21 00:09:32 +00:00
Xidorn Quan 58b03accf4 Bug 1276537 part 1 - Make resizable window on macOS always show full screen button. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D74833
2020-05-15 06:19:14 +00:00
Chris Peterson ce0c6b20bb Bug 1624786 - Replace "clang-format off" with semicolon workaround for clang-format bug 1629756. r=spohl
This semicolon workaround is tidier than the `// clang-format off/on` comments and avoids turning off all clang-format checks. The comment also links to clang-format bug 1629756 so future code readers can learn why this extra semicolon exists. And if we find a way to fix this in clang-format, then we can search for this bug number to find and remove these extra semicolons and comments.

Differential Revision: https://phabricator.services.mozilla.com/D71504
2020-04-20 12:18:48 +00:00
Chris Peterson eaafc27a70 Bug 1624786 - Replace MOZ_MUST_USE with [[nodiscard]] in widget/cocoa. r=spohl
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

Differential Revision: https://phabricator.services.mozilla.com/D68148

--HG--
extra : moz-landing-system : lando
2020-04-08 16:41:42 +00:00
Mike de Boer c481cd83d4 Bug 890125 - Part 2 - Convert the OSX Spaces handling to accept string-type workspace IDs. r=mstange,nika
Differential Revision: https://phabricator.services.mozilla.com/D67823

--HG--
extra : moz-landing-system : lando
2020-04-07 11:02:10 +00:00
Bogdan Tara 86041bd513 Backed out 4 changesets (bug 890125) for central bustages complaining about nsWindow.cpp
Backed out changeset 68475f12d4f1 (bug 890125)
Backed out changeset 6e2c1facb7e0 (bug 890125)
Backed out changeset 17b15e227d3b (bug 890125)
Backed out changeset 6e71761c1018 (bug 890125)
2020-04-07 01:31:47 +03:00
Mike de Boer 08cad74e72 Bug 890125 - Part 2 - Convert the OSX Spaces handling to accept string-type workspace IDs. r=mstange,nika
Differential Revision: https://phabricator.services.mozilla.com/D67823

--HG--
extra : moz-landing-system : lando
2020-04-06 12:56:38 +00:00
Oana Pop Rus 715930ff5b Backed out 4 changesets (bug 890125) for Windows MinGW build bustages failures. on a CLOSED TREE
Backed out changeset 1c8115a9a684 (bug 890125)
Backed out changeset eceeef4fc062 (bug 890125)
Backed out changeset cd850f6d0b0b (bug 890125)
Backed out changeset 08359730557d (bug 890125)
2020-04-03 22:44:14 +03:00
Mike de Boer 0f7ed04e2f Bug 890125 - Part 2 - Convert the OSX Spaces handling to accept string-type workspace IDs. r=mstange,nika
Differential Revision: https://phabricator.services.mozilla.com/D67823

--HG--
extra : moz-landing-system : lando
2020-04-03 10:20:20 +00:00
Mike de Boer 929799eef6 Bug 440895 - Add support for Mac OSX spaces in session restore, which allows any window to be restored to their respective (work)space. r=mconley,mstange,nika
Differential Revision: https://phabricator.services.mozilla.com/D61457

--HG--
extra : moz-landing-system : lando
2020-03-02 13:36:39 +00:00
pbz 70e1dba79e Bug 1432856 - Extended focus methods in Window.webidl, Client.webidl and Element.webidl to pass CallerType. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55811

--HG--
extra : moz-landing-system : lando
2020-01-16 14:38:40 +00:00
jeffin143 7868d04683 Bug 1597893 : convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53920

--HG--
extra : moz-landing-system : lando
2019-11-25 16:00:23 +00:00
Tim Nguyen 9b84d66049 Bug 1597120 - Support dynamic changes to CSS pointer-events on nsMenuPopupFrame. r=karlt,jmathies,mstange,emilio
Differential Revision: https://phabricator.services.mozilla.com/D53379

--HG--
extra : moz-landing-system : lando
2019-11-22 13:14:37 +00:00
Razvan Maries 8520cc6954 Backed out changeset dce49f743139 (bug 1597893) for build bustages on nsCocoaWindow.mm. CLOSED TREE 2019-11-22 14:50:12 +02:00
jeffin143 6967337237 Bug 1597893 : convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53920

--HG--
extra : moz-landing-system : lando
2019-11-21 16:52:06 +00:00
Bogdan Tara 6aae1c4aaa Backed out changeset 726c8aa10d1a (bug 1597893) for bustages complaining about nsCocoaWindow.h CLOSED TREE 2019-11-21 15:35:09 +02:00
jeffin143 9f50df6c78 Bug 1597893 : convert NS_STYLE_WINDOW_SHADOW_* to an enum class in nsStyleConsts.h r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D53920

--HG--
extra : moz-landing-system : lando
2019-11-21 12:09:03 +00:00
Markus Stange 8b245c092f Bug 1576390 - Remove the prefs gfx.core-animation.enabled and gfx.compositor.glcontext.opaque, and all the code needed to support it. r=mattwoodrow,spohl
Differential Revision: https://phabricator.services.mozilla.com/D52739

--HG--
extra : moz-landing-system : lando
2019-11-13 19:07:37 +00:00
Masayuki Nakano 0f9b3a05da Bug 1594215 - Make `PuppetWidget::GetEditCommands()` check `mBrowserChild` before using it r=smaug
The reason of the crash is, the window may have already been destroyed and
`PuppetWidget::mBrowserChild` was set to `nullptr` when synthesizing key event.

This patch makes `PuppetWidget::GetEditCommands()` check whether it's `nullptr`
and returns whether it's succeeded or not.  Therefore, `TextInputProcessor`
can throw exception in such case.

Differential Revision: https://phabricator.services.mozilla.com/D52308

--HG--
extra : moz-landing-system : lando
2019-11-08 11:32:51 +00:00
Emma Malysz 0bc1b5a9c6 Bug 1519517, ensure that restoring a session doesn't animate and resize the window r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D50839

--HG--
extra : moz-landing-system : lando
2019-11-04 21:13:06 +00:00
Mike Conley 1d8a58f2fb Bug 1590822 - Add lockAspectRatio support to windows for macOS. r=mstange
Depends on D50275

Differential Revision: https://phabricator.services.mozilla.com/D50277

--HG--
extra : moz-landing-system : lando
2019-10-24 17:41:18 +00:00
Mike Conley 6d2e7437f0 Bug 1531226 - Add support for alwaysontop windows for macOS. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D50275

--HG--
extra : moz-landing-system : lando
2019-10-23 18:25:10 +00:00
Xidorn Quan 6aee66b8fb Bug 1403085 - Add a pref to use native full screen for Fullscreen API on macOS. r=spohl,dao
Differential Revision: https://phabricator.services.mozilla.com/D37151

--HG--
extra : moz-landing-system : lando
2019-07-17 13:31:41 +00:00
Emilio Cobos Álvarez 21d5c25734 Bug 1553769 - Make nsIWidget::SetFocus infallible, and make it take an enum class. r=NeilDeakin
Only gtk returns failure ever, and nobody checks the result anyway.

Use an enum class so that it's clear from the caller what it means.

Differential Revision: https://phabricator.services.mozilla.com/D32353

--HG--
extra : moz-landing-system : lando
2019-05-31 22:13:56 +00:00
Brindusan Cristian bfa0a8a991 Backed out changeset c0895e6c7343 (bug 1553769) for causing build bustages at PluginWidgetProxy.cpp. CLOSED TREE 2019-05-30 01:00:20 +03:00
Emilio Cobos Álvarez 748cc8584f Bug 1553769 - Make nsIWidget::SetFocus infallible, and make it take an enum class. r=NeilDeakin
Only gtk returns failure ever, and nobody checks the result anyway.

Use an enum class so that it's clear from the caller what it means.

Differential Revision: https://phabricator.services.mozilla.com/D32353

--HG--
extra : moz-landing-system : lando
2019-05-29 14:37:26 +00:00
Markus Stange 4c44b62eee Bug 1533562 - Do not move the TitlebarGradientView from a ToolbarWindow into a BorderlessWindow when hiding the window chrome. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D25516

--HG--
extra : moz-landing-system : lando
2019-04-29 17:00:31 +00:00
Markus Stange b396860365 Bug 1533562 - Implement titlebar gradient drawing with a new TitlebarGradientView. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D22646

--HG--
extra : moz-landing-system : lando
2019-04-29 17:00:13 +00:00
Markus Stange 7cb6bd28ef Bug 1533562 - Always make the content view of ToolbarWindows cover the entire window. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D22645

--HG--
extra : moz-landing-system : lando
2019-04-29 16:59:55 +00:00
Markus Stange bf8b839110 Bug 1533562 - Remove code that deals with non-rounded bottom corners on regular windows. r=spohl
Rounded bottom corners have been the default since 10.7.
We still have square corners on windows without titlebars, such as the address
bar autocomplete dropdown, or the reftest window.

Differential Revision: https://phabricator.services.mozilla.com/D22643

--HG--
extra : moz-landing-system : lando
2019-04-29 16:59:25 +00:00
Markus Stange 890482c332 Bug 1533562 - Remove synchronous repaint capability of setTitlebarNeedsDisplayInRect:sync: and also remove the rect parameter because we always pass the same value to it. r=spohl
The synchronous paint was only needed a long time ago when we were calling this
method during drawRect. We're not doing that any more, we usually call it from
viewWillDraw now. But even at the time, forcing a synchronous paint *within*
a paint was extremely sketchy, so best just to remove the code.

Differential Revision: https://phabricator.services.mozilla.com/D22642

--HG--
extra : moz-landing-system : lando
2019-04-29 16:59:10 +00:00
Noemi Erli 449299cc22 Backed out 6 changesets (bug 1533562) for breaking reftests and failures in letter-spacing-005.xht
Backed out changeset 1976a614f8ce (bug 1533562)
Backed out changeset 02adcc70efbe (bug 1533562)
Backed out changeset 00ffda400dc5 (bug 1533562)
Backed out changeset 710d3c0129de (bug 1533562)
Backed out changeset 64720021f45c (bug 1533562)
Backed out changeset 68559438c818 (bug 1533562)
2019-04-26 22:26:17 +03:00
Markus Stange 3da5cd3df2 Bug 1533562 - Do not move the TitlebarGradientView from a ToolbarWindow into a BorderlessWindow when hiding the window chrome. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D25516

--HG--
extra : moz-landing-system : lando
2019-04-26 17:27:09 +00:00
Markus Stange 99b8e92ccc Bug 1533562 - Implement titlebar gradient drawing with a new TitlebarGradientView. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D22646

--HG--
extra : moz-landing-system : lando
2019-04-26 17:26:57 +00:00
Markus Stange 1079ac444c Bug 1533562 - Always make the content view of ToolbarWindows cover the entire window. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D22645

--HG--
extra : moz-landing-system : lando
2019-04-26 17:26:39 +00:00
Markus Stange 467f5af7ba Bug 1533562 - Remove code that deals with non-rounded bottom corners on regular windows. r=spohl
Rounded bottom corners have been the default since 10.7.

Differential Revision: https://phabricator.services.mozilla.com/D22643

--HG--
extra : moz-landing-system : lando
2019-04-26 17:26:14 +00:00
Markus Stange c0aa023eb0 Bug 1533562 - Remove synchronous repaint capability of setTitlebarNeedsDisplayInRect:sync: and also remove the rect parameter because we always pass the same value to it. r=spohl
The synchronous paint was only needed a long time ago when we were calling this
method during drawRect. We're not doing that any more, we usually call it from
viewWillDraw now. But even at the time, forcing a synchronous paint *within*
a paint was extremely sketchy, so best just to remove the code.

Differential Revision: https://phabricator.services.mozilla.com/D22642

--HG--
extra : moz-landing-system : lando
2019-04-26 17:25:59 +00:00
Gurzau Raul f05aef3e04 Backed out 9 changesets (bug 1542454, bug 1533562) for failing at /browser/browser_ext_webNavigation_onCreatedNavigationTarget_contextmenu.js on a CLOSED TREE.
Backed out changeset 88756a309968 (bug 1542454)
Backed out changeset 37bd2819d3a7 (bug 1542454)
Backed out changeset 19f0462bb47a (bug 1542454)
Backed out changeset b4440b1833ec (bug 1533562)
Backed out changeset 8970cdb3c04a (bug 1533562)
Backed out changeset 498cd34eea78 (bug 1533562)
Backed out changeset 3a3b4d52e10a (bug 1533562)
Backed out changeset 5fae2f233aa0 (bug 1533562)
Backed out changeset e3fc54ebcd15 (bug 1533562)
2019-04-23 01:09:12 +03:00
Markus Stange de6910917a Bug 1533562 - Do not move the TitlebarGradientView from a ToolbarWindow into a BorderlessWindow when hiding the window chrome. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D25516

--HG--
extra : moz-landing-system : lando
2019-04-22 19:27:09 +00:00
Markus Stange 537ff00f68 Bug 1533562 - Implement titlebar gradient drawing with a new TitlebarGradientView. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D22646

--HG--
extra : moz-landing-system : lando
2019-04-22 19:26:56 +00:00
Markus Stange 8f1414b86c Bug 1533562 - Always make the content view of ToolbarWindows cover the entire window. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D22645

--HG--
extra : moz-landing-system : lando
2019-04-22 19:26:38 +00:00
Markus Stange 61e81ce45e Bug 1533562 - Remove code that deals with non-rounded bottom corners on regular windows. r=spohl
Rounded bottom corners have been the default since 10.7.

Differential Revision: https://phabricator.services.mozilla.com/D22643

--HG--
extra : moz-landing-system : lando
2019-04-22 19:26:15 +00:00