Fix a bug where GeckoView becomes unresponsive to dispatched events
after restoring states, due to the native queue not being restored.
r=me for small, tested patch.
MozReview-Commit-ID: K1cVjjNaZK1
--HG--
extra : rebase_source : b1329c84d82f5bdc06767bf310ca87e52ff6ec9b
The old GeckoView was renamed to GeckoSession, so the old
GeckoViewHandler and GeckoViewSettings should be renamed to
GeckoSession.. as well. GeckoView JS files are left alone and may be
converted in a future bug. r=me for trivial patch.
MozReview-Commit-ID: BJTwugWboKf
--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewHandler.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSessionHandler.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoViewSettings.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSessionSettings.java
extra : rebase_source : d6e55620b8588174bff801f3f7b436f67e9b3f32
Change places where we use GeckoView to use GeckoSession instead.
MozReview-Commit-ID: InT4i1MaoBe
--HG--
extra : rebase_source : 67f57d5b00818292b8d273665e60f81a11097eea
With the old GeckoView renamed to GeckoSession, add a new minimal
implementation of GeckoView that manages View lifetime but delegates
most tasks to GeckoSession.
MozReview-Commit-ID: 9FFdLpTfPQY
--HG--
extra : rebase_source : 596866e9121265bf0529648926a71d1dfe3b2976
* Move the chromeUri and screenId settings to GeckoViewSettings.
* Add a private data-dir setting that the debugger-socket-dir setting
falls backs to. Set the data-dir setting inside `GeckoSession.openWindow`.
* Add optional init-only and values properties for settings.
* Use integer constants for display-mode setting.
MozReview-Commit-ID: HgJg0t0oade
--HG--
extra : rebase_source : 537689d93202e4201e879bae9e073ceb4489190b
Rename GeckoView to GeckoSession. Strip out parts of it that depended on
being a subclass of View. Also strip out parts of it that dealt with
switching EventDispatcher and NativeQueue, because now there's only one
copy of each for each GeckoSession.
MozReview-Commit-ID: J699twtpmTS
--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSession.java
extra : rebase_source : 60e045f6f1e6a70dcabc03f5a32cae5576c2edd8
Right now, `GeckoView.Window.open()` consists of opening a new Gecko
nsWindow and attaching it to the opening GeckoView. This patch separates
the attaching step into an `Window.attach()` function that was renamed
from `Window.reattach()`. Going forward, `Window.open()` and
`Window.close()` will correspond to opening and closing a session, which
`Window.attach()` will correspond to attaching a display to a session.
MozReview-Commit-ID: 94Un74pwizY
--HG--
extra : rebase_source : a7d9c6c3227de4b05e800d77a184f1deae9af5f8
There's already a secret dependency where
mobile/android/base/Makefile.in (and generated AppConstants.java)
depends on $topobjdir/buildid.h, so this shouldn't be much worse than
what we have.
MozReview-Commit-ID: 2hkAGE9uT10
--HG--
extra : rebase_source : 090b7a5f2063a4e0cc20252703e6575e6716448a
In the future, GeckoAppShell will only be part of the service process
library, and will not be part of the app process library. Therefore, we
should minimize GeckoAppShell usage in any GeckoView code that will
likely end up in the app process library.
In particular, AndroidGamepadManager and Clipboard are made to accept
Context as arguments, instead of using
GeckoAppShell.getApplicationContext() for getting the Context.
MozReview-Commit-ID: G9SC815H5Ku
Remove support for a default prompt delegate in GeckoView. Instead, all
prompts without a known window will go to the active GeckoView if
available.
MozReview-Commit-ID: C62V6jtgDCl
Move GeckoAccessibility out of gecko-view and into gecko-browser.
GeckoAccessibility as-is is currently only good for Fennec and is not
suitable for generic GeckoView use.
MozReview-Commit-ID: Fek8fLJNC6F
--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAccessibility.java => mobile/android/base/java/org/mozilla/gecko/GeckoAccessibility.java
rename : mobile/android/geckoview/src/thirdparty/java/com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java => mobile/android/thirdparty/com/googlecode/eyesfree/braille/selfbraille/ISelfBrailleService.java
rename : mobile/android/geckoview/src/thirdparty/java/com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java => mobile/android/thirdparty/com/googlecode/eyesfree/braille/selfbraille/SelfBrailleClient.java
rename : mobile/android/geckoview/src/thirdparty/java/com/googlecode/eyesfree/braille/selfbraille/WriteData.java => mobile/android/thirdparty/com/googlecode/eyesfree/braille/selfbraille/WriteData.java
Remove the native GeckoView loadUri call because it's Fennec-only.
Replace the call with a Fennec-only "Tab:OpenUri" event.
MozReview-Commit-ID: 7xZW9aceoPL
Implement Parcelable interface for GeckoBundle so it can be marshalled
across processes over Bundle, AIDL, etc. Also, add a stub for a
`GeckoBundle.put` method that suggests alternatives to use.
MozReview-Commit-ID: IArNL7LYUPZ
When a Gecko text change covers more than just our expected change on
the Java side, don't ignore the subsequent selection change notification
because the Gecko selection could have moved anywhere.
MozReview-Commit-ID: 8kvz7Ws9DMM
Add a new TextureClientData type, AndroidNativeWindowTextureData,
backed by a SurfaceTexture in single-buffer mode. It uses the
NativeWindow API, which provides producer-side access to the buffer.
This provides a DrawTarget which can be used to paint directly in to
the SurfaceTexture, which can then be composited using a SurfaceTextureHost.
Due to API restrictions it is not possible to read from a NativeWindow
while the corresponding SurfaceTexture has ownership of the
buffer. TiledContentClient now handles that by painting the additional
region that it cannot copy from the front buffer, if required.
MozReview-Commit-ID: 1NZq6MQqwFq
--HG--
extra : rebase_source : 9d1db721d4892f3df033d43127489a85421e8863
We want to use the Palette library for getting a fallback accent colour for lightweight themes, however because of bug 1318667, we might have to continue using our own implementation of getDominantColor on x86 devices.
Therefore we move this into BitmapUtils, so we can have a central location from which to switch between our own and the Palette library implementation.
MozReview-Commit-ID: 52WsfZbW12x
--HG--
extra : rebase_source : b0eb60c25355d1a13418844b5684e4356225e8c3
We want to use the Palette library for getting a fallback accent colour for lightweight themes, however because of bug 1318667, we might have to continue using our own implementation of getDominantColor on x86 devices.
Therefore we move this into BitmapUtils, so we can have a central location from which to switch between our own and the Palette library implementation.
MozReview-Commit-ID: 52WsfZbW12x
--HG--
extra : rebase_source : b7e66c027ef6c4a6aa01fcda6d17b6afb2e854a9
We need to clear the reference again if BrowserApp is possibly going to be destroyed.
At the moment there aren't any other activities using setScreenOrientationDelegate, but in preparation for that happening we unset BrowserApp as delegate already in onPause (instead of onDestroy) so we don't mistakenly assume that BrowserApp will remain the active ScreenOrientationDelegate all the time, even when it has been paused by some other activity.
MozReview-Commit-ID: 9q0MSzi78Vm
--HG--
extra : rebase_source : e5e1550d0d76fc21e36865489a3f3809f64468bf
We need to wait for GeckoThread to load the Gecko libs in the main
process before we can launch any child processes, so that the child
process doesn't try to extract libs, which can conflict with any
extraction going on in the main process.
MozReview-Commit-ID: 2gUd2R1TUBI
--HG--
extra : rebase_source : d48b9e2e744669a89f2b761cf6936f28948c17c3
Avoid going through GeckoAppShell and move the start child process JNI
call directly to GeckoProcessManager.
MozReview-Commit-ID: KU62TiHVQJX
--HG--
extra : rebase_source : 0e8546da502257e1c59bc00b79f50c79a314f3e6
Refactor the code in GeckoProcessManager and GeckoServiceChildProcess so
that, we can have a ChildConnection object that's bound but not started.
This way we can bind the connection to preload Gecko child process, but
hold off starting until told by Gecko main process.
Some code is simplified. For example, `IChildProcess.stop` is removed in
favor of killing the child process directly.
MozReview-Commit-ID: 4XgmTuT0IAs
--HG--
extra : rebase_source : 94fe748556c66f639d1f8e5bb26c28ea3ed950b3
Although, Firefox for Android doesn't use urlbarBindings.xml for declaring its
awesome bar, for consistency with widget code for desktop OSes,
GeckoInputConnection should treat "mozAwesomebar" inputmode value as "url"
since Android doesn't have any special input type for "search" and we should
keep current behavior.
MozReview-Commit-ID: DpUnUx4E2Sp
Add a way to append app notes to the crash report from Java, so we can
associate additional crash data with the crash.
MozReview-Commit-ID: 6I6pGOWb1sZ
Bug 817386 added code to ignore IndexOutOfBoundsException when using
GeckoEditable because the code wasn't mature enough back then, and there
were many race conditions. I think the situation is a lot better now, so
we can try removing that code and see if we still need it. We can always
add it back if we do.
MozReview-Commit-ID: 4pirfaUuSNu
--HG--
extra : rebase_source : ed68d545bb5e40491720aeafe86221163c064449
Translate non-ASCII characters into hex instead of trying to print them
out.
MozReview-Commit-ID: 1aABRy6J1nm
--HG--
extra : rebase_source : f620d35e3cff12ab60e48568f33af65ad4f493c8
We want to always perform actions on the shadow text side even if a
particular GeckoEditable instance is disconnected from Gecko, because
there could be other users of Editable that still expect the object to
perform valid actions.
MozReview-Commit-ID: 48OIEaPZqUE
--HG--
extra : rebase_source : 1ab86138c81061aeb7ea600497af5290581a9fbc
Remove `GeckoAppShell.setLayerView()/getLayerView()` now that it's no
longer used anywhere.
MozReview-Commit-ID: 6URNFhSs01P
--HG--
extra : rebase_source : bd76d75fe26f9c3d8782475767e5a48fcd2cb9eb
Pass in a `GeckoView` instance when sending a11y events so we're not
dependent on `GeckoAppShell.getLayerView()`. However, there's likely
more work to be done to make a11y work for any GeckoView.
MozReview-Commit-ID: DBeDOX5c3qY
--HG--
extra : rebase_source : 49d9a06ec90543c49d03f298a7d78ea54bbe0a58
Let `GeckoLayerClient` directly deal with scroll-to-input on resize,
instead of going through `GeckoAppShell` and relying on
`getLayerView()`. This is a necessary fix to let us remove
`getLayerView()`, and in a follow-up bug we should actually fix
scroll-to-input to work on any GeckoView.
MozReview-Commit-ID: 1xsHh2vg08M
--HG--
extra : rebase_source : 3061623d3ed0309fff42c6dc66d0246e1d3000a3
In GeckoInputConnection, use the current view available through
`getView()`, instead of using `GeckoAppShell.getLayerView()`.
MozReview-Commit-ID: Hc9AUz5SNEs
--HG--
extra : rebase_source : c42a81bb9b46f79e0a1b827d16ac7494579017e6
Instead of using `getLayerView()` to perform haptic feedback, this patch
adds a `HapticFeedbackDelegate`, which `GeckoApplication` implements to
call `performHapticFeedback()` on the active view. Also, use
HapticFeedbackDelegate elsewhere in the Fennec codebase where we want to
perform haptic feedback.
MozReview-Commit-ID: GAArA6yJFNF
--HG--
extra : rebase_source : 683520b1b314ff0376a6fc843415a8485650e80b
Remove `GeckoAppShell.setLayerView()/getLayerView()` now that it's no
longer used anywhere.
MozReview-Commit-ID: 6URNFhSs01P
--HG--
extra : rebase_source : 202177e049d969efba04290b228dd67a15ebe3f4
Pass in a `GeckoView` instance when sending a11y events so we're not
dependent on `GeckoAppShell.getLayerView()`. However, there's likely
more work to be done to make a11y work for any GeckoView.
MozReview-Commit-ID: DBeDOX5c3qY
--HG--
extra : rebase_source : 0c6c76d326b755671d2d29109823ceaf1aa627ba
Let `GeckoLayerClient` directly deal with scroll-to-input on resize,
instead of going through `GeckoAppShell` and relying on
`getLayerView()`. This is a necessary fix to let us remove
`getLayerView()`, and in a follow-up bug we should actually fix
scroll-to-input to work on any GeckoView.
MozReview-Commit-ID: 1xsHh2vg08M
--HG--
extra : rebase_source : c09c906cbdaf2b3bea96ecfcec1f25bdef4fa31d
In GeckoInputConnection, use the current view available through
`getView()`, instead of using `GeckoAppShell.getLayerView()`.
MozReview-Commit-ID: Hc9AUz5SNEs
--HG--
extra : rebase_source : 3e55c4ac8749b75e6f5bc50a2b706f7f4ad264e8
Instead of using `getLayerView()` to perform haptic feedback, this patch
adds a `HapticFeedbackDelegate`, which `GeckoApplication` implements to
call `performHapticFeedback()` on the active view. Also, use
HapticFeedbackDelegate elsewhere in the Fennec codebase where we want to
perform haptic feedback.
MozReview-Commit-ID: GAArA6yJFNF
--HG--
extra : rebase_source : c9ac6e28584ca2b6c6fb707444cca8dc08abe649
If the domain is long enough that it doesn't fully fit within the URL bar, we scroll it such that the end of the domain aligns with the right side of the URL bar, taking any possible fadingEdge effect into account. That way, we always try to show as much of the most important part of the origin as possible.
Chrome uses a similar approach, although their URL bar neither fades nor allows scrolling.
MozReview-Commit-ID: Ep4H4kO4MRH
--HG--
extra : rebase_source : 2ef619e8e756627e8ff55ef394f483ce12505ddd
The permissions check itself is synchronous, but if we then decide to prompt the user to acquire the permission, we have to do so asynchronously and eventually continue execution on the UI thread as a result. Therefore we need to provide a counterpart of onUIThread() for operations that want their callback to stay off the UI thread in all situations.
MozReview-Commit-ID: AOCX1v69R1J
--HG--
extra : rebase_source : ed0bab9f3ae3198bf2af90eabc86fd5ddd95b3a0
Add a BuildFlag annotation, which when specified for classes, will wrap
generated code in `#ifdef` or `#ifndef` blocks. This functionality is
used for conditionally excluding generated code when NIghtly becomes
Beta, without the need to regenerate bindings.
MozReview-Commit-ID: L2NFM8CHKqF
--HG--
extra : rebase_source : 6ebc82d11fd1aa4aeb57a46262e678480d23de83
Allow sensor to change which direction the screen is facing when using 'portrait' or 'landscape' to lock screen orientation.
MozReview-Commit-ID: 4Fqfv4bNuKD
--HG--
extra : rebase_source : 6aed9dc06b151a9bb954a0b088dbd53b8fc52154
We should use null as the profile in GeckoView.preload. We will call
GeckoProfile.initFromArgs later on in GeckoThread.getProfile, when the
profile is actually needed.
MozReview-Commit-ID: JJzIVEiuZPn
Some key events synthesized from strings can have modifier metastates.
For example, from the sharp S character, we synthesize an S key with Alt
metastate. However, we don't actually want to pass the Alt metastate to
Gecko because the Alt meta key is not actually pressed in this case.
MozReview-Commit-ID: 5XYheyAgqdn
Even when building the "app" module in debug mode, by default Gradle still chooses to build all dependencies in release mode, which means that all of our own source files that reside in such a library (geckoview, respectively thirdparty) will e.g. be missing debug info for local variables.
MozReview-Commit-ID: owZr9yKtYI
--HG--
extra : rebase_source : ae09795ebe70bf4213cd3d145efa355712c702a0
* OSX
Make the lock of the type kIOPMAssertionTypeNoDisplaySleep and kIOPMAssertionTypeNoIdleSleep
as a singleton. Won't need to require an extra lock.
* Windows
Add |mRequireForDisplay| to ensure the "audio-playing" won't overwrite the previous
display requirement.
* Android
Add "audio-playing" and "video-playing", and make sure the audio-lock won't be cancel
when receiving "WakeLockDelegate.STATE_LOCKED_BACKGROUND".
MozReview-Commit-ID: 97oNX7H2qij
--HG--
extra : rebase_source : 24fa8b267ad97d668fa55462d1f61ef5c92b632f
Keep the value of SYSTEM_UI_FLAG_LIGHT_STATUS_BAR in window system ui status when show/hide fullscreen.
MozReview-Commit-ID: LHjEQKAPxYn
--HG--
extra : rebase_source : b9762440ed8837d3fb62e796e7587a3d9e76ae1d
It doesn't appear we simply check for a wifi connection type anywhere so the
existing code shouldn't need to be updated.
MozReview-Commit-ID: 7MqIbdB7uRI
--HG--
extra : rebase_source : 4a42a080b37104fb49f1f1cfbec884edbab52ba2