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

1955 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Hengst 75955d0246 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 8fJX1xXgzhD
2017-08-22 11:49:04 +02:00
Nicholas Nethercote 8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Markus Stange fa53d431d3 Bug 1389908 - Make sure the NSColorPanel never has a dangling target, and make sure to set the new target before calling setColor. r=spohl
MozReview-Commit-ID: L71yb593eR2

--HG--
extra : rebase_source : e09fbf3a95ea445180d24c0ee81b153a57441b97
2017-08-21 19:16:22 -04:00
Makoto Kato fbad20099a Bug 1277095 - Look up dictionary by force touch. r=mstange
From 10.10.3, macOS supprts looking up dictionary by force touch.  So we should support it because this is supported by Chrome and Safari.

MozReview-Commit-ID: AcAhieMXOwe

--HG--
extra : rebase_source : 79c55830dfa023165731269780d813956e4e26f2
2016-11-16 12:50:37 +09:00
Carsten "Tomcat" Book 99aa3f8e70 Merge mozilla-central to mozilla-inbound 2017-08-17 13:13:10 +02:00
Nicholas Nethercote 025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Markus Stange 83110207f4 Bug 1390888 - Stop drawing the titlebar highlight line. r=spohl
This line is subtle enough to not be noticeable with light titlebar fills,
and looks out of place with dark titlebar fills.

MozReview-Commit-ID: D0b4O2wry1F

--HG--
extra : rebase_source : 739adb837f8e756fc9619864877fc6faff31d1cf
2017-08-16 13:18:46 -04:00
Markus Stange 91c2215ec0 Bug 1390888 - Correctly draw into mTitlebarCGContext and invalidate the right parts if mTitlebarRect is not located at (0, 0). r=spohl
MozReview-Commit-ID: Jf0pt1wZxUo

--HG--
extra : rebase_source : dfa680c1b590075d709f0b3c530adda8d9c92059
2017-08-16 13:16:34 -04:00
Masayuki Nakano 5345065a53 Bug 1388647 - part2: Make IMEInputHandler of Cocoa widget handle request to commit/cancel composition synchronously r=m_kato
When Gecko started to support Cocoa widget, we needed to use NSInputManager.
That allowed applications to access only focused IME context.  Therefore, commit
composition request handler for Cocoa is designed as handling asynchronosly if
it's requested when the window is not active or is being inactivated.

Additionally, the asynchronous handling isn't perfect.  We hit some MOZ_ASSERT()
now in some places.  E.g., in SelectedRange(), it doesn't assume that it's
called during deactive.

On the other hand, NSInputManager was alreay obsolete and we already stopped using it
(bug 810225).  Instead, we're using NSTextInputContext and it allows applications
to access IME anytime.  Therefore, if we make IMEInputHandler handles commit/cancel
composition requests synchronsly, that behaves same as the other platforms.  So, we
can get rid of macOS specific issue completely.

MozReview-Commit-ID: X7aWmGq95x

--HG--
extra : rebase_source : a472a03e3ef6f424fe73c2d438b8326bed80278d
2017-08-09 18:41:19 +09:00
Masatoshi Kimura 5b97708fef Bug 1387800 - Remove [deprecated] nsIFilePicker.show(). r=qdot
MozReview-Commit-ID: 81ZkeYdSPVW

--HG--
extra : rebase_source : 2f30565b8d5986ef6265027562f9842d0db2688e
2017-08-06 13:15:31 +09:00
Masatoshi Kimura dec070e4cf Bug 1389460 - Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug
MozReview-Commit-ID: E88DZK5sfwx

--HG--
extra : rebase_source : 64e1a47c9366a970f20ec459dde9b379a207e802
2017-08-07 02:28:52 +09:00
Mason Chang 6f96537b8e Bug 1372602 Make child widgets not visible if the window around it isn't visible on OS X. r=mstange 2017-08-10 21:43:26 -07:00
Bill McCloskey a7bc022071 Bug 1384336 - Stop using OS-level event loop in content process (r=mstange)
MozReview-Commit-ID: 1ouSlgGchWl
2017-08-09 21:24:20 -07:00
Nicholas Nethercote 1a6f1a62fa Bug 1387381 - Remove nsXPIDLString local variables. r=erahm.
nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.

The patch suitably converts the remaining nsXPIDLString local variable as well.

--HG--
extra : rebase_source : 5fff9f2c6844559198f601853f8db08564add7d5
2017-08-08 16:07:55 +10:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Manish Goregaokar b74c4d0f69 Bug 1386915 - Add nsLookAndFeel::NativeInit() virtual call for initializing native-side state; r=jfkthame
MozReview-Commit-ID: 8XKSC1AOI0N
2017-08-06 15:41:08 -07:00
Alex Gaynor 11a211f901 Bug 1386308 - stop trying to change the display sleep settings from the content process; r=haik
Before this change we were trying to change the settings from both the content
and parent processes, so this doesn't change any functionality. This allows to
remove access to the com.apple.PowerManagement.control mach service from the
content process.

MozReview-Commit-ID: 3DOhqG5U6oz

--HG--
extra : rebase_source : dee0b97c444ae95cfc8f80cb0fb99aa9e2658d51
2017-08-01 12:22:42 -04:00
Nicholas Nethercote d4f9aa5530 Bug 1384835 (part 2, attempt 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
--HG--
extra : rebase_source : 6c24fbacb03d4adebe5f22b5e7fc60b069913f20
2017-07-31 14:23:50 +10:00
Nicholas Nethercote 581214bd8b Bug 1384835 (part 1, attempt 2) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
--HG--
extra : rebase_source : fe566945a55c281d8290634a5b55bed19415c839
2017-07-31 10:52:51 +10:00
Brendan Dahl 5dd8373329 Bug 1355147 - Use headless clipboard on macOS. r=jrmuizel
MozReview-Commit-ID: Fh0GHE34joE
2017-07-28 11:00:29 -07:00
Brendan Dahl 987400a824 Bug 1355147 - Add basic support for headless mode on macOS. r=jrmuizel
MozReview-Commit-ID: 23Wchhimynz
2017-07-28 11:00:27 -07:00
Sebastian Hengst d7527a414d Backed out changeset 07b534f44740 (bug 1384835) for failing xpcshell's security/manager/ssl/tests/unit/test_cert_sha1.js checkCertErrorGenericAtTime on Linux x64 debug. r=backout 2017-07-28 10:30:29 +02:00
Sebastian Hengst 1d708511f0 Backed out changeset 5df4d8778602 (bug 1384835) 2017-07-28 10:29:29 +02:00
Nicholas Nethercote 0574a6b496 Bug 1384835 (part 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
Because we want to remove nsAdoptingString. We have other variants that don't
use nsAdoptingString, which can be used instead. There are three basic
patterns.

1. The easiest case is when we don't check for success.

> nsAdoptingString s = Preferences::GetString("foo");
> foo(s);

becomes:

> nsAutoString s;
> Preferences::GetString("foo", s);
> foo(s);

2. The next case is when we check if the result is empty.

> nsAdoptingString s = Preferences::GetString("foo");
> if (s.IsEmpty()) { ... }

becomes:

> nsAutoString s;
> Preferences::GetString("foo", s);
> if (s.IsEmpty()) { ... }

3. The final case is when we null check the result.

> nsAdoptingString s = Preferences::GetString("foo");
> if (s) { ... }

becomes:

> nsAutoString s;
> nsresult rv = Preferences::GetString("foo", s);
> if (NS_SUCCEEDED(rv)) { ... }

The patch also avoids some UTF8/UTF16 conversions in a few places.

--HG--
extra : rebase_source : f339b1a3dda4dc93979d38c30c001fbe77485b55
2017-07-25 20:36:14 +10:00
Nicholas Nethercote f314cbcbe5 Bug 1384835 (part 1) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
This is basically a cosmetic change; references are the normal way to do string
outparams.

--HG--
extra : rebase_source : ffc5945f269bdcd3d4116755b56713e87a44b6cd
2017-07-25 19:12:56 +10:00
Julian Seward 408d24da56 Bug 1382563 - Remove ns*String::AssignWithConversion. r=erahm.
This patch replaces four functions of the name AssignWithConversion which
are essentially wrappers around CopyASCIItoUTF16 and LossyCopyUTF16toASCII
with direct calls to the latter two functions.  The replaced functions are:

  void nsCString::AssignWithConversion( const nsAString& aData )
  void nsString::AssignWithConversion( const nsACString& aData )

  void nsTString_CharT::AssignWithConversion(
                            const incompatible_char_type* aData,
                            int32_t aLength = -1);

The last of the three exists inside the double-included nsTString* world and
so describes two functions, giving four in total.

This has two advantages:

* it removes code

* at the call points, it makes clear (from the replacement name) which
  conversion is being carried out.  The generic name "AssignWithConversion"
  doesn't make that obvious -- one had to infer it from the types.

The patch also removes two commented out lines from
editor/composer/nsComposerCommands.cpp, that appear to be related.  They are
at top level, where they would never have compiled.  They look like
leftovers from some previous change.

--HG--
extra : rebase_source : fb47bf450771c3c9ee3341dd14520f5da69ec4f5
2017-07-24 19:23:52 +02:00
Carsten "Tomcat" Book d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Tobias Schneider 3880ddff03 Bug 1382327 - (reftest) Rename reftest-print to reftest-paged. r=dbaron
--HG--
extra : rebase_source : c4e47e2de8d615c77e7e9ce88f6b21c9d15c92e4
2017-07-26 22:53:46 -07:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Masayuki Nakano c8d5ce8e59 Bug 1333459 - part4: Make EventStateManager resets "waiting reply from remote process" when the focused content isn't in remote process r=smaug
On macOS, we fall back eKeyPress event to native menu.  Therefore, widget always requests a reply from remote process because it's difficult to check if the eKeyPress event will be sent to a remote process actually.  If it's not sent to any remote processes, PresShell needs to dispatch the event into the DOM tree.  Additionally, even if it's marked as "waiting reply from remote process", it needs to dispatch the DOM event in the main process first because we need to check if the key combination is reserved by chrome (if it's reserved, the eKeyPress event shouldn't be fired in the remote process).

Therefore, this patch makes EventStateManager::PreHandleEvent() resets the state when focused content isn't in any remote processes and the event's propagation hasn't been stopped.

Additionally, this patch makes PresShell::HandleEventInternal() checks WidgetEvent::PropgationStopped() with WidgetEvent::IsWaitingReplyFromRemoteProcess() before dispatching the event into the DOM tree.

MozReview-Commit-ID: FmgL3rCuQ8y

--HG--
extra : rebase_source : aa8d6b924fc78d1d9dd35a35c92976c35c758657
2017-07-21 17:22:08 +09:00
Johann Hofmann 3eac596d72 Bug 1371219 - Add an inputSource attribute to XULCommandEvent. r=smaug
In the frontend we need to know if XUL buttons in the toolbar were
triggered by a touch event, so we're passing on the inputSource
in the command event.

MozReview-Commit-ID: DMvgZULk9hT

--HG--
extra : rebase_source : c455c8ec77e439bf02c1e3e8d34a36e1fb5e3bd0
2017-07-20 17:45:56 +02:00
Sebastian Hengst 367f0ac5a2 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IWRTFZdtzaE
2017-07-21 12:56:44 +02:00
Stone Shih a930bf9910 Bug 1372097 Implement tangential pressure and twist on Mac. r=mstange.
MozReview-Commit-ID: 5eigFssLEGR
2017-06-12 16:25:49 +08:00
Wes Kocher b5bcc4905e Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: CBL7SUEUGKV
2017-07-19 17:29:56 -07:00
Ryan Hunt 017d292cac Bug 1382128 part 2 - Remove WrPoint, WrSize, WrRect, WrMatrix, and WrColor. r=kats
MozReview-Commit-ID: 9koNScu4CyE

--HG--
extra : rebase_source : 68185e949ddf2ae346a5d597d056a7f2d9ea7a28
2017-07-18 18:32:46 -04:00
Ryan Hunt 3f3cb0a954 Bug 1382128 part 1 - Use a namespace in webrender_bindings. r=kats
MozReview-Commit-ID: 3JTMa9Ix5S7

--HG--
extra : rebase_source : 0bea14d9e395cab260d2db5135b1f64e9f82b2e2
2017-06-27 19:20:36 -04:00
Haik Aftandilian 09507f2814 Bug 1353064 - Add-on always prints at 100% due to missing nsPrintSettingsX::GetScaling() impl r=cosmo0920
MozReview-Commit-ID: AhIFJUfRrPJ

--HG--
extra : rebase_source : b01c8e6099df8de46c2e0ba983ac91738d648c84
2017-06-14 15:06:18 -07: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
Samael Wang 3810bc3903 Bug 1350643 - Part 3: Add GetDPI to nsIScreen & ScreenDetails. r=kanru
MozReview-Commit-ID: HEFyuYV26Wy

--HG--
extra : rebase_source : fb172f4ba99ab7119036ddf4ec1b3eeeaead186c
2017-06-06 18:09:34 +08:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Josh Aas 9d7fb5a517 Bug 1372599 - Only turn off CGEvent logging on buggy versions of OSX to avoid delays in first paint. r=mstange
--HG--
extra : amend_source : 6ac7d91aac2458e50a3de8a59e2e6ce0f1fd4509
2017-07-06 23:31:00 -04: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
Erica Wright 6a89d8490a Bug 1378499 - add missing include files. r=mstange
MozReview-Commit-ID: LQ6E0wAbhU0

--HG--
extra : rebase_source : 6383e90725f5aa50e15c06cf88153b7fc7d0f665
2017-07-05 16:40:09 -04:00
Kartikaya Gupta 4826f32d87 Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel
One thing to note here is that the Scale function on gfxRect has a
different implementation than that in gfx::Rect which is replacing it.
The former just scales the width/height directly whereas the latter
scales the XMost/YMost and recomputes the width/height.

MozReview-Commit-ID: 5FImdIaNfC3

--HG--
extra : rebase_source : 98662d2a52ff9652ec60b066641a07c6d5ee8e08
2017-07-05 11:22:00 -04: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
sotaro 0159f2016c Bug 1377314 - Replace ImageKey when image size is changed r=kats 2017-07-04 11:56:04 +09:00
Bill McCloskey 224d56eb18 Bug 1377222 - Eliminate nsITimer::InitWithFuncCallback in favor of InitWithNamedFuncCallback (r=froydnj)
MozReview-Commit-ID: 9zN9aAd7daA
2017-07-03 16:19:56 -07:00