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

185 Коммитов

Автор SHA1 Сообщение Дата
Stephen A Pohl b1bd9b5870 Backout 84bcb5742e0c (bug 1405577) to replace with a slimmer patch. r=me 2017-12-04 15:06:26 -05:00
Stephen A Pohl aac02bb998 Bug 1405577: Restore the ability to open new windows in new spaces when a window is already in fullscreen mode on macOS. r=mstange 2017-11-29 23:14:11 -05:00
Stephen A Pohl 359def9977 Bug 1373581: Make transition into and out of native fullscreen smoother on macOS. r=mstange 2017-10-18 21:50:47 -04:00
Samael Wang 480a9d013c Bug 1350643 - Part 4.2: Use screen.dpi in nsChildView::GetDPI. r=mstange
MozReview-Commit-ID: AiGBxTNzxSp

--HG--
extra : rebase_source : 50dcdca6e6b63ab3cbae7e00ecc8c8e7e4f10b74
2017-06-16 10:55:09 +08:00
Samael Wang e6f4039653 Bug 1350643 - Part 4.1: Get per-monitor dpi in ScreenHelperCocoa. r=mstange
MozReview-Commit-ID: OHa8h2sh26

--HG--
extra : rebase_source : 67d7be6a51ad81d0d2cfe48ad4c92d0a6ef3c666
2017-06-06 18:18:52 +08:00
Beekill95 d2643cda87 Bug 1331932 - Suppress window animations while we're restoring window dimension. r=mikedeboer,jimm,mstange
--HG--
extra : rebase_source : 4c1cc1b8beb38f1445db8942d38babfa9fbce526
2017-06-22 14:27:05 +07:00
Mats Palmgren ef56cb7d33 Bug 1377591 - Make nsCocoaWindow and nsChildView 'final' to devirtualize some calls. r=mstange
MozReview-Commit-ID: 4sXYV9sVEZl
2017-07-05 02:01:45 +02:00
Carsten "Tomcat" Book 63e37c85e1 Backed out changeset ad0560789e1e (bug 1331932)
--HG--
extra : rebase_source : 234862b52d30a4a9ffd371c1088b67dd80a253af
2017-07-04 09:53:11 +02:00
Beekill95 4b50ba3fad Bug 1331932 - Suppress window animations while we're restoring window dimension. r=mikedeboer,jimm,mstange 2017-06-22 14:27:05 +07:00
Edgar Chen 273f4b0c7e Bug 1236512 - Part 1: Send "occlusionstatechange" custom event when occlusion state in Mac is changed; f=spohl; r=mstange
MozReview-Commit-ID: GTBeH4UwZiU
2017-05-26 18:09:34 +08:00
Carsten "Tomcat" Book e5d9b2a520 Backed out changeset 844d46609652 (bug 1236512) for test failures in own test 2017-06-20 14:30:54 +02:00
Edgar Chen 244552c6fd Bug 1236512 - Part 1: Send "occlusionstatechange" custom event when occlusion state in Mac is changed; f=spohl; r=mstange
MozReview-Commit-ID: GTBeH4UwZiU
2017-05-26 18:09:34 +08:00
Markus Stange 2c241960ec Bug 1291457 - Remove shadow invalidation code. r=spohl
Invalidating a window's shadow is really slow and leads to flickering. Now that
arrow panels don't change their contents during the panel opening animation any
more, their shape stays the same after the first paint, so we don't need the
shadow invalidation functionality for them any more. And as far as I know, we
don't use transparent popups with changing shapes anywhere else.
The system still computes the shadow for the first paint of the window (which
happens during the orderFront call), and it updates the shadow whenever the
window resizes. But not when its size stays the same and only what we draw in
the content is updated.

MozReview-Commit-ID: 138PjbrSFrc

--HG--
extra : rebase_source : fed1c653ca3d88ef8b4e8e55a7d42b29e17a1624
2016-08-02 16:39:06 -04:00
Markus Stange f4e6f4d70c Bug 1370034 - Add nsIWidget::SetWindowTransform and implement it on Mac. r=spohl
MozReview-Commit-ID: 6tghHjKe6pb

--HG--
extra : rebase_source : 0a2d2043d1d3aa9dfe1bd34ef33d598b8d985f36
2017-06-14 19:15:10 -04:00
Markus Stange 195251f3db Bug 1370034 - Add nsIWidget::SetWindowOpacity and implement it on Mac. r=spohl
MozReview-Commit-ID: ILqHQuQ4whl

--HG--
extra : rebase_source : 6d45806a0384a58993c425572a8305715df1a181
2017-06-14 19:14:02 -04:00
Cameron McCormack 1849ea4995 Backout bug 1291457 and bug 1370034 for bustage. 2017-06-19 13:55:15 +08:00
Markus Stange 850358ea32 Bug 1291457 - Remove shadow invalidation code. r=spohl
Invalidating a window's shadow is really slow and leads to flickering. Now that
arrow panels don't change their contents during the panel opening animation any
more, their shape stays the same after the first paint, so we don't need the
shadow invalidation functionality for them any more. And as far as I know, we
don't use transparent popups with changing shapes anywhere else.
The system still computes the shadow for the first paint of the window (which
happens during the orderFront call), and it updates the shadow whenever the
window resizes. But not when its size stays the same and only what we draw in
the content is updated.

MozReview-Commit-ID: 138PjbrSFrc

--HG--
extra : rebase_source : fed1c653ca3d88ef8b4e8e55a7d42b29e17a1624
2016-08-02 16:39:06 -04:00
Markus Stange 7b852c4350 Bug 1370034 - Add nsIWidget::SetWindowTransform and implement it on Mac. r=spohl
MozReview-Commit-ID: 6tghHjKe6pb

--HG--
extra : rebase_source : 434f3a1d82f3143ab5a08f4f752668221e14be25
2017-06-14 19:15:10 -04:00
Markus Stange f813588839 Bug 1370034 - Add nsIWidget::SetWindowOpacity and implement it on Mac. r=spohl
MozReview-Commit-ID: ILqHQuQ4whl

--HG--
extra : rebase_source : 6d45806a0384a58993c425572a8305715df1a181
2017-06-14 19:14:02 -04:00
Markus Stange 301db9a38d Bug 1371476 - Don't treat popups as opaque just because they don't have a title bar. r=mattwoodrow
MozReview-Commit-ID: HpM2bSJDKAw

--HG--
extra : rebase_source : 56e8b3510213d85392aeadc949f369d193153432
2017-06-06 13:36:42 -04:00
Ryan VanderMeulen 96eca59299 Merge m-c to autoland. a=merge 2017-05-19 12:26:48 -04:00
Masayuki Nakano 872f694c63 Bug 1339543 part 4 Change nsIWidget::ExecuteNativeKeyBinding() to nsIWidget::GetEditCommands() which just retrieves edit commands for the type r=smaug
Now, nsIWidget::ExecuteNativeKeyBinding() isn't used by anybody for executing
edit commands.  Instead, they need array of edit commands for the key
combination.  So, the method should be renamed to GetEditCommands() and just
return edit commands as an array.

MozReview-Commit-ID: 4G0B1lJ8Lbe

--HG--
extra : rebase_source : 4a5829281d59677c773950c34d91a1cd8074d243
2017-05-19 17:49:41 +09:00
Kris Maglione 81e0fbc6ee Bug 1365660: Part 5c - Enable compositing for popups with remote content on OS-X. r=mstange
MozReview-Commit-ID: 90JJVJ2eR9C

--HG--
extra : rebase_source : 23acd7c81567fed7267271a24ebe187a11267b9e
2017-05-17 14:46:11 -07:00
Markus Stange 7463009e1d Bug 1348424 - Drop the window's reference to mColor before releasing it. r=spohl, a=dveditz
MozReview-Commit-ID: LwRZwLpFUtD

--HG--
extra : rebase_source : 4efacd0e82cdcca5a1ec6d459a91dc58cb424d20
extra : histedit_source : b52922153beb627f498ba46ecc7504e011760bc1
2017-04-07 18:07:50 -04:00
Nicholas Nethercote 4ebfdea1f5 Bug 1325234 (part 10) - Final nsIWidget deCOMtamination clean-ups. r=mstange.
This patch converts some NS_IMETHOD and NS_IMETHODIMP occurrences that I missed
in previous bugs.

The patch also removes the Android
nsWindow::{Get,Set}HasTransparentBackground() functions because they're unused.

--HG--
extra : rebase_source : 7b121e5f9ac633ea9482bacc8b7424cb8d8889ef
2016-12-21 15:58:09 +11:00
Nicholas Nethercote 523bee37b8 Bug 1325234 (part 9) - Remove remaining NS_IMETHOD_ occurrences from nsIWidget. r=mstange.
|virtual T| is clearer than |NS_IMETHOD_(T)|.

--HG--
extra : rebase_source : 9c8f423d7a89782a4d790a50e137071271086eed
2016-12-21 15:27:20 +11:00
Nicholas Nethercote bf4a843d70 Bug 1325234 (part 8) - Streamline nsIWidget::DispatchEvent. r=jimm.
This patch changes it from |NS_IMETHOD| to |virtual nsresult| because some
callsites are checked and some aren't.

--HG--
extra : rebase_source : dd98266bce0a7583863908b6f04729a6e403b721
2016-12-21 11:18:40 +11:00
Nicholas Nethercote e52b19470c Bug 1325234 (part 6) - Streamline nsIWidget::SetTitle. r=jimm.
This patch changes it from |NS_IMETHOD| to |virtual nsresult| because some call
sites are checked and others aren't.

--HG--
extra : rebase_source : 6723b9db709d1506dd394b1e85572309c1c2e2cf
2016-12-21 11:13:08 +11:00
Nicholas Nethercote ea1e2ca6ce Bug 1325234 (part 5) - Streamline nsIWidget::SetCursor (both versions). r=jimm.
This patch changes one from |NS_IMETHOD| to |virtual nsresult| and the other to
|virtual void|.

--HG--
extra : rebase_source : 55af71c01dc75d6bf7c63191e9cfabc9f5368ffa
2016-12-21 11:13:08 +11:00
Nicholas Nethercote 0eaecf55da Bug 1325234 (part 4) - Streamline nsIWidget::{SetFocus,SetNonClientMargins}(). r=mstange.
This patch changes them from |NS_IMETHOD| to |virtual nsresult|.

--HG--
extra : rebase_source : 5e54c2fd340c393b33c9e1dcf20a80fe2f41b2f4
2016-12-21 11:13:08 +11:00
Nicholas Nethercote da5978a842 Bug 1325234 (part 3) - Streamline nsIWidget::Show(). r=mstange.
This patch changes it from |NS_IMETHOD| to |virtual void|. The return value was
only checked in one low-value assertion and one other place where the check had
no useful effect (in nsCocoaWindow::HideWindowChrome()).

--HG--
extra : rebase_source : f6671e9e0e10ee18fb32f8b1c83f1e64c3d97e67
2016-12-21 11:12:54 +11:00
Nicholas Nethercote e2d9e4ed68 Bug 1325234 (part 2) - Streamline nsIWidget::Invalidate(). r=jimm.
This patch changes it from |NS_IMETHOD| to |virtual void|. The return value was
only checked in one low-value assertion so I decided it wasn't needed.

--HG--
extra : rebase_source : 3523d9a086cf98c40d237d777f5dd471af0d7465
2016-12-20 09:55:32 +11:00
Nicholas Nethercote 3af5047314 Bug 1299335 (part 8) - Streamline nsIWidget::Enable. r=mstange.
This patch changes it from |NS_IMETHOD| to |virtual void| because every
implementation of these functions always returns |NS_OK|.

--HG--
extra : rebase_source : 07ee29c514bf35b97d7195c53bb5b9220d1ef961
2016-12-19 20:54:16 +11:00
Nicholas Nethercote a28c8f38b2 Bug 1299335 (part 7) - Streamline nsIWidget::{Move,Resize}. r=mstange.
This patch changes them from |NS_IMETHOD| to |virtual void| because every
implementation of these functions always returns |NS_OK|.

--HG--
extra : rebase_source : 6207df5a46aeb6b8aaa0f697447a51bc6a6dc366
2016-12-19 20:54:03 +11:00
Nicholas Nethercote d0912b2968 Bug 1299335 (part 4) - Streamline nsIWidget::HideWindowChrome. r=mstange.
This patch does the following.

- Removes the return value, because none of the call sites check it.

- Removes the empty implementations from the android nsIWidget instance,
  because it can use the nsBaseWidget one.

--HG--
extra : rebase_source : 0791d3cb05907d6b41879549b52f3a33018abf45
2016-12-16 10:54:12 +11:00
Nicholas Nethercote 3970265787 Bug 1299335 (part 1) - Change some nsIWidget function return values from |NS_IMETHOD| to |virtual MOZ_MUST_USE nsresult|. r=jimm.
Specifically: OnDefaultButtonLoaded, AttachNativeKeyEvent, BeginMoveDrag,
BeginResizeDrag, GetAttention. These are all fallible functions whose result is
always checked.

The patch also moves some trivial function definitions from nsBaseWidget.cpp to
nsBaseWidget.h, and removes the android BeginResizeDrag() because it can
use the nsBaseWidget one.

--HG--
extra : rebase_source : ef32a41b547bcbc21f7df0043f683307470b136e
2016-12-16 10:54:02 +11:00
Stephen A Pohl c8f4c17fd0 Bug 1260850: Ensure that FilePicker (and other native app modal dialogs) on OSX remains responsive when a window modal dialog opens in the background. r=mstange 2016-09-08 15:41:55 -04:00
Nicholas Nethercote 346d5f4895 Bug 1296993 (part 7) - Streamline nsIWidget::CaptureRollupEvents. r=mstange.
This patch does the following.

- Removes the return value, because none of the call sites check it.

- Puts an empty implementation into nsBaseWidget.

- Removes the empty implementations from several nsIWidget instances, because
  they can use the nsBaseWidget one.

--HG--
extra : rebase_source : 2a94a47f1e7fe986d1efc3854c72968a3e28e365
2016-08-25 13:43:27 +10:00
Nicholas Nethercote d960fbd475 Bug 1296993 (part 5) - Streamline nsIWidget::SetWindow{ShadowStyle,TitlebarColor,Class}. r=mstange.
This patch does the following.

- Removes the return value, because none of the call sites check it.

- Removes the empty implementations from the android nsIWidget instance,
  because it can use the nsBaseWidget one.

--HG--
extra : rebase_source : f276e1629fcd0ffccb8c8dbec7bba6639a5ebd9f
2016-08-25 13:43:27 +10:00
Nicholas Nethercote 4390cb4f8d Bug 1296993 (part 4) - Streamline nsIWidget::PlaceBehind. r=mstange.
This patch does the following.

- Removes the return value, because none of the call sites check it.

- Removes the empty implementations from several nsIWidget instances, because
  they can use the nsBaseWidget one.

--HG--
extra : rebase_source : 82733f682c9e254e20354cc6908955a1e7485ee7
2016-08-25 13:43:27 +10:00
Nicholas Nethercote d8684f0659 Bug 1296993 (part 3) - Streamline nsIWidget::ConstrainPosition. r=mstange.
This patch does the following.

- Removes the return value, because none of the call sites check it.

- Puts an empty implementation into nsBaseWidget.

- Removes the empty implementations from several nsIWidget instances, because
  they can use the nsBaseWidget one.

--HG--
extra : rebase_source : ccf64aaa9364d096e1f060ef77be7e8455b11e1f
2016-08-25 13:43:27 +10:00
Nicholas Nethercote 672f94a22d Bug 1296993 (part 2) - Streamline nsIWidget::Set{,Fake}Modal. r=mstange.
This patch does the following.

- Removes the return value, because none of the call sites check it.

- Removes the empty implementations from several nsIWidget instances, because
  they can use the nsBaseWidget one.

--HG--
extra : rebase_source : b8a0d9a49b31929dd06af9e61fc57f484af7671d
2016-08-25 13:43:26 +10:00
Nicholas Nethercote ff02e25e13 Bug 1296993 (part 1) - Streamline nsIWidget::ReparentNativeWidget. r=mstange.
This patch does the following.

- Removes the return value, because none of the call sites check it.

- Puts an empty implementation into nsBaseWidget.

- Removes the empty implementations from several nsIWidget instances, because
  they can use the nsBaseWidget one.

--HG--
extra : rebase_source : e98b7f9970a920c39e941bb531dfc098125913d1
2016-08-25 13:43:26 +10:00
Nicholas Nethercote 367d94e34e Bug 1293596 (part 7) - Make nsIWidget::Destroy infallible. r=karlt.
--HG--
extra : rebase_source : 403d279c432c70671aa85991868d006c1f2da81d
2016-08-10 10:04:11 +10:00
Nicholas Nethercote 8bc855b22d Bug 1293596 (part 6) - Make nsIWidget::SetSizeMode() infallible. r=mstange,baku.
The only implementation of SetSizeMode() that can fail is the nsCocoaWindow
one, on an Objective C exception, which is unlikely and can be swallowed.

This allows some nsGlobalWindow functions to become infallible as well.

--HG--
extra : rebase_source : 85d54185f63d2c138ee3f3e0e0bfe3b5e805a981
2016-08-22 09:15:49 +10:00
Nicholas Nethercote 3fda0deee8 Bug 1293596 (part 5) - Tweak nsIWidget::MakeFullScreen{,WithNativeTransition}(). r=mstange.
They don't need to be NS_IMETHOD.

The patch also gives nsBaseWidget an InfallibleMakeFullScreen() function, which
avoids the need for some checks.
2016-08-19 09:27:28 +10:00
Nicholas Nethercote cc993d1772 Bug 1293596 (part 4) - Tweak nsIWidget::Create. r=mstange.
They don't need to be NS_IMETHOD, but they should be MOZ_MUST_USE. Adding the
latter catches a few missing checks, which the patch adds.

The patch also gives PuppetWidget an InfallibleCreate() function, which makes
the infallibility of PuppetWidget creation clear.
2016-08-19 09:03:17 +10:00
Nicholas Nethercote 67af4817e9 Bug 1293596 (part 2) - Rework nsIWidget bounds getters. r=mstange.
This patch makes GetBounds(), GetScreenBounds() and GetClientBounds() more
obviously infallible, like existing functions such as GetNaturalBounds() and
GetClientSize(). This results in clearer behaviour in nsCocoaWindow.mm if
Objective C exceptions occur. Along the way, the patch removes some useless
failure checks for these functions.

The patch also removes the NS_IMETHOD from GetRestoredBounds and makes that
function MOZ_MUST_USE.
2016-08-19 09:03:04 +10:00
Thomas Zimmermann 48ef99e762 Bug 1265386: Fix white-space errors in widget/, r=nfroyd
MozReview-Commit-ID: ATXI7dYFHmA
2016-07-22 10:56:13 +02:00
Carsten "Tomcat" Book d2a1babef4 Backed out changeset 2bea1e1e403d (bug 1265386) for bustage on a CLOSED TREE 2016-07-21 13:59:02 +02:00