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

243 Коммитов

Автор SHA1 Сообщение Дата
Eugen Sawin 30669c12dd Bug 1343613 - [1.7.1] Add missing file. r=me 2017-03-09 00:54:33 +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
Randall Barker 1b04875fd3 Bug 1344517 - Keep dynamic toolbar visible while page is loading r=kats 2017-03-06 14:01:46 -08: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
Jan Henning 73b4249e96 Bug 1344464 - Part 1 - Restart input after removing autocomplete text for keyboards that require it. r=jchen
When we detect text being deleted from the URL bar via setComposingText while we're displaying an autocomplete suggestion, we clear the autocomplete text and prevent the keyboard's delete from having any effect on the URL bar by returning false.

Some keyboards might not handle this correctly and assume that they've in fact successfully set the new text, so the next time the user presses a key can lead to weird behaviour. As a workaround, we therefore additionally restart the input for affected keyboards.

MozReview-Commit-ID: DucveafL3AB

--HG--
extra : rebase_source : 3ba1701adf7e4e8a03d263a75c04717aadaab663
2017-03-04 21:09:15 +01:00
Jan Henning 19159002e9 Bug 1344464 - Part 0 - Remove unneeded code. r=jchen
MozReview-Commit-ID: 2mPPx4fMTM2

--HG--
extra : rebase_source : 3a9fd58de214649dba8fd66b22ae4c5fbf0442cd
2017-03-04 21:59:35 +01: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
Dylan Roeh a21a7f8f67 Bug 1305815 - Issue EOL warning if non-NEON-compatible device detected. r=glandium 2017-03-01 13:26:12 -06: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
Eugen Sawin 585bf70c8b Bug 1342508 - [2.1] Make code style consistent across GeckoView. r=jchen 2017-02-27 20:39:45 +01:00
Eugen Sawin 4df1593760 Bug 1342508 - [1.0] Add GeckoView.reload. r=snorp 2017-02-27 20:39:45 +01:00
Michael Kaply a8e8f3d0e3 Bug 1031210 - Don't assume URL format to prevent crash. r=snorp
MozReview-Commit-ID: 23qE4mI5tBU

--HG--
extra : rebase_source : 504a432df377cc520509c830855d9829f1e02063
2017-02-23 11:24:59 -06:00
Eugen Sawin 9bf1487388 Bug 1322576 - [5.3] Make GeckoView settings accessible through nsIAndroidView. r=jchen 2017-02-22 14:57:42 +01:00
Eugen Sawin a1b696f5ae Bug 1322576 - [2.4] Add GeckoView settings management. r=snorp,jchen 2017-02-22 14:57:38 +01:00
Jim Chen fee3eb484b Bug 1339160 - 5. Follow-up to fix errors; r=me
Fix the geckoview_example bustage from previous patches. Also fix the
extra errors in the build log due to non-ASCII characters in
GeckoProfile.
2017-02-15 20:22:12 -05:00
Jim Chen 60a646160e Bug 1339160 - 4. Use GeckoService to extract libs on update; r=esawin
Use the GeckoService load-libs action to load and extract new libraries
when we receive the update broadcast. This makes us not block the UI
thread to extract libs, and lets Fennec run normally if the user
launches Fennec right after updating.
2017-02-15 17:13:05 -05:00
Jim Chen 94bd2e7d8e Bug 1339160 - 1. Allow GeckoThread to launch without being initialized; r=snorp
When GeckoThread is launched without being initialized, it will load all
Gecko libs and then wait until it is initialized, before calling the
Gecko entry point. This allows us to preload Gecko libs without actually
running Gecko.
2017-02-15 17:12:56 -05:00
Jim Chen e9e3761a4a Bug 1337290 - 2. Clear cache dir if loading libs failed; r=snorp
If Gecko libs failed to load the first time, clear the cache dir and try
again. Only crash if we fail to load the libs a second time.
2017-02-15 17:12:56 -05:00
Jim Chen 9a1866c95c Bug 1337290 - 1. Detect ARM emulation for some x86 devices; r=snorp
Some x86 devices set the CPU ABI to ARM (and even change /proc/cpuinfo)
as part of emulating ARM. In that case, we check the kernel release
string find out whether it's really x86 or not.
2017-02-15 17:12:56 -05:00
Phil Ringnalda 215ca1024e Merge m-i to m-c, a=merge 2017-02-11 17:42:19 -08:00
Jan Henning 8a305537b1 Bug 1336734 - Part 1 - Have GeckoPreferences properly support GeckoActivityStatus. r=sebastian
Currently, GeckoPreferences always returns "false" for isGeckoActivityOpened(), which means that when we're e.g. opening a new settings screen, GeckoApplication's onActivityPause() code assumes that Firefox is being backgrounded for real, calling GeckoThread.onPause(). This is then immediately followed by a call to onActivityResume() which unpauses Gecko again.

To avoid this, GeckoPreferences needs to properly implement support for GeckoActivityStatus and check the target of outgoing intents along the lines of the implementation in GeckoActivity.

Since checkIfGeckoActivity() is now used outside GeckoActivity as well, we refactor it into our IntentUtils.

MozReview-Commit-ID: UfPNAic5os

--HG--
extra : rebase_source : d8e900140f55f9a363b86064eb1ad8f8ee4c5c48
2017-02-05 15:35:00 +01:00
Wes Kocher 836bb052d3 Backed out 3 changesets (bug 1336734) for android build bustage a=backout
Backed out changeset a7f9815aeec1 (bug 1336734)
Backed out changeset fa9cca3e321c (bug 1336734)
Backed out changeset a2b69382c9ad (bug 1336734)

MozReview-Commit-ID: FMKZ88jlEZ0
2017-02-10 12:52:33 -08:00
Jan Henning e2bd26424d Bug 1336734 - Part 1 - Have GeckoPreferences properly support GeckoActivityStatus. r=sebastian
Currently, GeckoPreferences always returns "false" for isGeckoActivityOpened(), which means that when we're e.g. opening a new settings screen, GeckoApplication's onActivityPause() code assumes that Firefox is being backgrounded for real, calling GeckoThread.onPause(). This is then immediately followed by a call to onActivityResume() which unpauses Gecko again.

To avoid this, GeckoPreferences needs to properly implement support for GeckoActivityStatus and check the target of outgoing intents along the lines of the implementation in GeckoActivity.

Since checkIfGeckoActivity() is now used outside GeckoActivity as well, we refactor it into our IntentUtils.

MozReview-Commit-ID: UfPNAic5os

--HG--
extra : rebase_source : 6167836e9a20763724c62aade1d2f0a5e976a890
2017-02-05 15:35:00 +01:00
Wes Kocher d3307f19d5 Merge inbound to central, a=merge
MozReview-Commit-ID: 9TTIrjfNKZm

--HG--
rename : dom/base/test/test_bug1263696.html => testing/web-platform/tests/html/semantics/embedded-content/the-embed-element/embed-in-object-fallback-2.html
rename : dom/base/test/test_bug1263696.html => testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-in-object-fallback-2.html
2017-02-09 17:01:39 -08:00
Wes Kocher e27ab18a24 Merge autoland to central, a=merge
MozReview-Commit-ID: Cu9iXbDAS7t
2017-02-09 16:36:11 -08:00
Grigory Kruglov f753528969 Bug 1330836 - Only send 'network config/status changed' events to Gecko if something actually changed r=jchen
MozReview-Commit-ID: CrlRDu8MbhY

--HG--
extra : rebase_source : 99a830d7deeaa2f8de2692578590d1da8a4241ff
2017-02-09 10:48:16 -08:00
Jim Chen 42a4c3f718 Bug 1332731 - Follow-up to fix accessibility breakage; r=sebastian
Follow-up to fix breakage in accessibility caused by the bundle
conversion. In particular, optString(foo) should have been converted to
getString(foo, "") because optString returns "" by default.

Also fix a small bug in Presentation.jsm where an array or null should
be used instead of a string.
2017-02-08 19:50:32 -05:00
Jim Chen 65ff086671 Bug 1329438 - Wait until Gecko is ready to open URI; r=snorp
Right now we wait until PROFILE_READY state, but we may not have a
browser DOM window until RUNNING state, so wait until then.
2017-02-08 19:50:32 -05:00
Eugen Sawin ad818bc99a Bug 1322592 - [1.3] Add GeckoView navigation. r=snorp,jchen 2017-02-09 15:44:00 +01:00
Jim Chen 21dfb2d432 Bug 1337304. r=snorp
--HG--
extra : rebase_source : 7306160ece787ed98fb98ec1bcecbb0466d98093
2017-02-08 13:49:20 -05:00
Dylan Roeh cdd384261f Bug 1332463 - Implement ProgressListener. r=jchen 2017-02-10 16:49:42 -06:00
Carsten "Tomcat" Book 55606baab8 merge mozilla-inbound to mozilla-central a=merge 2017-02-08 11:30:00 +01:00
Andrzej Hunt af866b1d42 Bug 1335968 - Check SDK version at startup r=sebastian
This shouldn't ever be true - but we have crash reports from
devices running API 10 (Android 2.3), despite having a minimum
requirement of API 15 (Android 4). The cause is unknown, but could
be caused by Google Play bugs (e.g. if it were to ignore an increase
in the minimum SDK), or some other override.

MozReview-Commit-ID: 12uHsDxGPp

--HG--
extra : rebase_source : c6de3f0ed88bf506ca55297323e2670cd5641965
extra : source : 0da24048d1a8206a3a30d6b32c2d11a13cc119f6
2017-02-01 17:29:05 -08:00
Wes Kocher 10fb637abf Merge m-c to inbound a=release CLOSED TREE
MozReview-Commit-ID: AwyW5DU4EMh
2017-02-03 17:21:29 -08:00
Sebastian Kaspari b5ceb2958f Bug 1318667 - Do not use palette library on x86 devices (Use BitmapUtils.getDominantColor()). r=ahunt
Our version of the palette support library crashes for certain icons on x86 systems.

MozReview-Commit-ID: E6eEyFXd4uK

--HG--
extra : rebase_source : fe2e3d55ff7744d480c8a6318aba09bb2c519a13
2017-02-03 18:42:36 +01:00
Dylan Roeh 81892271a5 Bug 1322590 - Add and hook up ContentListener for GeckoView. r=jchen 2017-01-25 15:13:58 -06:00
Jim Chen 62e0b641a7 Bug 1333590 - 7. Add more callback tests to testEventDispatcher; r=snorp
Add more callback tests to testEventDispatcher,

1) Test for checking that the callback for a Gecko thread event,
dispatched from Gecko, is synchronous. We depend on this behavior in
several places where we require a "function call" style event.

2) Test for checking that callbacks accept a variety of data types as
the response object, including the standard types supported by
GeckoBundle, as well as primitive types that are convertible to standard
types.
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
jwu 5b02eb2870 Bug 1237956 - Use temporary folder instead of modifying the filename while uploading, r=sebastian
MozReview-Commit-ID: 3MQWkPOIRGB

--HG--
extra : rebase_source : 3f7994ee1124e98139c8d4079129b2262c0524b3
2017-01-25 15:56:23 +08:00
Eugen Sawin 714ebcecb4 Bug 1323429 - [2.1] Remove the context reference from Clipboard. r=jchen 2017-01-26 15:52:21 +01:00
James Willcox 8c58183633 Bug 1322029 - Put process name into Android crash reports r=jchen 2017-02-07 21:14:44 -06:00