Commit Graph

1858 Commits

Author SHA1 Message Date
Jim Chen
735fe99d21 Bug 1333590 - 5. Support other primitive types in event callback; r=snorp
Add support for byte, short, float, long, and char types as the response
object for event callbacks.
2017-02-01 17:35:45 -05:00
Randall Barker
7039d10a5d Bug 1329362 - part 2, Add accessor functions for EGLNativeWindowType, ANativeWindow, and EGLSurface to AndroidCompositorWidget r=dvander,kats 2017-01-27 09:32:24 -08:00
Jim Chen
9a9702cab0 Bug 1330409 - Convert CastingApps events to bundle events; r=sebastian
Convert the events used in MediaCastingBar and ChromeCastPlayer to
GeckoBundle/BundleEventListener events. UI thread events are used
because the listener performs operations on the UI thread.
2017-01-25 18:53:57 -05:00
Eugen Sawin
0cb63b48cd Bug 1323429 - [1.1] Don't verify IME root content with e10s enabled. r=jchen 2017-01-25 20:03:43 +01:00
Masatoshi Kimura
7ab3096e8e Bug 1331820 - Fix misuse of NS_NewNativeLocalFile in widget/android/. r=blassey
MozReview-Commit-ID: BJi20AfAQc0

--HG--
extra : rebase_source : b065565cded79c43ef72e046294d663923a43278
2017-01-21 15:43:41 +09:00
Randall Barker
489f7c72e6 Bug 1328752 - part 2, Update Android nsWindow to use UiCompositorControllerChild in place of CompositorBridgeParent r=jchen 2017-01-20 11:01:29 -08:00
Randall Barker
937209439a Bug 1331116 - part 1, Remove unused ProgressiveUpdateData.java r=jchen 2017-01-17 18:47:20 -08:00
Randall Barker
774c1fed10 Bug 1331055 - Ensure the Android UI nsThread has been initialized before making it accessible. r=jchen 2017-01-17 18:47:20 -08:00
Jim Chen
f48add8fb6 Bug 1330515 - Try to recover from IME errors; r=esawin
Instead of throwing IME exceptions, try to recover from IME errors by
flushing the entire text unless we already tried that before. This
prevents annoying crashes, and deals with known IME bugs that are too
risky to uplift to older releases.
2017-01-13 14:39:27 -05:00
Randall Barker
b6467def4a Bug 1328747 - Make Android UI nsThread and MessageLoop creation asynchronous r=froydnj 2017-01-11 09:42:29 -08:00
Jim Chen
2706d38064 Bug 1328115 - 3. Check for exceptions when finding Java class; r=snorp
Be more careful when we try to find Java classes, so that any exceptions
are not ignored and passed on to the caller, which is likely to result
in a hard-to-diagnose Dalvik/ART crash.
2017-01-09 14:10:24 -05:00
Jim Chen
e097f47943 Bug 1328115 - 2. Update auto-generated bindings; r=me 2017-01-09 14:10:23 -05:00
Nicholas Nethercote
4ebfdea1f5 Bug 1325234 (part 10) - Final nsIWidget deCOMtamination clean-ups. r=mstange.
This patch converts some NS_IMETHOD and NS_IMETHODIMP occurrences that I missed
in previous bugs.

The patch also removes the Android
nsWindow::{Get,Set}HasTransparentBackground() functions because they're unused.

--HG--
extra : rebase_source : 7b121e5f9ac633ea9482bacc8b7424cb8d8889ef
2016-12-21 15:58:09 +11:00
Nicholas Nethercote
523bee37b8 Bug 1325234 (part 9) - Remove remaining NS_IMETHOD_ occurrences from nsIWidget. r=mstange.
|virtual T| is clearer than |NS_IMETHOD_(T)|.

--HG--
extra : rebase_source : 9c8f423d7a89782a4d790a50e137071271086eed
2016-12-21 15:27:20 +11:00
Nicholas Nethercote
bf4a843d70 Bug 1325234 (part 8) - Streamline nsIWidget::DispatchEvent. r=jimm.
This patch changes it from |NS_IMETHOD| to |virtual nsresult| because some
callsites are checked and some aren't.

--HG--
extra : rebase_source : dd98266bce0a7583863908b6f04729a6e403b721
2016-12-21 11:18:40 +11:00
Nicholas Nethercote
e52b19470c Bug 1325234 (part 6) - Streamline nsIWidget::SetTitle. r=jimm.
This patch changes it from |NS_IMETHOD| to |virtual nsresult| because some call
sites are checked and others aren't.

--HG--
extra : rebase_source : 6723b9db709d1506dd394b1e85572309c1c2e2cf
2016-12-21 11:13:08 +11:00
Nicholas Nethercote
ea1e2ca6ce Bug 1325234 (part 5) - Streamline nsIWidget::SetCursor (both versions). r=jimm.
This patch changes one from |NS_IMETHOD| to |virtual nsresult| and the other to
|virtual void|.

--HG--
extra : rebase_source : 55af71c01dc75d6bf7c63191e9cfabc9f5368ffa
2016-12-21 11:13:08 +11:00
Nicholas Nethercote
0eaecf55da Bug 1325234 (part 4) - Streamline nsIWidget::{SetFocus,SetNonClientMargins}(). r=mstange.
This patch changes them from |NS_IMETHOD| to |virtual nsresult|.

--HG--
extra : rebase_source : 5e54c2fd340c393b33c9e1dcf20a80fe2f41b2f4
2016-12-21 11:13:08 +11:00
Nicholas Nethercote
da5978a842 Bug 1325234 (part 3) - Streamline nsIWidget::Show(). r=mstange.
This patch changes it from |NS_IMETHOD| to |virtual void|. The return value was
only checked in one low-value assertion and one other place where the check had
no useful effect (in nsCocoaWindow::HideWindowChrome()).

--HG--
extra : rebase_source : f6671e9e0e10ee18fb32f8b1c83f1e64c3d97e67
2016-12-21 11:12:54 +11:00
Nicholas Nethercote
e2d9e4ed68 Bug 1325234 (part 2) - Streamline nsIWidget::Invalidate(). r=jimm.
This patch changes it from |NS_IMETHOD| to |virtual void|. The return value was
only checked in one low-value assertion so I decided it wasn't needed.

--HG--
extra : rebase_source : 3523d9a086cf98c40d237d777f5dd471af0d7465
2016-12-20 09:55:32 +11:00
Randall Barker
1101ff0a36 Bug 1321644 - part 1, Remove android specific message loop code from APZThreadUtils.cpp r=botond 2016-12-23 09:08:37 -08:00
Randall Barker
e5f409853d Bug 1319850 - part 4, Code to initialize and support AndroidUI MessageLoop and nsIThread r=nfroyd 2016-12-23 09:08:35 -08:00
Randall Barker
b5df4e8ab9 Bug 1319850 - part 3, Convert AndroidBridge::PostTaskToUiThread to use nsIRunnable instead of mozilla::Runnable r=jchen 2016-12-23 09:08:31 -08:00
Wes Kocher
0992df4676 Backed out 4 changesets (bug 1319850) for android xpcshell bustage a=backout
Backed out changeset 15b92bb6d810 (bug 1319850)
Backed out changeset e31107c3f677 (bug 1319850)
Backed out changeset 2a8012945a74 (bug 1319850)
Backed out changeset 8717bea884c9 (bug 1319850)
2016-12-22 18:16:34 -08:00
Wes Kocher
079a079cbe Backed out 2 changesets (bug 1321644) for android xpcshell bustage a=backout
Backed out changeset 60ba1893ecf3 (bug 1321644)
Backed out changeset c25bce77b775 (bug 1321644)
2016-12-22 18:16:23 -08:00
Randall Barker
0adfb0ba8f Bug 1321644 - part 1, Remove android specific message loop code from APZThreadUtils.cpp r=botond 2016-12-22 16:15:14 -08:00
Randall Barker
72026a2dc3 Bug 1319850 - part 4, Code to initialize and support AndroidUI MessageLoop and nsIThread r=nfroyd 2016-12-22 16:15:14 -08:00
Randall Barker
3778c365d9 Bug 1319850 - part 3, Convert AndroidBridge::PostTaskToUiThread to use nsIRunnable instead of mozilla::Runnable r=jchen 2016-12-22 16:15:14 -08:00
John Lin
d6335c2417 Bug 1075025 - part 1: receive vsync events through Choreographer. r=snorp
MozReview-Commit-ID: 69MefRKMWmh
2016-12-22 12:55:19 +08:00
Jim Chen
aea12c5f05 Bug 1322574 - 3. Count NPZC events as UI events; r=rbarker
Post NPZC events as an Event subclass that identifies as an UI event.
This also lets us avoid some redundant code in the event lambda.
2016-12-21 13:37:20 -05:00
Jim Chen
e0a649aa54 Bug 1322574 - 2. Measure Android event loop latency; r=snorp
Measure the latency of each event in the Android event loop by tagging
each event with the time that the event was posted, and then recording
the time interval between posting and processing the event. Latencies
for UI events and non-UI events are recorded separately in Telemetry.
2016-12-21 13:37:20 -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
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
efc5071ff2 Bug 1299335 (part 2) - Streamline nsIWidget::SetIcon. r=mstange.
This patch does the following.

- Removes the return value, because none of the call sites check it.

- Removes the empty implementations from several nsIWidget instances, because
  they can use the nsBaseWidget one.

--HG--
extra : rebase_source : a1a04193bc3940f1468c7c235f6d6e0341d0f1c2
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
Jim Chen
23679b7509 Bug 1322711 - 1. Convert property name to string if necessary; r=snorp
When converting a JS object to a GeckoBundle, convert the property name
to a string if necessary, because the property name could be another
type such as an integer.
2016-12-13 03:21:47 -05:00
John Lin
0c318ba97d Bug 1299068 - part 5: release/render buffers when VideoData sent to compositor. r=snorp
MozReview-Commit-ID: JmEKLKlJnaL

--HG--
extra : rebase_source : 5177ed35206aad3423b9960ea5e9e59459540cde
2016-11-30 17:55:52 +08:00
Wes Kocher
eff20804f2 Merge m-c to inbound, a=merge 2016-12-02 13:13:05 -08:00
Randall Barker
fc730ca66e Bug 1321642 - Add missing include guards to nsDeviceContextAndroid.h r=jchen 2016-12-02 10:29:55 -08:00
Wes Kocher
b9a8598f48 Merge m-c to inbound, a=merge 2016-12-01 15:46:23 -08:00
James Cheng
2fca45e7dc Bug 1320618 - Check if codec supports adaptive playback to determine the decoder support recycling or not. r=jolin
MozReview-Commit-ID: C3pI9NCUgiP

--HG--
extra : rebase_source : c9da5d21ee76e660ea5a18f77b1ea6bccd14286d
2016-11-30 16:30:16 +08:00
Dylan Roeh
9ff1fe4af5 Bug 1235431 - Implement windowClient.focus() for Fennec. r=catalinb 2016-11-14 17:22:13 -06:00
Nick Alexander
e2a421b938 Bug 1320587 - Force first paint when (re-)attaching Gecko to Java. r=jchen
MozReview-Commit-ID: 6vUbIXTPNLQ

--HG--
extra : rebase_source : 24d6e8f5502568443f35c59963a66d8fe8ac4056
2016-11-29 23:12:53 -08:00
Carsten "Tomcat" Book
d6cf7b77d6 Merge mozilla-central to autoland 2016-12-02 09:27:52 +01:00
Masayuki Nakano
ab577a1cb6 Bug 1274503 part.2 Add KeyboardEvent.key value mapping on Android which are not mapped by Gecko but mapped on Chromium r=smaug
First, we should get rid of "Unidentified" keys which are mapped to specific value on Chromium and we can agree without any discussion.

MozReview-Commit-ID: C4TZzndahNM

--HG--
extra : rebase_source : 5e9d7527c4109049a44391fca45f2ffbd0f81960
2016-12-01 21:38:54 +09:00
Jim Chen
cc57abd3cd Bug 1319496 - 1. Fix GeckoBundle array handling; r=snorp
Fix several bugs when handling arrays in GeckoBundle.

1. Correctly return null when getting an array that is not in the
   bundle, instead of crashing.

2. Convert object arrays to GeckoBundle arrays in EventDispatcher
   instead of leaving it as a single GeckoBundle with integer keys, due
   to lack of object array support in NativeJSObject.toBundle.

3. Return error when trying to convert a JS array of arrays to
   GeckoBundle, instead of crashing.

4. Add convenience methods for setting arrays; for example, setting
   boolean arrays from Boolean[] and Collection<Boolean>.
2016-11-29 12:25:52 -05:00
James Cheng
3f263dd616 Bug 1317239 - Part1 - Add an API to ask if the codec support adaptive playback. r=jolin
MozReview-Commit-ID: 7Pgj9hFE6pu

--HG--
extra : rebase_source : bc2b6b0c5052655c9e2ea0f8f44dd31169a40a75
2016-11-23 14:11:22 +08:00
Jim Chen
352cf02d22 Bug 1317604 - 4. Include nsIObserver in nsAndroidBridge interfaces; r=me on CLOSED TREE
Follow-up to include nsIObserver in the list of interfaces implemented
by QueryInterface for nsAndroidBridge. This fixes a bug where QI to
nsIObserver fails when removing nsAnroidBridge observers.

--HG--
extra : amend_source : 3913b85c801940276d3ee742e479b723d5ec393d
2016-11-21 17:24:36 -05:00