Commit Graph

1645 Commits

Author SHA1 Message Date
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
Stephen A Pohl
8f756a0ba5 Bug 1293593: Fix crash due to an Objective-C exception when calling getRed:green:blue:alpha on an NSColor instance with an incompatible NSColorSpace. r=mstange 2016-08-19 23:17:58 -04: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
Jimmy Wang
31cf81ec15 Bug 1261299 - Implement nsIClipboard methods in nsClipboard.mm with methods specific for osx. (EmptyClipboard, SetData) methods modified from nsBaseClipboard to also set the current selection cache. r=jimm
MozReview-Commit-ID: D8aRmK6FAai

--HG--
extra : rebase_source : 34137ffbe7da97f6ee2608fbd9ee4e120b0ebe71
2016-08-11 16:43:32 -04:00
Jimmy Wang
f1deff206d Bug 1261299 - Add testing method GetSelectionAsPlaintext to DomWindowUtils which returns the text selection that was sent to the osx service menu nsChildView.mm. r=masayuki
MozReview-Commit-ID: JFzgyTmFDp2

--HG--
extra : rebase_source : 4bc04539a88d123e3ff70d07303adc759bace5b8
2016-07-08 11:35:39 -04:00
Jimmy Wang
5ac347a6ed Bug 1261299 - On e10s in nsChildView for OSX services, determine if there is a current selection (chrome/content). Send the selection to osx service menu. r=masayuki
MozReview-Commit-ID: G5iFo9GhyeA

--HG--
extra : rebase_source : ba6fb2144d67046e4d98c1d56d981f556078ad93
2016-07-08 11:22:42 -04:00
Jimmy Wang
271a7cfaa2 Bug 1261299 - Add method nsCopySupport::ClearSelectionTransferable() to clear the nsClipboard::sSelectionTransferable when you have no content selection. r=mstange
MozReview-Commit-ID: AjUe94N0Iiw

--HG--
extra : rebase_source : bf1bf642212add9227c185a6cfa3f8f94a7f0248
2016-06-08 14:11:39 -04:00
Jimmy Wang
7c6ec2835f Bug 1261299 - Add sSelectionTransferable and to get the current selection (chrome/content) needed for the OSX service menu. r=mstange
MozReview-Commit-ID: 4n5clge2tr8
***
Bug 1261299 - Add sSelectionTransferable and use in e10s to get the content selection needed for the OSX service menu.

MozReview-Commit-ID: HbZ7S4HfFtn

--HG--
extra : rebase_source : 6a520189d735c0c900e08d474ed838a68afbb4f8
2016-07-08 11:21:43 -04:00
Tooru Fujisawa
b9da2b39b7 Bug 1294102 - Use the original height that is not affected by the top to decide the button style on OSX. r=mstange 2016-08-13 15:34:57 +09: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
bab6d17ebf Bug 1293117 (part 4) - Change many NS_IMETHODIMP occurrences to NS_IMETHOD. r=froydnj.
This patch makes the following changes on many in-class methods.

- NS_IMETHODIMP F() override;      --> NS_IMETHOD F() override;
- NS_IMETHODIMP F() override {...} --> NS_IMETHOD F() override {...}
- NS_IMETHODIMP F() final;         --> NS_IMETHOD F() final;
- NS_IMETHODIMP F() final {...}    --> NS_IMETHOD F() final {...}

Using NS_IMETHOD is the preferred way of marking in-class virtual methods.
Although these transformations add an explicit |virtual|, they are safe --
there's an implicit |virtual| anyway because |override| and |final| only work
with virtual methods.

--HG--
extra : rebase_source : 386ee4e4ea2ecd8d5001efabc3ac87b4d6c0659f
2016-08-08 10:54:47 +10: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
Daniel Glazman
46b86db1c3 Bug 1247373 - Correctly handle colors from named color spaces in the native color picker. r=mstange
MozReview-Commit-ID: LEajtxr3vx6

--HG--
extra : rebase_source : b860f8c2f56c11b78419e9ba6bca9731f2c024e4
2016-08-09 15:12:57 -04:00
Matt Woodrow
af772b40e6 Bug 1292288 - Don't hold both the effects lock and the GL lock at the same time in PrepareWindowEffects to avoid deadlock. r=mstange
--HG--
extra : rebase_source : f80ae0cfca630b7a414eea8921047996a9122104
2016-08-05 11:33:06 +12:00
Kartikaya Gupta
713c58caee Bug 1289435 - Extract a helper function to dispatch MultiTouchInput to APZ if applicable and then to Gecko. r=mstange
This also modifies the windows widget code to use this new helper function, as
it avoids an unnecessary round-trip where a MultiTouchInput gets converted to
a WidgetTouchEvent (in nsWindow.cpp) and then back to a MultiTouchInput (in
APZCTreeManager.cpp)

MozReview-Commit-ID: 1WGbfINTW6c
2016-08-03 12:06:58 -04:00
Kartikaya Gupta
ebadfda552 Bug 1289435 - Ensure that the synthesized native touch events have sane timestamps. r=mstange
MozReview-Commit-ID: 6QxB7XBx7T7
2016-08-03 12:06:58 -04:00
Matt Woodrow
52628b0bb3 Bug 1230641 - Make our NSOpenGLContext opaque when in fullscreen mode. r=mstange 2016-08-03 22:48:03 +12:00
Nicolas Silva
48805c9b3e Bug 1284837 - Disallow implicit conversions from float to integer when creating IntPoint and IntSize objects. r=botond 2016-07-26 16:48:30 +02:00
Kartikaya Gupta
f27c48490f Bug 1288187 - Allow synthesizing widget touch events on OS X. r=mstange
MozReview-Commit-ID: AGvZQZtbPh
2016-07-25 17:33:09 -07:00
Jeff Gilbert
6790ba91a7 Bug 1288649 - Remove NextPowerOfTwo. - r=jrmuizel
MozReview-Commit-ID: 9CR6lscs3d2
2016-07-25 14:46:28 -07:00
Carsten "Tomcat" Book
8b6316ec5f Merge mozilla-central to mozilla-inbound 2016-07-22 11:59:06 +02:00
Carsten "Tomcat" Book
336105a0de merge mozilla-inbound to mozilla-central a=merge 2016-07-22 11:58:02 +02:00
Nate Weaver
e04b07cbb9 Bug 426680 - Set allowedFileTypes on NSSavePanel so the file extension isn't selected. r=mstange. 2016-07-22 08:24:02 +02:00
Thomas Zimmermann
9bf5588624 Bug 1265386: Convert code in widget/ to |UniquePtr|, r=nfroyd
This patch replaces all references to |nsAutoPtr| in widget/ by references
to |UniquePtr|. |nsAutoPtr| is deprecated and will go away soon.

MozReview-Commit-ID: 8xAS79wTkPC
2016-07-22 10:56:13 +02: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
Tom Tromey
5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06: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
Carsten "Tomcat" Book
4a80cb90aa Backed out changeset c402d9e91897 (bug 1265386) 2016-07-21 13:58:46 +02:00
Thomas Zimmermann
0b68c0c6df Bug 1265386: Convert code in widget/ to |UniquePtr|, r=nfroyd
This patch replaces all references to |nsAutoPtr| in widget/ by references
to |UniquePtr|. |nsAutoPtr| is deprecated and will go away soon.

MozReview-Commit-ID: 8xAS79wTkPC
2016-07-21 13:29:33 +02:00
Thomas Zimmermann
d8818e0d94 Bug 1265386: Fix white-space errors in widget/, r=nfroyd
MozReview-Commit-ID: ATXI7dYFHmA
2016-07-21 13:29:30 +02:00
Chris Peterson
b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Carsten "Tomcat" Book
5b86ab83e3 Backed out changeset 3119db384fcc (bug 1281575) for bustage 2016-07-21 06:26:58 +02:00
Ryan Hunt
de1e16b8e9 Bug 1281575 - Extract interface of APZCTreeManager for moving to GPUProcess. r=kats 2016-07-20 13:37:00 +02:00
Ryan Hunt
5c1e3a17b8 Bug 1281575 - Extract interface of APZCTreeManager for moving to GPUProcess. r=kats
MozReview-Commit-ID: 7tO2kkTNFk2
2016-07-20 13:37:00 +02:00
Markus Stange
63c4f33f96 Bug 1070710 - Use ViewRegion for window dragging. r=spohl
MozReview-Commit-ID: 5x2XHl20P6a

--HG--
extra : histedit_source : 56b671bffe9e6cd497ade61ff9beed2e3bf98e14
2016-07-11 16:15:07 -04:00
Markus Stange
f1138d1e77 Bug 1070710 - Use ViewRegion for vibrant areas in VibrancyManager. r=spohl
MozReview-Commit-ID: 5qVo59SV7QG

--HG--
extra : histedit_source : 12980052172b2a858a52978fdd98dea28a9ea854
2016-07-11 14:47:05 -04:00
Markus Stange
5ee44d898b Bug 1070710 - Add mozilla::ViewRegion which assembles a LayoutDeviceIntRegion as NSViews. r=spohl
MozReview-Commit-ID: RrVzLcv27T

--HG--
extra : amend_source : d14dc262bf300a81feaf03954d5783ea1c7451cb
extra : histedit_source : aa39b53c122a719a5181b5a41d5351bbdf04cbd8
2016-07-16 17:07:45 -04:00
stefanh@inbox.com
49a3815a8b Bug 1282251 - Remove nsCocoaFeatures::OnLionOrLater(), OnMountainLionOrLater() and OnMavericksOrLater(). r=spohl. 2016-07-11 21:19:36 +02:00
ojab
c1eb9d57b7 Bug 1266369 - Don't define kVK_RightCommand when building against the macOS 10.12 SDK. r=masayuki
kVK_RightCommand is already defined in Carbon.framework in 10.12.

MozReview-Commit-ID: 5QWRK4Gokg8

--HG--
extra : amend_source : 14f4059ef2c7cabfc63c33c4cea92b2650b5bc48
2016-07-09 12:57:01 -04: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
Markus Stange
4fdbaeb674 Bug 1283637 - Don't specify the 'state' key in the CoreUI options for overlay scrollbars unless the scrollbar is actually hovered. r=spohl
MozReview-Commit-ID: 5pak1tqlwM5

--HG--
extra : histedit_source : 804f9869a9076c5bee11c3b32ed8722c7d63d801
2016-06-30 19:44:41 -04:00
Gregory Szorc
f21ec324a6 Merge mozilla-central to mozilla-inbound 2016-07-06 18:30:58 -07:00
Gregory Szorc
021d3fdfc7 Merge mozilla-central to mozilla-inbound 2016-07-06 18:26:17 -07:00
Milan Sreckovic
8995d0bec7 Bug 1284341: Add utility functions to recognize OS X 10.12. r=mstange
MozReview-Commit-ID: BZOv9lSeWq

--HG--
extra : rebase_source : bb42cbb77b77f0b73e9165c2187bfe9e13a83063
2016-07-04 17:25:25 -04:00
stefanh@inbox.com
42adb0ed78 Bug 1284464 - Missing submenu arrows in xul menus on Mac OS X 10.9-10.10. r=mstange. 2016-07-05 19:54:38 +02:00
Masayuki Nakano
a527fb31f9 Bug 1284422 part.4 Fix odd indent of MOZ_LOG() in TextInputHandler.mm r=m_kato
MozReview-Commit-ID: 4ua3yoSgAJv

--HG--
extra : rebase_source : da3d2f847227b3ff6c354f9db0e6b774d1932429
2016-07-05 18:38:53 +09:00
David Anderson
6562af780a Move CompositorWidget construction out of nsIWidget. (bug 1281998 part 5, r=jimm) 2016-07-01 01:15:16 -07:00