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

262 Коммитов

Автор SHA1 Сообщение Дата
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
Chris Peterson 23e776fdf7 Bug 1296967 - Fix -Wunused-result warning in widget/cocoa/nsCocoaWindow.mm. r=spohl 2016-08-22 00:02:12 -07: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
Michael Layzell 05d228443c Bug 1294553 - Don't pretend that nsCocoaWindow is an interface in nsPIWidgetCocoa.idl, r=mstange
MozReview-Commit-ID: 4a6UTI4TxV9
2016-08-11 17:56:10 -04:00
Nicholas Nethercote 735fccd3ce Bug 1293603 (part 3) - Remove erroneous NS_METHOD uses in widget/. r=erahm.
All these occurrences are for methods declared with NS_IMETHOD, and so they
should be NS_IMETHODIMP instead of NS_METHOD.

--HG--
extra : rebase_source : 50b0c0f46cab6a13cc27ad48fb24503b9a491463
2016-08-09 14:03:13 +10:00
Nicholas Nethercote a68db0d1df Bug 1293541 - Clean up NS_OBJC_*_TRY_* macros. r=mstange.
NS_OBJC_{BEGIN,END}_TRY_LOGONLY_BLOCK{,RETURN} are identical to
NS_OBJC_{BEGIN,END}_TRY_ABORT_BLOCK{,RETURN}. This patch removes the LOGONLY
versions in favour of the ABORT versions.

--HG--
extra : rebase_source : 4537de8986b87784d2a80ead24999310adbdece8
2016-08-09 14:27:59 +10:00
Markus Stange 6ee404d984 Bug 1280546 - Disable automatic NSWindow tabbing on 10.12. r=spohl
MozReview-Commit-ID: AnDmvWDMgsg

--HG--
extra : histedit_source : 576c42f278f31edb9731ee6deeed40c2ab7f07a4
2016-06-30 20:24:39 -04:00
Bill McCloskey b8ababd5ee Bug 1282153 - Remove retaining outparam to GetLayerManager (r=dvander) 2016-06-30 14:30:30 -07:00
Morris Tseng cbaeef2521 Bug 1281686 - Part 1: Fix OSX Compile failure due to unified build. r=mstange
MozReview-Commit-ID: FIcq2svB0fL
2016-06-29 11:24:43 +08:00
stefanh@inbox.com d1ad4b0dc8 Bug 1279017 - Remove code specific to 10.6-10.8 in widget/cocoa. r=mstange. 2016-06-10 23:30:25 +02:00
Phil Ringnalda 2f02d62e38 Back out e9a46afd9375 (bug 1279017) for 10.10 reftest-e10s failures in async scrolling tests
CLOSED TREE
2016-06-08 20:34:36 -07:00
stefanh@inbox.com a5320d1288 Bug 1279017 - Remove code specific to 10.6-10.8 in widget/cocoa. r=mstange. 2016-06-08 22:02:22 +02:00
Makoto Kato ebcb916262 Bug 1212527 - Set background color to NSColor before calling showDefinitionForAttributedString on 10.11. r=mstange
When calling showDefinitionforAttributedString on OSX 10.11, it always return error due to the following exception.

Exception: decodeObjectForKey: class "TitlebarAndBackgroundColor" not loaded or does not exist

So before calling it, we set temporary color value, then restore color after calling it.

MozReview-Commit-ID: 1YeY6X1W6AV
2016-05-26 23:39:50 +09:00
Makoto Kato 8ccc8229b8 Backed out changeset d89f93a40f78 (bug 1212527) due to static analysis bustage
MozReview-Commit-ID: 79SduJl9zcs
2016-05-27 00:05:10 +09:00
Makoto Kato 15b6b9d8df Bug 1212527 - Set background color to NSColor before calling showDefinitionForAttributedString on 10.11. r=mstange
When calling showDefinitionforAttributedString on OSX 10.11, it always return error due to the following exception.

Exception: decodeObjectForKey: class "TitlebarAndBackgroundColor" not loaded or does not exist

So before calling it, we set temporary color value, then restore color after calling it.

MozReview-Commit-ID: 1YeY6X1W6AV

--HG--
extra : rebase_source : 1bfafdb24f7d6df0ad2552b786b8af84b71cc28a
2016-05-26 23:39:50 +09:00
Jonathan Kew 6a2b0ea6d0 Bug 1087964 - Remove OS X resolution-changing hack from DoResetWidgetBounds, and get the scale from the device context instead (because it will be up to date already, while the widget may not); and fix scaling in nsCocoaWindow::Resize to work properly with custom devPixelsPerPx. r=mstange 2016-05-11 11:04:21 +01:00
Sebastian Hengst 6598003bcf Backed out changeset a74ef371c48f (bug 1087964) for failing elementFromPoint.html on OSX 10.10 debug. r=backout 2016-05-12 13:19:00 +02:00
Jonathan Kew 473d904d86 Bug 1087964 - Remove OS X resolution-changing hack from DoResetWidgetBounds, and get the scale from the device context instead (because it will be up to date already, while the widget may not); and fix scaling in nsCocoaWindow::Resize to work properly with custom devPixelsPerPx. r=mstange 2016-05-12 09:31:13 +01:00
Masayuki Nakano 07b6f24132 Bug 1259657 Rename WidgetGUIEvent::widget to WidgetGUIEvent::mWidget r=smaug
MozReview-Commit-ID: 167PQWJDEHW

--HG--
extra : rebase_source : 6cd44095b9f33e03190972f043087786cbd772f2
2016-04-14 17:03:14 +09:00
Masayuki Nakano 0790ee93ea Bug 1137563 part.1 Implement TextEventDispatcherListener in TextEventInputHandlerBase and IMEInputHandler r=m_kato 2016-03-16 13:47:49 +09:00
Masayuki Nakano e65433cc66 Bug 1137572 part.3 Use pseudo IME context when TextEventDispatcher has input transaction which is not for native event handler r=smaug 2016-03-16 13:47:47 +09:00
Rok Garbas 0e86796bc0 Bug 1248983 - Fix spelling for nsCocoaWindow.mm. r=jdm 2016-02-17 16:25:22 +01:00
Nicholas Nethercote 76dfc05b83 Bug 1239589 - Change nsBaseWidget::mBounds to a LayoutDeviceIntRect. r=kats.
This patch removes dozens of ToUnknown/FromUnknown conversions and doesn't add
any new ones, which is nice. It also removes UntypedDevPixelsToCocoaPoints(),
which is no longer needed.

--HG--
extra : rebase_source : 81288126b582402408518aecfc304bc128e05d15
2015-11-22 20:32:29 -08:00
Jonathan Kew 2ff25b1f53 Bug 1239007 - Replace nsIntRect by strongly-typed rects in a couple of nsCocoaUtils functions. r=mstange 2016-01-13 07:32:55 +00:00
Jonathan Kew e404911268 Bug 890156 - patch 1 - Add nsIWidget::GetDesktopToDeviceScale() method. r=emk 2015-12-04 16:58:05 +00:00
Jonathan Kew 84b8c3a0a4 Bug 890156 - patch 0.3 - Create a version of nsIWidget::Create that takes Desktop pixels, because that's what we actually need to pass in some cases. r=mstange 2016-01-13 07:32:55 +00:00
Jonathan Kew 3d48351585 Bug 890156 - patch 0.2 - Remove the (unused) aRect parameter from nsBaseWidget::BaseCreate. r=kats 2016-01-13 07:32:55 +00:00
Jonathan Kew df4ffa594d Bug 890156 - patch 0.1 - Switch from 'display pixels' to 'desktop pixels' terminology in widget code. r=kats 2015-11-25 19:11:58 +00:00
Masayuki Nakano da7a2f4f8d Bug 1179632 part.2 WidgetCompositionEvent should store NativeIMEContext which caused the event and PuppetWidget should store it for GetNativeIMEContext() r=smaug, sr=smaug 2015-12-11 15:15:57 +09:00
Masayuki Nakano 6cad726628 Bug 1179632 part.1 native IME context should not be stored in InputContext but should be able to retrieve with nsIWidget::GetNativeData() r=smaug 2015-12-11 15:15:57 +09:00
Nicholas Nethercote 90bbac13cc Bug 1229237 (part 3) - Make nsIWidget::Invalidate() take a LayoutDeviceIntRect. r=botond.
--HG--
extra : rebase_source : 1afe44a5ab2a3d5478010fc23ba1891ab297bde6
2015-11-16 21:18:31 -08:00
Nicholas Nethercote 1fb25d8609 Bug 1229237 (part 1) - Make nsIWidget::{Create,CreateChildren}() take a LayoutDeviceIntRect. r=botond.
--HG--
extra : rebase_source : 08407e76083534ad39dd34d2535ec09c95e506db
2015-11-16 00:35:18 -08:00
Nicholas Nethercote 52b3d826da Bug 1225007 (part 1, attempt 3) - Use LayoutDevicePixel more in Cocoa widget code. r=kats.
--HG--
extra : rebase_source : e4b3bb36c18822557f7724a58979eddd9d8cac62
2015-11-19 14:10:38 +11:00
Phil Ringnalda 87802cdbad Backed out 2 changesets (bug 1225007) for frequent OS X "Shouldn't return empty rect" assertion failures, a=backout
Backed out changeset c5b352c74b35 (bug 1225007)
Backed out changeset 8a513c70ce7c (bug 1225007)
2015-11-19 20:55:26 -08:00
Nicholas Nethercote ce671f3678 Bug 1225007 (part 1, attempt 2) - Use LayoutDevicePixel more in Cocoa widget code. r=kats.
--HG--
extra : rebase_source : ea132cb4a6eda3553682114f3a1a280acfaf0aa3
2015-11-19 14:10:38 +11:00
Tooru Fujisawa 6350ec15bd Bug 1224790 - Use SetFakeModal instead of SetModal for non-modal window opened by modal window. r=smaug, mstange
--HG--
extra : rebase_source : e7f6009ecadf0347f916b95c51e7223855cc6294
2015-11-18 20:12:26 +09:00
Nicholas Nethercote 26b0d282a5 Backout 52ba24123046 and 66768d6a50fa (bug 1225007) for causing lots of test assertions on Mac. CLOSED TREE 2015-11-17 17:02:39 -08:00
Nicholas Nethercote eb12a384c0 Bug 1225007 (part 1) - Use LayoutDevicePixel more in Cocoa widget code. r=kats.
--HG--
extra : rebase_source : ad3466d05e476ebf65affdde3fca52494e1327cb
2015-11-15 21:37:52 -08:00
Nicholas Nethercote f38ebf7649 Bug 1224482 (part 3) - Replace GetClientOffsetUntyped() with GetClientOffset(). r=kats.
The patch also changes nsMenuPopupFrame::mLastClientOffset to
LayoutDeviceIntPoint.

--HG--
extra : rebase_source : d7c0784efd332e382db3f2857c8f43eabc1c807c
2015-11-13 01:37:02 -08:00
Nicholas Nethercote 369f54f3a3 Bug 1224482 (part 1) - Tweak typed/untyped versions of Get{,Client,Screen}Bounds(). r=kats.
In nsIWidget, GetBoundsUntyped(), GetClientBoundsUntyped() and
GetScreenBoundsUntyped() are currently the primary implementations, and the
untyped versions are defined on top of them. This patch flips that around.

--HG--
extra : rebase_source : 15b2f08f90bf4d1e209c6cb885f6a6e3b8db6708
2015-11-12 16:04:52 -08:00
Nicholas Nethercote e2fe66176b Bug 1224403 (part 4) - Make {Get,Set}NonClientMargins() return/take a LayoutDeviceIntMargin. r=kats.
This required adding {To,From}UnknownMargin().

--HG--
extra : rebase_source : de7e8f56604825bcc1babe5e05a8f8623a402cad
2015-11-11 23:05:04 -08:00