Commit Graph

1755 Commits

Author SHA1 Message Date
Stone Shih
2b44bf8c6e Bug 1304904 - Handle tabletProximity to detect stylus and support tilt for OS X. r=mstange, r=smaug 2017-01-10 11:13:04 +08:00
Ehsan Akhgari
b3e5ce4a2d Bug 1319908 - Load the menu icons for the bookmarks menu with the correct content type and principal on OSX; r=baku
This patch makes nsMenuItemIconX also participate in the setup
introduced in bug 1277803.
2017-01-20 10:55:23 -05:00
Makoto Kato
01fadc5113 Bug 1331236 - Make nsPrintingPromptServiceX.mm cpp file instead of Objective-C++. r=mstange
nsPrintingPromptServiceX doesn't use Objective-C, so we should change to C++ instead.

Also, nsPrintDialogServiceX::ShowPageSetup should have NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT.

MozReview-Commit-ID: 33LfNFmiUTQ

--HG--
rename : toolkit/components/printingui/mac/nsPrintingPromptServiceX.mm => toolkit/components/printingui/mac/nsPrintingPromptService.cpp
extra : rebase_source : 7ab7e3aeed81afc70d02bd262d87d6858380bb01
2017-01-15 16:47:36 +09:00
Stephen A Pohl
b3738b6163 Backout ee828e9096c7 (bug 1328604) for causing some custom shortcuts to stop working on OSX. r=backout 2017-01-14 22:05:26 -05: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
390bf447ab Bug 1325234 (part 7) - Streamline nsIWidget::GetSelectionAsPlaintext. r=mstange.
This patch changes it from |NS_IMETHOD| to |virtual MOZ_MUST_USE nsresult|.

--HG--
extra : rebase_source : 3af9e5f5c2a558db38c2f98ca6740794aaae08e7
2016-12-21 11:13:08 +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
a8699ee61d Bug 1325234 (part 1) - Streamline nsIWidget::NotifyIME. r=jimm.
This patch changes it from |NS_IMETHOD| to |virtual nsresult|. The callsites
were a mix of checked and unchecked so using |MOZ_MUST_USE| didn't feel
appropriate.

--HG--
extra : rebase_source : 471ca43dcd565ddd1761d01df344c30e4e04a9ec
2016-12-20 09:55:30 +11:00
Cameron McCormack
41782ed8bf Bug 1328832 - And the other one.
MozReview-Commit-ID: APHfKiPmWdK
2017-01-06 15:30:31 +08:00
Cameron McCormack
318a182e13 Bug 1328832 - Followup bustage fix for macOS.
MozReview-Commit-ID: 66Gbfyp9Ale
2017-01-06 15:29:47 +08:00
Wes Kocher
c4adb53fc9 Merge m-c to inbound, a=merge
MozReview-Commit-ID: IQlYASgyniL
2017-01-05 17:32:50 -08:00
Wes Kocher
0f254a30d6 Merge inbound to central, a=merge
MozReview-Commit-ID: 1ij6nLf8f8s
2017-01-05 17:30:35 -08:00
Kris Maglione
54653f7b32 Bug 1325141: Fix leak in Z-constrained windows on OS-X. r=enn,jmaher
MozReview-Commit-ID: J4NRd315XnT

--HG--
extra : rebase_source : d88074564f43d72d1b8e3ab260645e11ecf32cf2
extra : histedit_source : 3115d57e532083d70f29a1a702f38f0e684750bc
2016-12-30 16:16:08 -08:00
cku
09c56e6da6 Bug 1323912 - Part 2. Pass opacity down to imgIContainer::Draw. r=mstange
Each concrete class of imgIContainer is able to handle opacity already. All we
need to do is pass opacity value to them.

MozReview-Commit-ID: EMkLnG3YXA1

--HG--
extra : rebase_source : b0a0aad1fec0c2765e96d23ed9b627345c793795
2017-01-03 13:53:22 +08:00
Phil Ringnalda
c83d1d7ce9 Merge m-i to m-c, a=merge
MozReview-Commit-ID: 51FMtH1yTe6
2017-01-04 18:33:32 -08:00
Stephen A Pohl
49078b83e6 Bug 1326472: Fix compile warning introduced by bug 1309596. r=mstange 2017-01-04 10:31:17 -05:00
Stephen A Pohl
a481baefc3 Bug 1328604: Avoid displaying custom shortcuts on OSX until bug 429824 is fixed. r=mstange 2017-01-04 10:13:37 -05:00
Kartikaya Gupta
8687b9cffa Bug 1280428 - Hold a strong pointer to the nsChildView while dispatching events (speculative crash fix). r=mstange
MozReview-Commit-ID: FPnCu0zqVjr

--HG--
extra : rebase_source : 0e435321efed21d4eb9c4083da52d6931d87fc59
2017-01-04 10:48:24 -05:00
Stephen A Pohl
0c71853914 Bug 1325906: Start using proper constant for PNG pasteboard type. r=mstange 2016-12-29 14:05:11 -05:00
Stephen A Pohl
6b7d58d5f6 Bug 1325770: Change formatting to abide by code style guidelines and improve a comment. r=mstange 2016-12-28 12:37:15 -05:00
Stephen A Pohl
1f35a402c0 Bug 1325770: Fix regression from bug 1235162 that prevented drag/dropping of images to the OSX Desktop. r=mstange 2016-12-28 12:37:09 -05:00
Masayuki Nakano
ffd3700a9c Bug 1256562 part.2 All event dispatchers under widget/cocoa should initialize WidgetEventTime::mTimeStamp with nsCocoaUtils::GetEventTimeStamp() r=mstange,smaug
MozReview-Commit-ID: 3sXtO76JScf

--HG--
extra : rebase_source : 729c1b5f1066974502408a886dc19991d7bcb97f
2016-12-20 20:58:04 +09:00
Masayuki Nakano
1de48b4d14 Bug 1256562 part.1 Implement nsCocoaUtils::GetEventTimeStamp() to convert from timeStamp of NSEvent to TimeStamp r=birtles,mstange
This patch implements nsCocoaUtils::GetEventTimeStamp() which hides how to get TimeStamp from timeStamp of NSEvent from other developers.

Different from Windows and GTK, we don't need to use SystemTimeConverter and implement CurrentTimeGetter class because the internal value of the macOS implementation of TimeStamp is based on mach_absolute_time(), which measures "ticks" since boot. Event timestamps are NSTimeIntervals (seconds) since boot. So the two time representations already have the same base; we only need to convert seconds into ticks.

MozReview-Commit-ID: LvioyJOM7S9

--HG--
extra : rebase_source : 0e497f675f9b7e1355155dc081945478f83019a8
2016-12-26 12:23:37 +09:00
Neil Deakin
ec01413b3d Bug 1309596, fix changed drag feedback image when the page is zoomed, r=mstange 2016-12-23 18:09:44 -05:00
Neil Deakin
6598d2a0fc Bug 1309596,implementation of UpdateDragImage on mac, r=mstange 2016-12-23 18:09:44 -05:00
Thomas Nguyen
0aaea58b69 Bug 1304623 - Create a pref to control the default referrer policy - part 3. r=bkelly
MozReview-Commit-ID: 1A6IHPeNYBQ
2017-01-05 11:29:56 +08:00
Neil Deakin
20b2609458 Bug 1320341, don't show a panel when the parent window is miniaturized or hidden, r=mstange 2016-12-22 11:06:59 -05:00
Stephen A Pohl
139c939cbd Bug 1235162: Replace deprecated drag API on OSX. r=mstange 2016-12-20 14:33:08 -05: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
4f95087c90 Bug 1299335 (part 5) - Streamline nsIWidget::StartPluginIME. r=mstange.
This patch changes it from |NS_IMETHOD| to |virtual MOZ_MUST_USE nsresult|.

--HG--
extra : rebase_source : cd17e3c00c6c183d898f83e020861720b199775a
2016-12-16 10:55:18 +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
1dab0c3072 Bug 1299335 (part 3) - Streamline nsIWidget::SetParent. r=mstange.
This patch removes its return value, because none of the call sites check it
except for one non-vital assertion.

--HG--
extra : rebase_source : 3471c4e22394b8a05c6708d0f8469686ffad9814
2016-12-16 10:54:11 +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
d5a1aa9f88 Bug 1292527: Make OSX application menu localizable at runtime. r=mstange 2016-11-29 21:22:13 -05:00
Jonathan Watt
312b9881a9 Bug 1309272, part 8 - Implement printing via Skia PDF for macOS (behind pref print.print_via_pdf_encoder=skia-pdf). r=lsalzman 2016-11-29 07:55:19 +00:00
Jonathan Watt
40c79814d3 Bug 1309272, part 7 - Restructure the PMSessionBeginCGDocumentNoDialog related code to live in PrintTargetCG. r=lsalzman 2016-11-29 07:55:00 +00:00
Jonathan Watt
7b908d5dac Bug 1309272, part 5 - Rework the macOS printing code to get rid of the hacks that create a new PrintTarget for each page. r=lsalzman
--HG--
rename : gfx/thebes/PrintTargetCG.cpp => gfx/thebes/PrintTargetCG.mm
2016-11-28 22:40:43 +00:00
Wes Kocher
809804e4d5 Backed out 5 changesets (bug 1309272) for OSX static build failures a=backout
Backed out changeset 5ecb0db80f15 (bug 1309272)
Backed out changeset d2046ba27486 (bug 1309272)
Backed out changeset 31fdab31ab51 (bug 1309272)
Backed out changeset a9f6271115de (bug 1309272)
Backed out changeset 125e6fb37319 (bug 1309272)

--HG--
rename : gfx/thebes/PrintTargetCG.mm => gfx/thebes/PrintTargetCG.cpp
2016-11-28 13:49:09 -08:00
Jonathan Watt
09a9ea3a3d Bug 1309272, part 8 - Implement printing via Skia PDF for macOS (behind pref print.print_via_pdf_encoder=skia-pdf). r=lsalzman 2016-11-23 09:14:10 +00:00
Jonathan Watt
a986dd0cf9 Bug 1309272, part 7 - Restructure the PMSessionBeginCGDocumentNoDialog related code to live in PrintTargetCG. r=lsalzman 2016-11-22 16:39:08 +00:00
Jonathan Watt
09fcf9f506 Bug 1309272, part 5 - Rework the macOS printing code to get rid of the hacks that create a new PrintTarget for each page. r=lsalzman
--HG--
rename : gfx/thebes/PrintTargetCG.cpp => gfx/thebes/PrintTargetCG.mm
2016-11-21 15:07:09 +00:00
stefanh@inbox.com
4dc3f8f83d Bug 1320377 - Allow users to change file extension in the Save dialog. r=mstange. 2016-11-28 18:04:55 +01:00
Stephen A Pohl
bac899f5b2 Bug 1319911: Revert changeset 3d7142a4f06d from bug 1292527 due to reported regression. r=me 2016-11-24 09:20:39 -05:00