Commit Graph

1741 Commits

Author SHA1 Message Date
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
stefanh@inbox.com
4d7b2dacaf Bug 531078 - Use MacOS system color for selected text background in inactive windows. r=mstange. 2016-11-15 20:38:22 +01:00
Stephen A Pohl
65a3b0efd9 Bug 1292527: Make OSX application menu localizable at runtime. r=mstange 2016-11-22 11:18:48 -05:00
Haik Aftandilian
9caed1b4c8 Bug 1315121 - OS X Remote printing (print_via_parent) scaled prints don't fill page; r=mconley
Send the size from PMGetAdjustedPaperRect to the child to use as the page size.
Add an Mac implementation of GetEffectivePageSize that returns the adjusted dimensions.
Add an Mac implementation of SetPaperWidth and SetPaperHeight so that adjusted dimensions can be manually set for reftest-print.

MozReview-Commit-ID: GgTFgBzkxTy

--HG--
extra : rebase_source : 66d5b2f8216ebd28401aec9bbb78c5ad32dd666c
2016-11-17 15:29:08 -08:00
Masayuki Nakano
a028890899 Bug 1317906 When a key press causes a call of InsertText(), it shouldn't mark keypress as consumed but instead, should mark InsertText() caused composition r=m_kato
Currently, when InsertText() which is caused by a key press causes committing composition, it consumes keypress event.  However, Korean 2-set IME calls InsertText() two times when there is composition and key press causes inserting another character next to the composition.  In this case, current design ignores second InsertText() becuase keypress event is already consumed by the first InsertText() call.

For solving this issue safely, InsertText() should mark current key event as "dispatched composition event". Then, following InsertText() calls should cause composition events instead of keypress events since following event order is too odd:

1. keydown (currently not dispatched by TextEventDisaptcher)
2. compositionupdate
3. compositionend
4. keypress
5. keyup

with the new design this becomes:

1. keydown (currently not dispatched by TextEventDispatcher)
2. compositionupdate
3. compositionend
4. compositionstart
5. compositionupdate
6. compositionend
7. keyup

This is similar to Chromium, although, Chromium includes the second InsertText() call into the first composition, we need to fix it later due to risky.

MozReview-Commit-ID: GL42cU2WIL0

--HG--
extra : rebase_source : 2063c56166f6c9ccee25a74e1d29f94daa6b159c
2016-11-17 13:35:21 +09:00
Sebastian Hengst
d35d1a1445 Backed out changeset 50f830bdb2c8 (bug 1315121) for failing reftest-sanity/page-width-4.1in.html on OS X 10.10 debug. r=backout on a CLOSED TREE 2016-11-17 21:53:26 +01:00
Haik Aftandilian
b98f841402 Bug 1315121 - OS X Remote printing (print_via_parent) scaled prints don't fill page; r=mconley
Send the size from PMGetAdjustedPaperRect to the child to use as the page size.
Add an Mac implementation of GetEffectivePageSize that returns the adjusted dimensions.

MozReview-Commit-ID: GgTFgBzkxTy

--HG--
extra : rebase_source : 9b6e3200698a695d3ca03f3848060083b8fe4ae6
2016-11-11 16:18:15 -08:00
Haik Aftandilian
eec30b1b54 Bug 1303051 - Printing Issue: Page Setup not being respected since upgrade to 48.01 on Mac; r=mconley
Adds serialization of native print settings values so
that correct page size, scaling, orientation are sent
to the child after the print dialog is displayed.

Changes the Mac print dialog code to load native
print settings from the "print.macosx.pagesetup-2"
pref and ignore what is passed in.

Overwrites the scaling percentage specified in
the print dialog when "Ignore Scaling and Shrink to
Fit Page Width" is checked.

Scaling on Nightly (remote printing) needs more work
to be done in a follow up bug.

MozReview-Commit-ID: B12ZeHuiYFJ

--HG--
extra : rebase_source : baa2a5865b29db8914fca1242af59674f9630c8e
2016-11-09 17:37:40 -08:00
Jonathan Watt
07c5338755 Bug 1313525 - Remove the nsIPrintOptions interface. r=mstange
--HG--
rename : widget/nsIPrintOptions.idl => widget/nsIPrinterEnumerator.idl
2016-10-28 00:31:14 +01:00
Masayuki Nakano
dfec2203fe Bug 1312649 part.2 IMEInputHandler::GetVaildAttributesForMarkedText() should return non-empty array r=m_kato
Vietnamese Telex perhaps referes this result and change its behavior. When typying something, Telex starts composition on Chrome but may not behave so on Gecko.

Fortunately, Chromium just returns some attributes when validAttributesForMarkedText: of NSTextInputClient [1] but it doesn't return these styles when attributedSubstringForProposedRange: of NSTextInputClient is called (always returns non-styled plain text) [2].  Therefore, this patch does not touch IMEInputHandler::GetAttributedSubstringFromRange().

*1 <7d85f23cb0/content/browser/renderer_host/render_widget_host_view_mac.mm (2936)>
*2 <7d85f23cb0/content/browser/renderer_host/render_widget_host_view_mac.mm (3036)>

MozReview-Commit-ID: 1gPIiu4Qbud

--HG--
extra : rebase_source : 5336eea303ee157959941dcc4bda2a0931f1f532
2016-11-07 16:19:41 +09:00
Masayuki Nakano
5ddcf36aa2 Bug 1312649 part.1 TextInputHandler::InsertText() should dispatch composition events instead of keypress events when it replaces a range which is different from current selection r=m_kato
Vietnamese Telex IME handles Backspace key immediately after inputting a word even when there is no marked text.  At this time, it tries to replace the word with specific string.  In such case, our editor shouldn't remove anything at handling the Backspace keypress event.

For avoiding this issue, InserText() should dispatch a set of composition for inserting the specified text into the range.  Then, editor won't perform any action of the key.

Additionally, when a Backspace keydown tries to remove the last character of the word, Telex removes it with a composition.  At this time, it creates dummy marked text "a" and make it empty later. So, in this case, InsertText() won't be called, therefore, we need to consume the Backspace keypress when SetMarkedText() is called for preventing removing the previous character of the word.

MozReview-Commit-ID: LfeEHDWn0cZ

--HG--
extra : rebase_source : 4753262ef16bc3875754ae38e966d8512947ad89
2016-11-07 10:30:05 +09:00
Kartikaya Gupta
54c54c7a09 Bug 1315706 - Pass a wrapper struct to various CompositorWidget functions. r=dvander
This is the first step in using these functions without having a
LayerManagerComposite at all.

MozReview-Commit-ID: 2zkuB7Ox4Ut

--HG--
extra : rebase_source : b23988275f5851a2fd30bd3e8a9931107a224c66
2016-11-07 21:16:52 -05:00
Kartikaya Gupta
d84df5e838 Bug 1315477 - Remove some instances of static_cast'ing to ClientLayerManager. r=mattwoodrow
MozReview-Commit-ID: 2oqoOE4gZK0

--HG--
extra : rebase_source : eb4bebeb6b79ec83a285facf7fde61ecbd705c43
2016-11-07 11:38:44 -05:00
Chris Peterson
469de34a31 Bug 1313903 - Fix -Wmismatched-parameter-types warning in widget/cocoa/nsAppShell.mm. r=spohl
widget/cocoa/nsAppShell.mm:113:47 [-Wmismatched-parameter-types] conflicting parameter types in implementation of 'nextEventMatchingMask:untilDate:inMode:dequeue:': 'NSEventMask' (aka 'unsigned long long') vs 'NSUInteger' (aka 'unsigned long')

NSWindow's nextEventMatchingMask method expects a parameter of type NSEventMask, not NSUInteger, when building  x86_64 with SDK 10.12:

https://developer.apple.com/reference/appkit/nswindow/1419304-nexteventmatchingmask
2016-11-02 21:18:36 -07:00
Phil Ringnalda
3e17fd7779 Merge m-i to m-c, a=merge
MozReview-Commit-ID: 6ims5jd1FU5
2016-10-19 18:29:50 -07:00