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

1890 Коммитов

Автор SHA1 Сообщение Дата
Eugen Sawin 307653da17 Bug 1343613 - [3.1] Enable window event dispatcher only on top level window. r=jchen 2017-03-09 00:29:30 +01:00
Eugen Sawin e574bdd70e Bug 1343613 - [2.3] Add GeckoView event queuing in EventDispatcher. r=jchen,snorp 2017-03-09 00:29:30 +01:00
Eugen Sawin 8e045250f7 Bug 1343613 - [1.7] Refactor native call queuing out of GeckoThread. r=jchen 2017-03-09 00:29:30 +01:00
Andrea Marchesini 12b54aa0f5 Bug 1299500 - Get rid of DeviceStorage API - part 10 - DeviceStorage, r=ehsan, r=billm 2017-03-08 20:15:45 +01:00
Jim Chen 53a1107cd1 Bug 1343075 - Use GeckoEditableSupport from PuppetWidget; r=masayuki r=rbarker r=snorp r=esawin
Bug 1343075 - 1a. Add TextEventDispatcherListener::GetIMEUpdatePreference; r=masayuki

Add a GetIMEUpdatePreference method to TextEventDispatcherListener to
optionally control which IME notifications are received by NotifyIME.
This patch also makes nsBaseWidget forward its GetIMEUpdatePreference
call to the widget's native TextEventDispatcherListener.

Bug 1343075 - 1b. Implement GetIMEUpdatePreference for all TextEventDispatcherListener; r=masayuki

This patch implements GetIMEUpdatePreference for all
TextEventDispatcherListener implementations, by moving previous
implementations of nsIWidget::GetIMEUpdatePreference.

Bug 1343075 - 2. Allow setting a PuppetWidget's native TextEventDispatcherListener; r=masayuki

In PuppetWidget, add getter and setter for the widget's native
TextEventDispatcherListener. This allows overriding of PuppetWidget's
default IME handling. For example, on Android, the PuppetWidget's native
TextEventDispatcherListener will communicate directly with Java IME code
in the main process.

Bug 1343075 - 3. Add AIDL interface for main process; r=rbarker

Add AIDL definition and implementation for an interface for the main
process that child processes can access.

Bug 1343075 - 4. Set Gecko thread JNIEnv for child process; r=snorp

Add a JNIEnv* parameter to XRE_SetAndroidChildFds, which is used to set
the Gecko thread JNIEnv for child processes. XRE_SetAndroidChildFds is
the only Android-specific entry point for child processes, so I think
it's the most logical place to initialize JNI.

Bug 1343075 - 5. Support multiple remote GeckoEditableChild; r=esawin

Support remote GeckoEditableChild instances that are created in the
content processes and connect to the parent process GeckoEditableParent
through binders.

Support having multiple GeckoEditableChild instances in GeckoEditable by
keeping track of which child is currently focused, and only allow
calls to/from the focused child by using access tokens.

Bug 1343075 - 6. Add method to get GeckoEditableParent instance; r=esawin

Add IProcessManager.getEditableParent, which a content process can call
to get the GeckoEditableParent instance that corresponds to a given
content process tab, from the main process.

Bug 1343075 - 7. Support GeckoEditableSupport in content processes; r=esawin

Support creating and running GeckoEditableSupport attached to a
PuppetWidget in content processes.

Because we don't know PuppetWidget's lifetime as well as nsWindow's,
when attached to PuppetWidget, we need to attach/detach our native
object on focus/blur, respectively.

Bug 1343075 - 8. Connect GeckoEditableSupport on PuppetWidget creation; r=esawin

Listen to the "tab-child-created" notification and attach our content
process GeckoEditableSupport to the new PuppetWidget.

Bug 1343075 - 9. Update auto-generated bindings; r=me
2017-03-07 22:34:39 -05:00
Phil Ringnalda 394951281e Backed out 2 changesets (bug 1343613) for Android crashes in nsWindow::GeckoViewSupport::EnableEventDispatcher]
Backed out changeset f9632a8f4b14 (bug 1343613)
Backed out changeset 4aa287ae1cec (bug 1343613)
2017-03-07 18:56:35 -08:00
Eugen Sawin 5728cb6576 Bug 1343613 - [2.3] Add GeckoView event queuing in EventDispatcher. r=jchen,snorp 2017-03-08 00:19:42 +01:00
Eugen Sawin 5db48b0409 Bug 1343613 - [1.7] Refactor native call queuing out of GeckoThread. r=jchen 2017-03-08 00:19:42 +01:00
Jim Chen 1294cccf48 Bug 1337467 - Convert observers to bundle events; r=rbarker r=sebastian
Bug 1337467 - 1. Convert "Window:Resize" observer to event; r=rbarker

Bug 1337467 - 2. Convert "ScrollTo:FocusedInput" observer to event; r=rbarker

Bug 1337467 - 3. Convert "Update:CheckResult" observer to event; r=sebastian

Also remove notifyCheckUpdateResult from GeckoInterface.

Bug 1337467 - 4. Convert "GeckoView:ImportScript" observer to event; r=sebastian

Bug 1337467 - 5. Convert accessibility observers to events; r=sebastian

Bug 1337467 - 6. Convert media/casting observers to events; r=sebastian

Bug 1337467 - 7. Convert "Sanitize:ClearData" observer to event; r=sebastian

Bug 1337467 - 8. Convert "Notification:Event" observer to event; r=sebastian

Bug 1337467 - 9. Convert BrowserApp observers to events; r=sebastian

Bug 1337467 - 10. Convert Tab observers to events; r=sebastian

Bug 1337467 - 11. Convert "Passwords:Init" and "FormHistory:Init" observers to events; r=sebastian

Bug 1337467 - 12. Convert Reader observers to events; r=sebastian

Bug 1337467 - 13. Convert Distribution observers to events; r=sebastian

Bug 1337467 - 14. Convert "Fonts:Reload" observer to event; r=sebastian

Bug 1337467 - 15. Convert RecentTabsAdapter observers to events; r=sebastian

Bug 1337467 - 16. Convert "Session:Prefetch" observer to event; r=sebastian

Bug 1337467 - 17. Convert "Browser:Quit" and "FullScreen:Exit" observers to events; r=sebastian

Bug 1337467 - 18. Convert SessionStore observers to events; r=sebastian

The "Session:NotifyLocationChange" observer is sent by browser.js and
requires passing a browser reference, so it's left as an observer.

Bug 1337467 - 19. Remove unused "Tab:Screenshot:Cancel" notifyObserver call; r=me

Bug 1337467 - 20. Convert "Session:Navigate" observer to event; r=sebastian

Bug 1337467 - 21. Convert "Locale:*" observers to events; r=sebastian

Bug 1337467 - Add log for unhandled events; r=me

Add back the log indicating no listener for an event, which can be
useful when reading logcat. r=me for trivial change.

Bug 1337467 - Don't return error from EventDispatcher when OnEvent fails; r=me

When a listener's OnEvent method returns an error, continue to dispatch
to other listeners and don't return an error from the dispatch function.
This avoids unexpected errors when dispatching events. r=me for trivial
patch.
2017-03-07 12:34:04 -05:00
Carsten "Tomcat" Book 087da3f0d9 merge mozilla-inbound to mozilla-central a=merge 2017-03-07 15:13:31 +01:00
Jim Chen 3f746133a9 Bug 1337910 - Notify observers from Gecko event queue; r=snorp
Call NotifyObservers from the Gecko event queue instead of the Android
event queue, to better support Promises in notified JS code.
2017-03-06 15:32:37 -05:00
Jim Chen 3a24d6364c Bug 1343027 - 2. Add jni::Ref::Lock function; r=snorp
Add a Lock function to jni::Ref to lock the referenced object akin to
the synchronized keyword in Java. It returns an AutoLock RAII object
that automatically unlocks the object when going out of scope.
2017-03-06 15:32:36 -05:00
Jim Chen 0d3d8e6fd1 Bug 1343027 - 1. Add jni::Ref::Cast function; r=snorp
Add a Cast function to jni::Ref to cast a reference to a different type
(e.g. if ref is a jni::Object::Ref referring to a String instance, use |
ref.Cast<jni::String>()->Length() | to get the length of the string).

In MOZ_CHECK_JNI builds, Cast() checks that an instance of the source
class can indeed be cast to the target class.
2017-03-06 15:32:36 -05:00
David Major ed0b8f8653 Bug 1344615: Remove nsXPCOMStrings.{h,cpp} r=bsmedberg
These are now dead code.

MozReview-Commit-ID: AClU0Qx3kmN

--HG--
extra : rebase_source : df83cf89292da1519bb26027c11e14923d5c54a0
2017-03-06 17:52:54 +13:00
Jim Chen c7d526d4ee Bug 1339685 - Split GeckoEditable into parent and child classes; r=nalexander r=esawin r=snorp
Bug 1339685 - 1. Support compiling GeckoView aidl from multiple packages; r=nalexander

Specify a list of AIDL files for GeckoView so we can include AIDLs from
multiple packages, and not just those from the org.mozilla.gecko.process
package.

Bug 1339685 - 2. Add AIDLs for GeckoEditable; r=esawin

Add IGeckoEditableParent.aidl and IGeckoEditableChild.aidl for two-way
communication between the parent, which lives in the main process, and
the child, which lives in the main process or a child content process.

Bug 1339685 - 3. Refactor some GeckoEditable code; r=esawin

Auto-generate native constants for the constants in GeckoEditableClient,
instead of keeping a separate set of constants in native code.

Bug 1339685 - 4. Add GeckoEditableChild; r=esawin

Add the GeckoEditableChild class, which is currently only used in the
main process as the interface between the native nsWindow and
GeckoEditable. Eventually, it will be expanded to child content
processes as the interface between the native PuppetWidget and
main process GeckoEditable.

Bug 1339685 - 5. Use GeckoEditableChild from GeckoEditable; r=esawin

Make calls to GeckoEditableChild from GeckoEditable, and remove code
that exists in GeckoEditableChild from GeckoEditable.

Bug 1339685 - 6. Add GetNativeObject member to proxied native calls; r=snorp

Add a convenience function for getting the C++ object that is the target
of the native call.

Bug 1339685 - 7. Use GeckoEditableChild from native code; r=esawin

Make nsWindow and GeckoEditableSupport use GeckoEditableChild for
communication. nsWindow still keeps a reference to GeckoEditable for
switching views.

Bug 1339685 - 8. Updated generated bindings; r=me
2017-03-02 13:47:14 -05:00
Jim Chen e559b260ee Bug 1137567 - Make nsWindow for Android use TextEventDispatcher; r=esawin r=rbarker r=masayuki r=snorp
Bug 1137567 - 1. Allow dispatching key events during composition; r=esawin

We potentially dispatch key events during composition to provide
compatibility for pages that only listen to key events.

Bug 1137567 - 2. Allow keyboard events in DispatchInputEvent when not on APZ thread; r=rbarker

We use nsIWidget::DispatchInputEvent to dispatch our keyboard events on
the Gecko thread, which on Android is not the APZ controller thread. We
should allow these events to pass instead of crashing.

Bug 1137567 - 3. Add GeckoEditableSupport class to support TextEventDispatcher; r=masayuki

Add a separate GeckoEditableSupport class, which implements
TextEventDispatcherListener and uses TextEventDispatcher for IME
operations. The new class is entirely separate from nsWindow to allow it
to be independently used in content processes as well.

Most of the code is copied from nsWindow::GeckoViewSupport, and adapted
to use TextEventDispatcher.

Bug 1137567 - 4. Make nsWindow::WindowPtr available for outside classes; r=snorp

Make nsWindow::WindowPtr available not just for classes inside nsWindow
but for outside classes as well. Also, add support for RefPtr native
objects to nsWindow::NativePtr.

Bug 1137567 - 5. Use GeckoEditableSupport in nsWindow; r=esawin

Use the new GeckoEditableSupport class in nsWindow to replace the
previous code in nsWindow::GeckoViewSupport. GeckoEditable native
methods now go to GeckoEditableSupport instead of GeckoViewSupport.

Several native methods in GeckoEditable are changed from
dispatchTo="proxy" to dispatchTo="gecko", because we no longer need the
special nsWindow::WindowEvent wrapper for our native calls.

Bug 1137567 - 6. Use pushPrefEnv in test_assign_event_data.html; r=masayuki

setAndObserveCompositionPref in test_assign_event_data.html does not
invoke the callback if the pref is already set. This patch changes it to
use SpecialPowers.pushPrefEnv so the callback is always invoked.
2017-03-01 15:29:30 -05:00
Jan Henning 644356e330 Bug 1337325 - Remove unused zoom and scroll code from browser.js r=kats
More JPZ leftovers, I presume. In any case what's left doesn't do anything really useful and a DXR search didn't reveal any remaining users, so this can be thrown out.

MozReview-Commit-ID: 9dN6Jifpbvw

--HG--
extra : rebase_source : 04614d729a55e00c5331ecc321ca2ef5b5e73747
2017-02-12 13:33:42 +01:00
Steve Fink 5b823a90ec Bug 1337427 - Add MOZ_MUST_USE to GCVector bool returns, r=woof!
MozReview-Commit-ID: FuGjTr08mpL

--HG--
extra : rebase_source : f4adc4ad2b7558f25b344f8f4a7667ca05eed9c9
2017-02-07 16:13:04 -08:00
Nicholas Nethercote af10e0c45c Bug 1340928 (part 16) - Clean up profiler env var handling. r=mstange.
This patch does the following.

- Uses "entries" consistently for the name of the value that is obtained from
  MOZ_PROFILER_ENTRIES and is the first argument to profiler_start(). (I.e. not
  "entry" or "entrySize".)

- Removes variables (e.g. PROFILER_HELP) holding env var names and uses the
  names (e.g. "MOZ_PROFILER_HELP") directly. Some of the names are already used
  directly and I think the slight repetition isn't harmful. It's unlikely that
  we'd want to change these names the way we might need to change a numeric
  value, and they're perfectly descriptive.

- Changes the "MOZ_PROFILING_FEATURES" string in the weird Android-only startup
  code to be "MOZ_PROFILER_FEATURES", for consistency.

- Renames gUnwindInterval and gProfileEntries as gEnvVarInterval and
  gEnvVarEntries to make it clearer that they come from environment variables,
  but otherwise are parallel to gInterval and gEntries.

- Puts entries before intervals in most places, to match the profiler_start()
  argument order.

- Changes profiler_usage() so that (a) it always prints, no matter the
  verbosity, (b) it exits at its end, and (c) doesn't double-print "Profiler: "
  at the start of each line.

--HG--
extra : rebase_source : e5a0b1c48e390ada894c746f050f08ff5c241066
2017-02-23 14:26:46 +11:00
Eugen Sawin 9bf1487388 Bug 1322576 - [5.3] Make GeckoView settings accessible through nsIAndroidView. r=jchen 2017-02-22 14:57:42 +01:00
Iris Hsiao cac0976ded Backed out changeset 28c5827d707c (bug 1337325) for tc-M(31) perma failure 2017-02-22 16:15:49 +08:00
Jan Henning 9c78f37fc6 Bug 1337325 - Remove unused zoom and scroll code from browser.js r=kats
More JPZ leftovers, I presume. In any case what's left doesn't do anything really useful and a DXR search didn't reveal any remaining users, so this can be thrown out.

MozReview-Commit-ID: 9dN6Jifpbvw

--HG--
extra : rebase_source : 04614d729a55e00c5331ecc321ca2ef5b5e73747
2017-02-12 13:33:42 +01:00
Makoto Kato 50721a68ae Bug 1256565 - Part 2. Use GetEventTimeStamp() for timestamp. r=jchen
MozReview-Commit-ID: 4fBI6EXLmR1

--HG--
extra : rebase_source : d36dccb3179b386619b7ec855bf214a3ff3e6689
2016-12-27 10:59:15 +09:00
Makoto Kato a5d634db34 Bug 1256565 - Part 1. Implement GetEventTimeStamp(). r=jchen,karlt
Android uses android.os.SystemClock.uptimeMilles for event time and SystemClock.uptimeMilles uses SYSTEM_TIME_MONOTONIC.

So since TimeStamp posix impelemetation uses SYSTEM_TIME_MONOTONIC too, so we can use event time on FromSystemTime.

MozReview-Commit-ID: 5Qb5kmnHHCI

--HG--
extra : rebase_source : 26d1554fa60e3216edfd4b149380910fe2a9d845
2017-02-20 12:34:44 +09:00
Wes Kocher 8c4ce17711 Merge inbound to m-c a=merge
MozReview-Commit-ID: DCUf7VEDrTt
2017-02-17 13:38:51 -08:00
Vedant Sareen 7d4bd52fae Bug 1330907 - Rename Telemetry::ID to Telemetry::HistogramID. r=dexter
Changed |print("enum ID : uint32_t {", file=output)| to |print("enum HistogramID : uint32_t {", file=output)| at line 53 of the file |toolkit/components/telemetry/gen-histogram-enum.py|, and then replaced all the textual occurrences of |Telemetry::ID| to |Telemetry::HistogramID| and |ID| to |HistogramID| in 43 other files.
2017-02-16 00:45:15 +05:30
Randall Barker 95dafbe631 Bug 1336929 - Have UiCompositorControllerChild cache surface resize when not yet initialized. r=jchen,dvander 2017-02-14 09:11:14 -08:00
Tom Tromey f8ab4ddf02 Bug 1060419 - remove unneeded includes of prprf.h, r=froydnj
MozReview-Commit-ID: JifhpA3oOeH

--HG--
extra : rebase_source : 08460997dc3fd91f3065c718e17b41bb4acf8bae
2016-12-09 10:00:01 -10:00
Jean-Yves Avenard b1c337cb35 Bug 1340096: Remove MediaCodecDataDecoder. r=bwu,jolin
We prefer the RemoteDataDecoder instead.

MozReview-Commit-ID: SK0D3hycRh

--HG--
extra : rebase_source : 97899154bf5fcbcd2feb44ac82879a79eabb44f7
2017-02-16 12:26:53 +01:00
Tim Huang 42a2c99db5 Bug 1312954 - Part 11: Update speculativeConnect to speculativeConnect2 for Fennec. r=sebastian 2017-02-02 22:18:00 -05:00
Jim Chen 89c63a086b Bug 1334728 - 2. Require string value for dispatch event type; r=snorp
Instead of having xpconnect convert any JS value to a string for us,
accept a jsval as the event type argument, and make sure that it is a
string.
2017-02-01 17:35:45 -05:00
Jim Chen c9a4e01072 Bug 1333590 - 6. Remove GeckoEventListener and NativeEventListener; r=snorp r=sebastian
Remove GeckoEventListener and NativeEventListener now that we uniformly
use BundleEventListener. Also remove related classes NativeJSContainer,
NativeJSObject, and GeckoRequest, as well as related tests and C++
code.

The "Messaging" object in Messaging.jsm is replaced with a dummy object
that redirect calls to the global and/or window event dispatcher.
2017-02-01 17:35:45 -05:00
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