Commit Graph

98 Commits

Author SHA1 Message Date
Jim Chen
dd04b2cada Bug 1235475 - Crash at the exception source when an exception is in native code; r=snorp
When we have a Java exception in native code, the Java stack in the
exception will not be very useful because the top frame is the native
entry point. In this case, the native stack is more useful. However,
currently we don't get a good native stack in this situation because we
go through Java when handling the exception, and the native stack we get
will have a lot of unknown frames inside libdvm or libart. This patch
makes us stay in native code when handling an uncaught exception from
native code, so that we get a good native stack.
2015-12-30 18:36:41 -05:00
Jim Chen
e7f1a2326e Bug 1229403 - Use existing states if possible when initializing GeckoView; r=snorp
This patch changes onAttachedToWindow in GeckoView, so that if we have
states that have been restored, we use those states for initialization
instead of creating new states (e.g. opening a new nsWindow). Because
the GLController instance is associated with the nsWindow instance, we
need to keep the GLController instance as part of our saved states. This
patch also adds a reattach method to GeckoView.Window, because
GeckoEditable needs to be notified when its target View changes.
2015-12-23 22:03:35 -05:00
Jim Chen
3dc603713a Bug 1232456 - Create EGL surface through widget; r=snorp
This patch makes GLContextProviderEGL create EGL surfaces through
nsWindow/nsIWidget on Android. nsWindow then calls GLController in Java
to actually create the surface.
2015-12-23 22:03:34 -05:00
Jim Chen
325ee148ee Bug 1227706 - Let GeckoView manage GLController instances; r=snorp
GLController instances are associated with a particular nsWindow, rather
than a particular View. Therefore, we need to let GeckoView manage
GLController instances, as part of GeckoView's handling of saving and
restoring states.
2015-12-23 22:03:34 -05:00
Jim Chen
43d7399cf2 Bug 1227706 - Add native methods to GLController; r=snorp
One nsWindow will have one corresponding GLController, and using native
GLController methods instead of GeckoEvents lets us control the
compositor for each nsWindow separately.
2015-12-23 22:03:34 -05:00
Jim Chen
ffdf60106d Bug 1227706 - Rename nsWindow::Natives to nsWindow::GeckoViewSupport; r=snorp
GeckoViewSupport better reflects the purpose of the class and will match
the GLControllerSupport class that another patch is adding. This patch
also changes the way GeckoViewSupport is constructed in order to be more
encapsulating.
2015-12-23 22:03:34 -05:00
Jim Chen
94b3e4800e Bug 1227727 - Remove geckoConnected method in LayerView; r=snorp
Right now LayerView depends on geckoConnected being called by GeckoApp
or GeckoView during its initialization. However, we can get rid of it
and let LayerView handle the task itself. As part of this change, screen
depth overriding is moved to native code in nsAppShell.
2015-12-23 22:03:33 -05:00
Jim Chen
df400b3573 Bug 1227719 - Autogenerate LayerRenderer.Frame; r=snorp
This patch adds auto-generated bindings for LayerRenderer.Frame, and
uses the new bindings in nsWindow, in place of the old manual bindings
in AndroidJavaWrappers.
2015-12-23 22:03:33 -05:00
Chenxia Liu
da2898fc75 Bug 1212611 - Use system notification for website notifications in Android. r=mfinkle
--HG--
extra : commitid : oACcpGDIty
extra : rebase_source : 93dc1a5a70af14f96a7ddd6bc829db838f0646ce
2015-12-03 10:56:04 -05:00
Sebastian Kaspari
33f113a021 Bug 1189336 - (Part 1) Rename RestrictedProfiles to Restrictions. r=ally
RestrictedProfiles: The name of the class can be confusing because it handles
guest profiles and restricted profiles. We might even query it from a normal
profile.

--HG--
rename : mobile/android/base/RestrictedProfiles.java => mobile/android/base/Restrictions.java
extra : commitid : BtjvH8aWSlk
extra : rebase_source : 262c9537d7e93658ceea6f94c8481a393ddd3072
2015-11-11 12:29:07 +01:00
Jim Chen
244a51f96c Bug 1216666 - Update composition as part of replacing text or changing span; r=esawin
Currently, GeckoEditable periodically fires update composition events to
update the Gecko composition styling. To make the code more efficient
and more robust in dealing with content JS code, this patch merges these
events into events like replacing text, setting span, and removing span.
As a result, a setComposingText call now results in one replacing text
event instead of a replacing text event plus an update composition event.
2015-11-03 11:53:58 -05:00
Jim Chen
0516bbb465 Bug 1211704 - Let GeckoEditable call disposeNative; r=esawin
Right now we call disposeNative on GeckoEditable in the
nsWindow::Natives destructor. However, we may still have pending native
calls in the event queue at that point, and these events will cause
exceptions when handled. This patch makes GeckoEditable call
disposeNative, after ensuring there's no pending calls.
2015-10-22 17:45:47 -04:00
Jim Chen
aecd53254d Bug 1211704 - Add GeckoEditable native methods; r=esawin
These native methods will replace the IME events used by GeckoEditable.
2015-10-22 17:45:46 -04:00
Jim Chen
1b57167834 Bug 1215139 - Separate out nsWindow closing from disposeNative; r=snorp
This patch adds a separate close() call to nsWindow, and let the
GeckoView decide whether to make that call or not. This lets us use the
static version of disposeNative. If nsWindow is destroyed in the
meantime, we still want to call disposeNative, which would only be
possible using the static version of disposeNative.
2015-10-22 17:45:46 -04:00
Jim Chen
1b1fe2fdef Bug 1210585 - Add native calls for key events; r=esawin
This patch adds a native call to GeckoEditable that will handle key
events instead of using GeckoEvent.KEY_EVENT.
2015-10-22 17:45:46 -04:00
Reuben Morais
1e26ba3392 Bug 748391 - Implement markMessageRead on the Android backend. r=snorp 2015-10-13 01:08:51 -03:00
Jim Chen
2c8727a14d Bug 1209574 - Switch GeckoInputConnection for each new GeckoView; r=esawin
The GeckoEditable instance doesn't change for each nsWindow instance.
However, because a GeckoInputConnection is associated with a GeckoView,
when we create a new GeckoView, we need to attach a new
GeckoInputConnection to the existing nsWindow's GeckoEditable. This
patch makes us do that inside nsWindow::Natives::Open by calling
GeckoEditable.OnViewChange.
2015-10-08 15:25:49 -04:00
Jim Chen
7088159257 Bug 1209574 - Move GeckoEditable management to nsWindow; r=esawin
This patch removes the GeckoEditable code in GeckoAppShell, and make
nsWindow create a GeckoEditable for itself when opening a window.
Instead of calling GeckoAppShell, nsWindow can now call GeckoEditable
methods directly.
2015-10-08 15:25:49 -04:00
Jim Chen
8d2a72b981 Bug 1209574 - Generate constants for non-accessible static final fields; r=snorp
We try to generate a C++ constant for static final fields, but that
was failing for inaccessible fields. Now we set the field to be
accessible so that we do end up generating a C++ constant.
2015-10-08 15:25:49 -04:00
Jim Chen
e924946ea2 Bug 1200426 - Convert PROCESS_OBJECT GeckoEvent to native call; r=snorp
The PROCESS_OBJECT GeckoEvent is used to set the layer client object in
Gecko once Gecko is done loading. This patch converts it to a native
call in GeckoView.Window.
2015-10-08 15:25:49 -04:00
Reuben Morais
8c408a1045 Bug 1197010 - Implement Android backend for createMessageCursor/createThreadCursor. r=snorp 2015-10-06 19:40:38 -03:00
Wes Kocher
b89687d936 Backed out changeset 3f9ca060b8d0 (bug 1197010) for android build failures 2015-10-06 16:18:13 -07:00
Reuben Morais
94f2455f3b Bug 1197010 - Implement Android backend for createMessageCursor/createThreadCursor. r=snorp 2015-10-06 19:40:38 -03:00
Reuben Morais
576abdd9db Bug 1172740 - Implement Android HAL backend for alarms. r=snorp 2015-10-01 14:40:53 -03:00
Jim Chen
5c45d400b9 Bug 1200343 - Add native calls for pref events; r=snorp
This patch adds two native calls to PrefsHelper to avoid using
GeckoEvent for getting prefs.
2015-09-28 12:07:09 -04:00
James Willcox
45564cbbb2 Bug 1182665 - Use a direct JNI call to determine screen size in nsScreenManagerAndroid r=jchen 2015-09-28 09:36:56 -05:00
Wes Kocher
e143a6410c Backed out 4 changesets (bug 1200343) for android talos failures
Backed out changeset 67dc42cbf02b (bug 1200343)
Backed out changeset b077acafcebb (bug 1200343)
Backed out changeset e115ca114601 (bug 1200343)
Backed out changeset 905e1fb54fd4 (bug 1200343)
2015-09-25 13:21:58 -07:00
Jim Chen
2c4f8e6d64 Bug 1200343 - Add native calls for pref events; r=snorp
This patch adds two native calls to PrefsHelper to avoid using
GeckoEvent for getting prefs.
2015-09-25 15:03:34 -04:00
Jim Chen
1f5985cce7 Bug 1197957 - Introduce GeckoView.Window class; r=snorp
GeckoView.Window is a class that acts as the interface between
GeckoView in Java and nsWindow in C++. It will contain native methods
that GeckoView will use to interact with nsWindow.

On initialization, Window.open is called to create a nsWindow and
establish the JNI association between Window and the native nsWindow.
Then, whenever Window instance methods are called, the JNI stubs will
automatically call members of nsWindow.
2015-09-21 10:13:32 -04:00
Dylan Roeh
ee309b2869 Bug 1189881 - Move GeckoJavaSampler::getProfilerTime out of AndroidJNI.cpp. r=jchen 2015-09-17 16:17:26 -05:00
Carsten "Tomcat" Book
ba9aec3116 Backed out 1 changesets (bug 1189881) for bustage on a CLOSED TREE
Backed out changeset e0b666c198dd (bug 1189881)

--HG--
extra : rebase_source : 56db9306aa89588c795d03f08c7b5ea29a5fb3fd
2015-09-17 14:07:04 +02:00
Dylan Roeh
0ad2686c67 Bug 1189881 - Move GeckoJavaSampler::getProfilerTime out of AndroidJNI.cpp. r=jchen 2015-09-15 11:54:56 -05:00
Kartikaya Gupta
711b35cb56 Bug 1201581 - Hook up the syncFrameMetrics call to sync metrics info from the compositor to Java-land on each composite. r=rbarker
--HG--
extra : commitid : JByEVaIboTo
2015-09-11 21:58:16 -04:00
Wes Kocher
ca0fa7c1cb Backed out 4 changesets (bug 1182665) for android reftest orange CLOSED TREE
Backed out changeset 719a4fbded10 (bug 1182665)
Backed out changeset 9559cead8d08 (bug 1182665)
Backed out changeset 4080fb4b9a7f (bug 1182665)
Backed out changeset c8549221c366 (bug 1182665)
2015-09-11 11:21:56 -07:00
James Willcox
226e891da2 Bug 1182665 - Use a direct JNI call to determine screen size in nsScreenManagerAndroid r=jchen 2015-09-11 09:09:18 -05:00
Jim Chen
192182c441 Bug 1195496 - Implement speculative connection method in GeckoThread; r=snorp
One thing we do in the Fennec CLH is to make a speculative connection
based on the URI that's passed in. However, by the time the CLH runs,
we're far along into startup, and the advantage of a speculative
connection is reduced. This patch implements making speculative
connection as a method in GeckoThread, so that Fennec can make a
speculative connection without relying on the Fennec CLH.
2015-08-19 18:14:47 -04:00
Jim Chen
93533110bc Bug 1195496 - Add PROFILE_READY Gecko state; r=snorp
Many Gecko operations depend on the profile being available. This
patch adds a PROFILE_READY Gecko state so that we can queue calls
until profile is loaded.
2015-08-19 18:14:47 -04:00
William Chen
6d6411c090 Bug 1131470 - Part 2: Update screen configuration HAL to report orientation angle. r=snorp,mwu
--HG--
extra : rebase_source : c6eb4dd4f54b1e9db7e7d2c39e535ba4bcd8af1f
2015-08-18 14:55:15 -07:00
Kartikaya Gupta
1db1586922 Bug 1180295 - Implement seamless snapping to the stable state. r=rbarker
--HG--
extra : commitid : BCRW1BHPhL8
2015-08-18 14:27:20 -04:00
Kartikaya Gupta
29e63f503a Bug 1180295 - Store the viewport width and height as integers instead of floats in ImmutableViewportMetrics. r=rbarker
--HG--
extra : commitid : 8UdQhaVHspN
2015-08-18 14:27:19 -04:00
Kartikaya Gupta
b4105053c9 Bug 1180295 - Rip out the Fennec code to set the screen render offset. r=rbarker
--HG--
extra : commitid : 3e4iu6iVnfs
2015-08-18 14:27:18 -04:00
Jim Chen
ee3de3a3c3 Bug 1192082 - Iniialize/deinitialize JNI in nsAppShell; r=snorp
First we need to set the Gecko thread JNIEnv* in nsAndroidStartup, but
after that we can initialize and deinitialize the rest of JNI, including
AndroidBridge, in GeckoAppShell. This makes nsAppShell control the
AndroidBridge lifetime. Over time, parts of the AndroidBridge
functionality will be migrated to nsAppShell.
2015-08-13 00:53:40 -04:00
Jim Chen
b2e48dacd7 Bug 1192082 - Expose AndroidBridge arguments through GeckoThread; r=snorp
AndroidBridge needed some arguments during its initialization. We'll
provide those arguments in GeckoThread, which AndroidBridge will access.
2015-08-13 00:53:39 -04:00
Jim Chen
b85528ed4a Bug 1192082 - Expose GeckoThread states to C++; r=me 2015-08-13 00:53:39 -04:00
Jim Chen
a11aee77b7 Bug 1192079 - Update generated code; r=me 2015-08-13 00:53:39 -04:00
Jim Chen
29ee442159 Bug 1189995 - Move GeckoAppShell.pumpMessageLoop to GeckoThread; r=esawin
This method is used by Gecko to pump the Android message loop, and it's
also more suited to GeckoThread than GeckoAppShell.
2015-08-13 00:53:39 -04:00
Mark Capella
0d84a92357 Bug 1191161 - p3 - Surprise update-generated-wrappers changes, r=jchen 2015-08-07 02:09:08 -04:00
Jim Chen
8739443257 Bug 1186467 - Update generated JNI bindings; r=me 2015-08-04 17:47:28 -04:00
Sebastian Kaspari
d7f1de6d04 Bug 1187260 - Simplify RestrictedProfiles class. r=ally
This patch transforms RestrictedProfiles to delegate isAllowed() and
canLoadUrl() calls to an object implementing the RestrictionConfiguration
interface.

DefaultConfiguration, GuestProfileConfiguration and
RestrictedProfileConfiguration are implementing RestrictionConfiguration
and will take care of handling the restrictions for the different types
of profiles.

--HG--
extra : commitid : LQ2YsdyG6oR
extra : rebase_source : 015f7f02c6e7fded16d3811a71f0ae23547e5f71
2015-07-24 19:47:31 +02:00
Jim Chen
64eb7d8aff Bug 1186517 - Adjust white spacing in generated files; r=me 2015-07-29 15:11:15 -04:00