Commit Graph

22414 Commits

Author SHA1 Message Date
Ryan VanderMeulen
6eb7aef00e Merge m-c to autoland. a=merge 2017-08-09 18:51:26 -04:00
Ryan VanderMeulen
2e6670c78e Merge autoland to m-c. a=merge 2017-08-09 18:47:59 -04:00
Brendan Dahl
02dc1567cd Bug 1387170 - Use custom clipboard constructor instead of singleton. r=jrmuizel
This allows instances of the clipboard to be created (like it
was pre-headless).
2017-08-09 09:49:50 -07:00
Brendan Dahl
d1dd2ea172 Bug 1387168 - Use custom clipboard constructor instead of singleton. r=jrmuizel
This allows instances of the clipboard to be created (like it
was pre-headless).
2017-08-09 09:46:51 -07:00
Carsten "Tomcat" Book
bb29fe249d Merge mozilla-central to autoland 2017-08-09 12:31:56 +02:00
Farmer Tseng
c7c31e6f60 bug 1358076 - Part2. Enable gtest for PDFViaEMFPrintHelper r=jwatt
MozReview-Commit-ID: BWzuisXJrhV

--HG--
extra : rebase_source : 56a76a6a9eaa6e48d633fd2a2a0a6ef8b818f813
2017-08-09 14:28:16 +08:00
Farmer Tseng
6891586bfd Bug 1358076 - Part1. Add a gtest to verify PDFViaEMFPrintHelper r=jwatt
PrinterTestPage.pdf is from
https://opensource.apple.com/source/cups/cups-136.9/cups/test/testfile.pdf

MozReview-Commit-ID: HSCD80QVQVt

--HG--
extra : rebase_source : f5f044834a369a896452c7731bc91d73c31f6277
2017-08-09 14:28:06 +08:00
Eric Rahm
fe18bf0131 Bug 1386825 - Part 4: Remove remaining instances of MOZ_B2G. r=froydnj
MozReview-Commit-ID: 8r4eMwiZ4Vg
2017-08-08 14:41:09 -07:00
Bob Owen
132c433aab Bug 1388048 - Check for failure of ResolveJunctionPointsAndSymLinks in GeckoChildProcessHost::GetPathToBinary. r=jimm
This patch also adds logging into ResolveJunctionPointsAndSymLinks to help diagnose issues that
might arise if the resolution fails or the path is not usable for some reason.
2017-08-07 17:27:10 +01:00
Eugen Sawin
4c19212863 Bug 1386240 - [2.0] Fix JNI wrappers. r=me 2017-08-08 19:20:44 +02:00
Eugen Sawin
14c89f86b5 Bug 1386240 - [1.3] Check success status when enabling or disabling geolocation events. r=jchen 2017-08-08 18:15:54 +02:00
Carsten "Tomcat" Book
e02df09b7c Merge mozilla-central to mozilla-inbound 2017-08-08 13:23:59 +02:00
Carsten "Tomcat" Book
0f16d437cc merge mozilla-inbound to mozilla-central a=merge 2017-08-08 13:18:14 +02: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
Christoph Kerschbaumer
28e9ff9691 Bug 1388028 - Update tests within widget/tests to comply with new data: URI inheritance model. r=smaug 2017-08-07 20:13:12 +02:00
Carsten "Tomcat" Book
e54b14cf9a merge mozilla-inbound to mozilla-central a=merge 2017-08-07 12:56:05 +02: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
Manish Goregaokar
89df80e7d0 Bug 1386915 - Assert when nsLookAndFeel calls GTK off main thread; r=bholley
MozReview-Commit-ID: 9H9dE02bZel
2017-08-06 15:41:05 -07:00
Karl Tomlinson
7f6c7692a4 bug 1365556 invalidate widget style contexts after their ancestors are set r=stransky+263117
Although this is only known to affect buttons with builtin child widgets, it
is difficult to audit all GTK widgets for similar situations, and so the same
defense is applied to all widgets.

MozReview-Commit-ID: LMVXX3UYqR9

--HG--
extra : rebase_source : d327addad8d2b0e070c6ca86c6e38271c8431a23
2017-08-01 09:17:46 +12:00
Jan Henning
641e43da0b Bug 1266683 - Part 3 - Update notifyIMEContext JNI bindings to include private mode info. r=jchen
MozReview-Commit-ID: Gl2iRWxo9lE

--HG--
extra : rebase_source : 4b0aad157af22dcb96aeb68b199bfa9404902dea
2017-07-31 22:45:54 +02:00
Jan Henning
34bb1f8a36 Bug 1266683 - Part 2 - Add private browsing mode info to InputContext. r=masayuki
Android now supports telling an IME that it shouldn't store user-entered content into it's dictionary/language model/etc. and we want to automatically enable this in private browsing.

As the code that handles input on Android doesn't have any notion of tabs (and therefore of the difference between normal and private tabs), the best way to get that info across is to retrieve it directly within the IMEStateManager from the corresponding document and store it in the inputContext, which is then passed to Java for Fennec to handle.
Implementing this within Gecko also has the benefit that this part of the code can be used by other platforms as well should they want to support similar features in the future.

MozReview-Commit-ID: DsxjC4Ma7DR

--HG--
extra : rebase_source : f0940cb40170ab32cf5a172d07a61d083427be8a
2017-07-30 19:45:03 +02:00
Sebastian Hengst
39ccebaf18 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 9IxbB2vCH4S
2017-08-05 11:55:25 +02:00
Sebastian Hengst
f442f9745e merge mozilla-central to autoland. r=merge a=merge 2017-08-04 19:31:08 +02:00
Sebastian Hengst
765cc1b925 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JhesEg4Bxjy
2017-08-04 19:28:27 +02:00
sotaro
a773ee4276 Bug 1354411 - Rebuild CompositorSessions if WebRender is disabled r=kats
When WebRender creation is failed, WebRender is disabled in gecko. There is a case that WebRenderBridgeParents exist when WebRender is disabled. To handle this, gecko needs to rebuild all CompositorSessions.

There is also a problem related to gfxVars::UseWebRender on compositor thread. If e10s is enabled, but no-gpu process(default on linux and mac), gfxVars::UseWebRender change is soon notified by compositor thread tasks. If WebRender creation failure happens at 2nd WebRender creation, several WebRenderBridgeParents for 1st WebRender could exist. IPC messages from WebRenderLayerManager are normally async, then there is a chance that the WebRenderBridgeParents receive the messages after the gfxVars::UseWebRender change. Further the gfxVars::UseWebRender change in content process could be delayed than WebRenderBridgeParents, then content process does not have a way to stop sending PWebRenderBridge IPC until the change of gfxVars::UseWebRender is received. WebRenderBridgeParent related tasks handle the message, but some tasks are done based on gfxVars::UseWebRender. At this time, gfxVars::UseWebRender returned false on compositor thread, then it cause unexpected result for WebRenderBridgeParent and WebRender. To addres this inconsistent situation, WebRenderBridgeParent related tasks on compositor thread stop to use gfxVars::UseWebRender.
2017-08-04 14:36:41 +09:00
Chris Pearce
c24490f1a2 Bug 1387219 - Remove code WakeLockListener support on XP and Vista. r=aklotz
billm reports that the runnable in this code is firing a lot, and since we
don't support XP/Vista we're not benefiting from this overhead.

MozReview-Commit-ID: Bpw1E9DxPpD

--HG--
extra : rebase_source : 580ef086e8d9ce12c42724c6671d9de87038beb4
2017-08-04 11:44:29 +12:00
Wes Kocher
2196b718d3 Merge inbound to central, a=merge
MozReview-Commit-ID: DlSLhaepjeU
2017-08-03 18:06:53 -07:00
Ehsan Akhgari
7fe0be04ed Bug 1386411 - Part 3: Inline some helper functions in Selection.cpp; r=bzbarsky 2017-08-03 17:05:19 -04:00
Jim Chen
e16afc583e Bug 1384828 - Use tid for UI thread detection; r=esawin
Use the UI thread's tid for checking if we're on the UI thread in Gecko.
This lets us get rid of `GeckoThread.registerUiThread`, in order to
avoid a race where we check for UI thread before `registerUiThread` is
called.

MozReview-Commit-ID: 11gAWgx4UZo
2017-08-03 13:06:16 -04:00
Jonathan Watt
de74546b63 Bug 1384589 - Document where the luminescence calculation for -moz-win-accentcolortext comes from. r=jimm
MozReview-Commit-ID: 51QIKmP8wOs
2017-07-27 09:37:10 +01:00
Sebastian Hengst
d9f6b67320 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-04 19:32:45 +02:00
Jim Chen
b70b6eb453 Bug 1382335 - 4. Check for shutdown in more LayerViewSupport functions; r=esawin
Check for shutdown so we don't crash on accessing a null window pointer.

MozReview-Commit-ID: FRky4dcuhrw
2017-08-04 13:21:06 -04:00
Masatoshi Kimura
866d87ee67 Bug 1361579 - Remove nsISimpleContentPolicy. r=Ehsan
MozReview-Commit-ID: BsjkGpTpe8I

--HG--
extra : rebase_source : 640807623fc70797932a0ee592b887d5c134b5f9
2017-08-03 17:50:00 +09:00
Masatoshi Kimura
e1f76e8883 Bug 1387802 - Remove [deprecated] methods from nsITaskbarPreviewController. r=jimm
MozReview-Commit-ID: 25cdKHqVLSh

--HG--
extra : rebase_source : f2dc739ad0f132cb1cc764cfa3ec11e83cbfa0c3
2017-08-06 13:35:02 +09:00
Wes Kocher
db7d003ae0 Merge m-c to autoland a=merge CLOSED TREE
MozReview-Commit-ID: Ko3lhAvzMJN
2017-08-03 18:22:09 -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
Michael Smith
11b0edbc50 Bug 1373739 - Make macOS compatible with the headless WPT changes. r=bdahl
MozReview-Commit-ID: BeDPpG6G6Iy

--HG--
extra : rebase_source : 1745c4a34cb35892bba2e65d5a9caac99d0171a7
2017-07-28 23:20:21 -07:00
Michael Smith
12625b29bf Bug 1373739 - Headless: use native look-and-feel on Win, hardcoded on Linux. r=bdahl
MozReview-Commit-ID: 3CB1n7ccy86

--HG--
extra : rebase_source : 4000cf950d09f4a4c3191706c11cec0031aec924
2017-07-05 19:41:21 -07:00
Michael Smith
478c17f71a Bug 1373739 - Hook HeadlessSound and HeadlessScreenHelper into Windows widgets. r=bdahl
MozReview-Commit-ID: 1KOlPyLmJaY

--HG--
extra : rebase_source : 6d87f2bc61b4edf7f55b4cf1eb1b2cff72d878b2
2017-07-11 14:01:00 -07:00
Michael Smith
6fcebfbe5b Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander
To make the HeadlessCompositorWidget work under Windows as well as Linux, I had
to change the way that I hooked it into the existing CompositorWidget system.
Under GTK, the CompositorWidgetInitData and CompositorWidgetDelegate types
provided the information needed by the headless compositor widget already (the
widget client size). On Windows, however, the definitions of these types
differ, and the client size information is simply retrieved from the platform
APIs when needed.

After this patch, CompositorWidgetDelegate is renamed to
PlatformCompositorWidgetDelegate, and a new base class called
CompositorWidgetDelegate is added with "AsPlatformSpecificDelegate()" and
"AsHeadlessCompositorWidget()" methods. In non-headless mode, widgets use
AsPlatformSpecificDelegate() to access the Windows- and GTK-specific delegate
APIs. In headless mode, AsHeadlessCompositorWidget() is used to access the
singular CompositorWidget implementation for headless. Meanwhile, the
CompositorWidgetInitData IPDL type is made into a union which always contains a
headless-specific HeadlessCompositorWidgetInitData struct and under GTK and
Windows also contains an {X11,Win}CompositorWidgetInitData struct.

This also includes a small patch to ensure that the GPU process and
hardware-accelerated compositing are always disabled under headless mode. These
features weren't activated by default in the Linux environments I tested in, but
did end up activating (and then promptly crashing Firefox) when I tested on
Windows.

MozReview-Commit-ID: CocPoHBDV7H

--HG--
extra : rebase_source : 4581fa63aa3a9f32a8dc2672015a35b9be01b20f
2017-07-06 17:45:34 -07:00
Michael Smith
765d8e318e Bug 1373739 - Make headless widgets hidden by default, matching other platforms. r=bdahl
It seems that my reworking of how the z-index events are sent in the patch
pertaining to active window tracking made it so that we can have headless
widgets default to being invisible again, which matches the behavior on all
other platforms. This then allows us to avoid applying size mode change side
effects while a window/widget is invisible, matching the behavior on Windows and
allowing the relevant web platform tests to pass despite the low screen
resolution with which we run Windows VMs in testing (eg.
open-features-non-integer-height.html).

MozReview-Commit-ID: 3xnaEn7RImP

--HG--
extra : rebase_source : 0c573f92b02a58aca28c71dd897ae7a443f50844
2017-07-11 13:57:25 -07:00
Michael Smith
632f364e09 Bug 1373739 - Use ClientLayerManager in headless mode. r=dvander,jrmuizel
This fixes a series of issues uncovered by the Web Platform Tests.

The most immediately noticeable symptom was that, during shutdown, PuppetWidgets
on the client side attempted to delete shadow layers that were never created on
the compositor side. The usage of BasicLayerManager in all other widgets due to
headless mode meant that the PLayerTransactionParent was never initialized with
a layer manager, and thus discarded all transaction messages it received but not
delete layer messages.

The effects of only using BasicLayerManager in headless mode also showed up in
the web platform reftests, which ended up as blank white boxes in e10s mode as
the compositor thread never received paint instructions. Switching over to
using ClientLayerManager in headless mode causes these paint instructions to be
relayed.

In order to make ClientLayerManager work under headless mode, it was necessary
to implement a HeadlessCompositorWidget and hook that up to the CompositorWidget
creation function in widget/gtk. A follow-up patch will be necessary to hook up
the same for the other supported widget platforms.

MozReview-Commit-ID: 8vB3lrxP7iX

--HG--
extra : rebase_source : 4013aa856943c983b44266c4a83436b253bc7ab1
2017-06-21 08:50:02 -07:00
Michael Smith
bb844faed7 Bug 1373739 - Simulate window activation events in headless mode. r=jrmuizel
This is necessary for focus events to propagate correctly. Otherwise,
/2dcontext/drawing-paths-to-the-canvas/drawFocusIfNeeded_004.html in the
Web Platform Tests fails, for example.

MozReview-Commit-ID: 69GItIaQWfr

--HG--
extra : rebase_source : 24eb487d35b273c8bd128c0e7450946b36467b7b
2017-06-21 08:51:39 -07:00
Michael Smith
f2f89289d9 Bug 1373739 - Constrain widget size to screen size in headless mode. r=jrmuizel
Every other widget backend ensures widget size is bounded to screen size, but
this check was missing from headless.

MozReview-Commit-ID: 6bKIAkdRxoO

--HG--
extra : rebase_source : 6494a347aba323b977b845a1b70555fb1ab53864
2017-06-22 15:31:32 -07:00
Masayuki Nakano
baead301db Bug 1386556 - TSFTextStore::GetIMENotificationRequests() should always return notification requests for sEnabledTextStore r=m_kato
Currently, TSFTextStore::GetIMENotificationRequests() tries to return notification requests for focused text store.  However, if there is sEnabledTextStore, all notifications will be sent for it.  Therefore, TSFTextStore::GetIMENotificationRequests() should return notifications for sEnabledTextStore without checking focused text store in the thread manager.

For example, we try to keep active composition even if we're being inactivated because Windows steals focus from us when our main process becomes busy but user may want to continue to compose the composition after our process becomes available.

Additionally, if TSFTextStore::GetIMENotificationRequests() doesn't return IMENotificationRequests::NOTIFY_DURING_DEACTIVE, sEnabledTextStore will be broken by NOTIFY_IME_OF_BLUR which will be sent by IMEStateManager::OnChangeFocusInternal().  However, when we're being activated, NOTIFY_IME_OF_FOCUS won't be notified because focused remote process keeps having IMEContentObserver.  Therefore, sEnabledTextStore won't be recreated and IME becomes unavailable.

Therefore, while sEnabledTextStore is not nullptr, TSFTextStore::GetIMENotificationRequests() needs all notifications even if it loses focus in the thread manager.

MozReview-Commit-ID: CC6gJIpHxUO

--HG--
extra : rebase_source : 02559fe8fea81b4247ef27043fc1d995981a9ba4
2017-08-02 18:30:16 +09:00
Sebastian Hengst
cbd7e56969 merge mozilla-central to autoland. r=merge a=merge 2017-08-01 11:25:13 +02:00
Nicholas Nethercote
73558eac3d Bug 1384834 (part 2) - Remove remaining uses of nsAdoptingCString. r=erahm.
--HG--
extra : rebase_source : 70a385a0a06bc88e728d51459e7460a68f15f7fb
2017-07-28 11:21:47 +10:00
Nicholas Nethercote
d18fdecf67 Bug 1384834 (part 1) - Remove remaining uses of nsAdoptingString. r=erahm.
--HG--
extra : rebase_source : c81ee11b9d08198a000979760a8e29a01e9498d0
2017-07-28 11:21:45 +10:00
Wes Kocher
3c2dc39278 Merge m-c to inbound, a=merge
MozReview-Commit-ID: BgPWEtPV0sy
2017-07-31 17:49:47 -07:00