Commit Graph

22833 Commits

Author SHA1 Message Date
Tiberius Oros
797c93d81f Merge inbound to mozilla-central r=merge a=merge 2017-11-21 11:55:23 +02:00
Jim Chen
676e0a6e5c Bug 1416310 - 5. Remove GeckoLayerClient.java and update generated bindings; r=jchen
Remove GeckoLayerClient.java since it's no longer used, and update
auto-generated JNI bindings. r=me for trivial patch.

MozReview-Commit-ID: CiNPLLkh3VJ

--HG--
extra : rebase_source : 0cddae4f8914dd6f6a0631a7e69701828476f2b8
2017-11-20 17:17:02 -05:00
Jim Chen
a845c063bf Bug 1416310 - 4. Don't use GeckoLayerClient in native code; r=rbarker
Use LayerSession::Compositor or NativePanZoomController to call back
into Java from nsWindow.

MozReview-Commit-ID: 9JUKAE5XQK1

--HG--
extra : rebase_source : 9d6861b9d641e6abb6b6f94f5f9c4b3661ff071c
2017-11-20 17:17:02 -05:00
Jim Chen
bbe7b4e34c Bug 1416310 - 1. Remove getMatrixForLayerRectToViewRect; r=rbarker
Patch gets rid of `LayerView.getMatrixForLayerRectToViewRect`, and just
uses `LayerView.getZoomFactor` directly when calculating the matrix in
GeckoInputConnection. This also lets us avoid the `isCompositorReady`
call on a non-UI thread. To get the correct offset, we need the screen
bounds from Gecko, so it's passed to Java as the first element in the
rect array. Using bounds from Gecko lets us avoid having to deal with
things like the dynamic toolbar animator ourselves.

MozReview-Commit-ID: 6I61SZGyQyO

--HG--
extra : rebase_source : d576fb7ef9a42de10b14db662e5c4833f16f6312
2017-11-20 17:17:00 -05:00
Nika Layzell
a7666fd8fe Bug 1418048 - Add a callback-based Send API to async returning IPDL methods, r=billm
Currently if you write an async IPDL method which has a return value, we expose
a SendXXX method which returns a MozPromise. This MozPromise can then be
->Then-ed to run code when it is resolved or rejected.

Unfortunately, using this API loses ordering guarantees which IPDL provides.
MozPromise::Then takes an event target, which the resolve runnable is dispatched
to. This means that the resolve callback's code doesn't have any ordering
guarantees relative to the processing of other IPC messages coming over the same
protocol.

This adds a new overload to SendXXX with two additional arguments, a lambda
callback which is called if the call succeeds, and a lambda callback which is
called if the call fails. These will be called in order with other IPC messages
sent over the same protocol.

MozReview-Commit-ID: FZHJJaSDoZy
2017-11-20 17:55:32 -05:00
Markus Stange
a0e9560488 Bug 1370040 - Use the public API -[NSVisualEffectView setMaskImage:] instead of the private API -[NSWindow _cornerMask]. r=spohl
The idea is the following:
Behind-window vibrancy is mostly rendered by the window server. For a given
vibrant region of a window, the window server renders a vibrancy "backdrop",
which is a blurred version of everything that's behind that region, modified
with a color tint and blended in some way. Then it puts our actual window
contents on top of that background.
The backdrop's shape is usually a rectangle. If we don't want it to be a
rectangle, we need to tell the window server about the shape that we want it to
be. We can't just "draw" a different shape in our own rendering, because our
own rendering is merely placed on top of the backdrop - but here we want to
modify the shape of the backdrop itself.

NSVisualEffectView lets us set a mask image on the view. If this view is the
content view of a window, then the view will automatically communicate the mask
image to the window server.

Traditionally, our popup windows have had a ChildView as their content view. If
we now want an NSVisualEffectView to be the content view of the window, then we
need to nest the ChildView inside that NSVisualEffectView.
But this NSVisualEffectView is only needed when the window is vibrant and the
vibrancy backdrop needs to have a certain shape. This is the case for our menus
which need to have rounded corners. If the window transitions to being
non-vibrant, or not needing a special shape, then we can go back to the way our
window's NSView hierarchy has worked traditionally. So we need to reparent
NSViews during those transitions.

MozReview-Commit-ID: Bo2VzjhhR0A

--HG--
extra : rebase_source : 9eb463cc68c16c3b9281b57455330969c5e2642c
2017-11-19 18:38:35 -05:00
Andreea Pavel
9474960c52 Backed out 1 changesets (bug 1370040) for build bustage at /cocoa/VibrancyManager.mm:207 r=backout on a CLOSED TREE
Backed out changeset 84c737eb3c6e (bug 1370040)
2017-11-20 01:36:36 +02:00
Markus Stange
75bf1f6ae8 Bug 1370040 - Use the public API -[NSVisualEffectView setMaskImage:] instead of the private API -[NSWindow _cornerMask]. r=spohl
The idea is the following:
Behind-window vibrancy is mostly rendered by the window server. For a given
vibrant region of a window, the window server renders a vibrancy "backdrop",
which is a blurred version of everything that's behind that region, modified
with a color tint and blended in some way. Then it puts our actual window
contents on top of that background.
The backdrop's shape is usually a rectangle. If we don't want it to be a
rectangle, we need to tell the window server about the shape that we want it to
be. We can't just "draw" a different shape in our own rendering, because our
own rendering is merely placed on top of the backdrop - but here we want to
modify the shape of the backdrop itself.

NSVisualEffectView lets us set a mask image on the view. If this view is the
content view of a window, then the view will automatically communicate the mask
image to the window server.

Traditionally, our popup windows have had a ChildView as their content view. If
we now want an NSVisualEffectView to be the content view of the window, then we
need to nest the ChildView inside that NSVisualEffectView.
But this NSVisualEffectView is only needed when the window is vibrant and the
vibrancy backdrop needs to have a certain shape. This is the case for our menus
which need to have rounded corners. If the window transitions to being
non-vibrant, or not needing a special shape, then we can go back to the way our
window's NSView hierarchy has worked traditionally. So we need to reparent
NSViews during those transitions.

MozReview-Commit-ID: Bo2VzjhhR0A

--HG--
extra : rebase_source : 0434a17e2cddc94715db6a5fd17bc27e2cddd05c
2017-11-19 17:01:02 -05:00
Robin Grenet
34508b32f6 Bug 1360278 - Add preference to trigger context menu on mouse up for GTK+ and macOS, r=mstange,smaug
MozReview-Commit-ID: Bg60bD8jIg6

--HG--
extra : rebase_source : cc8bd5796096f49ad4fdab81885a426afd6117e4
2017-11-16 13:35:58 +01:00
lochang
9214b56b5a Bug 1406268 - Use rect width/height instead of minimum width/height and clamp the rect on Linux. r=mats
MozReview-Commit-ID: B7KjnO9uaef

--HG--
extra : rebase_source : c4647b31b650dddd90df528ff1ac48f72d92fed5
2017-11-17 14:20:42 +08:00
Jean-Yves Avenard
66fa0333bd Bug 1417442 - P2. fix nsIGfxInfo in GPU process. r=dvander
MozReview-Commit-ID: FiU8Ygfh86s

--HG--
extra : rebase_source : 969ff0bc095e30820106ca08ecf5e06e2ebf223e
2017-11-15 23:33:37 +01:00
Jean-Yves Avenard
73c4627a67 Bug 1417442 - P1. Don't attempt to initialize MediaPrefs in the GPU process. r=dvander
MozReview-Commit-ID: 66766Tx8vgM

--HG--
extra : rebase_source : 43e37d4fc43d51f5e9f185a30965800d2f4f7830
2017-11-16 17:21:09 +01:00
Martin Stransky
8eafc3d45b Bug 1414212 - Enable titlebar rendering on Gtk+ >= 3.10, r=jhorak
MozReview-Commit-ID: JFmpa8JyHEl

--HG--
extra : rebase_source : 311e1ac327b78e2fe5251a465e120e8aee4df152
2017-11-16 15:18:17 +01:00
Ciure Andrei
fdbe147ffb Merge mozilla-central to autoland. r=merge a=merge CLOSED TREE 2017-11-17 12:09:31 +02:00
Ciure Andrei
92d28bd8f2 Merge inbound to mozilla-central r=merge a=merge 2017-11-17 11:59:03 +02:00
Makoto Kato
8fbfdec507 Bug 1417356 - xpcshell doesn't have Java thread. r=jchen
This is a regression by bug 1403690.  After landing this, some xpcshell tests
cause crash with stylo.

mozilla::java::GeckoAppShell::GetShowPasswordSetting doesn't work on xpcshell
test.  If JNI isn't available such as xpcshell, we shouldn't use this method.

MozReview-Commit-ID: AUrT93SkQ2H

--HG--
extra : rebase_source : 2147a42633ea98e3a4d891af832f28c105d5dcf8
2017-11-16 12:25:26 +09:00
Joel Maher
eb7c7c286f Bug 1417653 - clean up a few moz.build files that have typos. r=gbrown 2017-11-16 08:56:51 -05:00
Brendan Dahl
ce5b5fa465 Bug 1409580 - Raise headless sheet widgets when shown. r=jrmuizel
Fixes:
 - test_modal_prompts.html
 - test_prompt.html

MozReview-Commit-ID: IHkrqAaMe7L

--HG--
extra : rebase_source : 9a7e377f621fdad5a30a178e5f82d7f8d8b24105
2017-10-19 17:09:28 -07:00
Brendan Dahl
5530b8b09e Bug 1409580 - Use different scroll delta modes on different platforms in headless. r=jrmuizel
Fixes test_group_wheelevents.html

MozReview-Commit-ID: Ctq0WngKG15

--HG--
extra : rebase_source : 4322e00378827c34d83c2b732da7564ed0b3e00e
2017-10-19 15:57:39 -07:00
Brendan Dahl
a58c9d187c Bug 1409580 - Use top level widget for headless screen offset. r=jrmuizel
Fixes test_group_mouseevents.html

MozReview-Commit-ID: dHItN6BssI

--HG--
extra : rebase_source : 2cb934efd8f94ec1cb817851e79442264a739a98
2017-10-19 15:55:35 -07:00
Boris Zbarsky
198e006805 Bug 1415741. Switch to a different env var, not MOZ_DEBUG, for disabling mouse event taps on Mac. r=mstange
MozReview-Commit-ID: BgFpmE2Juom
2017-11-15 12:23:58 -05:00
Noemi Erli
f24a75f9b7 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE 2017-11-15 12:15:40 +02:00
Chris Peterson
768b96f58b Bug 1415470 - build: Enable VS2017 C5038 initializer list order warnings (like gcc -Wreorder). r=glandium
C5038 is a new warning in VS2017, similar to gcc and clang's -Wreorder, which is enabled by -Wall. We should enable C5038 so Windows developers can see these warnings locally instead of when gcc and clang fail with warnings-as-errors on Try.

https://blogs.msdn.microsoft.com/vcblog/2017/07/21/diagnostic-improvements-in-vs2017-15-3-0/

We need to suppress C5038 warnings from Windows Runtime Library header files (wrl.h) included in ANGLE and widget/windows:

z:\build\build\src\vs2017_15.4.2\SDK\Include\10.0.15063.0\winrt\wrl\wrappers\corewrappers.h(515): error C5038: data member 'Microsoft::WRL::Wrappers::Details::SyncLockWithStatusT<Microsoft::WRL::Wrappers::HandleTraits::SemaphoreTraits>::sync_' will be initialized after data member 'Microsoft::WRL::Wrappers::Details::SyncLockWithStatusT<Microsoft::WRL::Wrappers::HandleTraits::SemaphoreTraits>::status_'
...

And suppress C5038 warnings in upstream webrtc code:

media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseFilter.cpp(176): error C5038: data member 'mozilla::media::BaseFilter::mClsId' will be initialized after data member 'mozilla::media::BaseFilter::mState'
media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.cpp(169): error C5038: data member 'mozilla::media::BasePin::mFilter' will be initialized after data member 'mozilla::media::BasePin::mLock'
media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.cpp(170): error C5038: data member 'mozilla::media::BasePin::mLock' will be initialized after data member 'mozilla::media::BasePin::mName'
media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.cpp(172): error C5038: data member 'mozilla::media::BasePin::mDirection' will be initialized after data member 'mozilla::media::BasePin::mQualitySink'

MozReview-Commit-ID: BMDVkvQXNoq

--HG--
extra : rebase_source : 0d5ede9530d0d0750b8fffdc1cdfdc646ec8f22a
2017-11-07 19:52:10 -08:00
Kevin Chen
49b2130100 Bug 1415469 - Remove mDeviceResetSequenceNumber from TDR process since we don't need it anymore; r=dvander
MozReview-Commit-ID: 3uQQwW8QOJA

--HG--
extra : rebase_source : ab6090ad51a2a4714f1739a30d854d624d187239
2017-11-08 15:26:43 +08:00
Jim Chen
4fc4969b9b Bug 1415994 - 8. Update auto-generated bindings; r=jchen
MozReview-Commit-ID: 2r1V6Hvl5Pb

--HG--
extra : rebase_source : c0347e4d915d3f585a6971fc3048d1f658490ec6
2017-11-14 18:18:36 -05:00
Jim Chen
db59a90277 Bug 1415994 - 6b. Track GeckoDisplay origin changes; r=snorp
Add a `screenOriginChanged` callback to GeckoDisplay.Listener, which
informs Gecko of changes in the origin of the display. The origin
translates to coordinates for web APIs like screenX/screenY and certain
other calculations.

Also, make GeckoDisplay listen to layout changes in the view tree (by
overriding gatherTransparentRegion as an optimization), and call
`screenOriginChanged` accordingly.

MozReview-Commit-ID: C72EHCkbV3T

--HG--
extra : rebase_source : 240c5c8fb3c2938ae966f40e86f7c5a0ca66526c
2017-11-14 18:18:35 -05:00
Jim Chen
ff6c25061a Bug 1415994 - 5. Use LayerSession from GeckoSession; r=snorp
Make GeckoSession inherit from LayerSession, and connect its Compositor
to native code as part of the GeckoSession routine.

MozReview-Commit-ID: wQaH1A0a7z

--HG--
extra : rebase_source : ee4ae96e974d15c8cb9ad569ea9abf0ace4d0fa5
2017-11-14 18:18:35 -05:00
Jim Chen
e029f5ee64 Bug 1415994 - 4. Use LayerSession in native code; r=snorp
Make native code use LayerSession::Compositor instead of
LayerView::Compositor. Also, make some callbacks happen on the UI thread
to make the Java code cleaner.

MozReview-Commit-ID: KhuHel7Zfdn

--HG--
extra : rebase_source : 040442539fd7cc1af8e13e4be1d9ebfb1625f778
2017-11-14 18:18:35 -05:00
Jim Chen
11dc67a595 Bug 1415994 - 1. Don't report screen size in GeckoLayerClient; r=rbarker
We don't actually use the screen size through GeckoLayerClient anymore.
Getting rid of it lets us get rid of the Context field in
GeckoLayerClient as well.

MozReview-Commit-ID: GM1jlhAZm4T

--HG--
extra : rebase_source : 04827eb61d6304d4782a7a935d5528013255726f
2017-11-14 18:18:34 -05:00
Markus Stange
ff02ca90b1 Bug 1417197 - Create constants for hardcoded theme fill colors. r=jrmuizel
MozReview-Commit-ID: KnRKm3TyHIE

--HG--
extra : rebase_source : 8d419344dd67dad5692506c31763e9c3c3d4d968
2017-11-14 16:01:32 -05:00
Markus Stange
a25f1fafb3 Bug 1417197 - Create nsITheme::CreateWebRenderCommands in order to optimize simple theme fills, and add a Mac implementation. r=jrmuizel
MozReview-Commit-ID: 1G9NHPwd5ST

--HG--
extra : rebase_source : 74189f1bad32600979b099663bae27cd24d1f0ec
2017-11-14 15:34:56 -05:00
Brendan Dahl
c161ff02d7 Bug 1409580 - Support edit command mapping in headless MacOS. r=masayuki
Extracts out the creation of an NSEvent from a WidgetKeyEvent in
TextInputHandler.mm into generic helper method. The helper is used by headless
to create a fake NSEvent to then build edit commands from key events.

Fixes:
- test_selectevents.html
- test_bug756984.html
- test_movement_by_characters.html
- test_movement_by_words.html
- test_backspace_vs.html
- test_bug1094000.html
- ... many key event tests

MozReview-Commit-ID: 1Jur5MHOrkp

--HG--
extra : rebase_source : fbe320aff8fd2e1b36f3b46e02336e9fc89c48d0
2017-10-13 17:40:27 -07:00
Sylvestre Ledru
2fda79adb2 Bug 1416712 - Remove nsPaperPS as it seems to be dead code r=karlt
MozReview-Commit-ID: IWbo6cXDyiy

--HG--
extra : rebase_source : 32259c1324420a81ba18511366f44cd7a7deffb1
2017-11-13 11:24:47 +01:00
Csoregi Natalia
e520b4f458 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-11-14 00:59:27 +02:00
Boris Zbarsky
87c6b14c1a Bug 1415677 part 6. Remove nsIDOMHTMLCollection. r=qdot
MozReview-Commit-ID: E8P9o0bv63L
2017-11-13 10:41:33 -05:00
Yura Zenevich
b2b66a61f5 Bug 1401980 - shutdown accessibility service on accessibliity.force_disable pref change. r=surkov
MozReview-Commit-ID: 8YfCaoB5Stt
2017-11-11 22:21:45 -05:00
Andreea Pavel
7fb4cc447c Merge inbound to mozilla-central r=merge a=merge 2017-11-11 11:59:20 +02:00
Phil Ringnalda
15fafc3560 Backed out 2 changesets (bug 1401980) for failures in browser_shutdown_pref.js
CLOSED TREE

Backed out changeset cea72923c4be (bug 1401980)
Backed out changeset 72f9e62daa10 (bug 1401980)

MozReview-Commit-ID: 2bhiTKZmmib
2017-11-10 21:50:14 -08:00
Yura Zenevich
446a07beed Bug 1401980 - shutdown accessibility service on accessibliity.force_disable pref change. r=surkov
MozReview-Commit-ID: 8YfCaoB5Stt
2017-11-10 22:43:22 -05:00
Ryan VanderMeulen
ef843a0e30 Merge m-c to inbound. a=merge 2017-11-10 16:14:16 -05:00
Dylan Roeh
ebd39f9ce0 Bug 1337078 - Improve the use of Android API in OSPreferences r=snorp
Add BrowserLocaleManager.refreshLocales, a native function which calls OSPreferences::Refresh, and BrowserLocaleManager.getLocale, which returns the current locale string. Use these in place of observing modification of the intl.locale.os pref.
2017-11-10 09:20:04 -06:00
Markus Stange
c871c885f9 Bug 1415070 - Cut out the window button shape on Windows 7. r=kats
MozReview-Commit-ID: 6hKuNMqJsMW

--HG--
extra : rebase_source : d8894db275ff4f28dc32d670e400cfb16c14d23c
2017-11-09 16:31:08 -05:00
Chris Peterson
0e8425b401 Bug 1416164 - Replace NS_ABORT with MOZ_ASSERT_UNREACHABLE. r=froydnj
MozReview-Commit-ID: DRdYlOYqZpN

--HG--
extra : rebase_source : b20fb24abf0f2ce648c12a827532c0dbeefb6c63
2017-10-24 23:52:56 -07:00
Kartikaya Gupta
00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -05:00
Jed Davis
c7f8a32bf4 Bug 1401786 - Move base::LaunchApp options into a LaunchOptions struct, like upstream Chromium. r=billm
MozReview-Commit-ID: 74IXV4oGeWR

--HG--
extra : rebase_source : ef4021a60506a8fc5fa5a35e3f3fefb9dbad75d6
2017-09-08 20:35:06 -06:00
Neil Deakin
4b1d934d48 Bug 1411705, check the pseudo char code in GetAccessKeyCandidates so that this check works in both keydown and keypress events, r=masayuki 2017-11-09 18:42:40 -05:00
Martin Stransky
47784aca73 Bug 1360560 - Add destructor to nsRemoteClient, r=jhorak"
Create nsRemoteClient pointer as a base class pointer to X11/DBus implementations.

MozReview-Commit-ID: 3CpkDey6rLU

--HG--
extra : rebase_source : f7f6fd7e179e23d4bfabe528092710bcbe9a1892
2017-11-02 16:23:06 +01:00
Martin Stransky
79f785f637 Bug 1360560 - Implement XRemote client by D-Bus service, r=jhorak
MozReview-Commit-ID: JDNEC8Jar5w

--HG--
extra : rebase_source : 8c1d1e128101dfb2e4e467fda74d82febdcd323a
2017-11-02 16:21:28 +01:00
Mats Palmgren
1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
Makoto Kato
639e6d2041 bug 1414881 - Detect more resolution icons. r=karlt
I add some resolution icons for HiDPI by bug 1415014.  So we should detect
these resolution icons.  Also, Thunderbird has default256.png, so we should
support it, too.

MozReview-Commit-ID: 6BEgV0usnE2

--HG--
extra : rebase_source : ec1b954e1ee4664f365376202fe6f9158c6a9e3b
2017-11-16 14:08:10 +09:00