The code in WebappsUpdateTimer.js tried to detect a webapp process by
using the context class name, which is extremely fragile. This patch
makes it detect the current Gecko profile instead.
This patch makes code use the application context from GeckoAppShell
instead of the activity context. Enough changes are made to let headless
mode work.
This patch adds separate setter and getter for the application context
in GeckoAppShell. The existing getContext method is misused for both
application and activity context, so new methods are added to improve
consistency.
This code was originally added to request HTML5 video from Youtube under
certain conditions but Youtube serves HTML5 video by default and it is no
longer necessary.
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.
InputConnectionHandler really doesn't belong in the gfx package, and
the code to call key event handlers really doesn't belong in LayerView.
This patch refactors things, so that InputConnectionHandler is renamed
to org.mozilla.gecko.InputConnectionListener, and the interface is now
used by GeckoView instead of by LayerView.
GeckoAppShell.runGecko really should be in GeckoThread because
GeckoThread already takes care of most of the preparation when running
Gecko. This patch merges runGecko into GeckoThread.run, but split the
argument-building code into its own method.
GeckoThread.LaunchState now covers the entire GeckoThread lifetime and
not just launch, so it's renamed to GeckoThread.State. More utility
methods are added to check for the current state.
JNIObject is the base class for any class that wish to use per-instance
native methods. It encapsulates the long native pointer that used to be
in NativeJSContainer.
Using my test page (https://people.mozilla.org/~mcomella/test/uri.html), I have
confirmed that the following schemes still work:
* intent
* android-app
* custom schemes registered w/ Android (i.e. "mcomella")
* tel
* mailto
Additionally, I downloaded a PDF and successfully opened it via both the
notifications tray and about:downloads.
This gives me confidence that all links should work.
There is some ambiguity about whether ScheduleComposite will necessarily
trigger a composite all the way to nsWindow::DrawWindowUnderlay. Android
robocop tests assume it will, because they rely on DrawWindowOverlay
being called so they can take a screenshot and make progress,
but this is a very fragile assumption. They also rely on the entire
window being painted, which is also a fragile assumption.
This patch improves the situation by explicitly invalidating the current
window area when Android Java code needs to trigger a composite. This avoids
regressions from future patches in this series which make composition bail
out when there is nothing invalid.
The resulting setup is still a bit fragile for my taste but I'm not sure
what the ideal solution would be.
This is more appropriate than our internal org.mozilla.gecko package name as it
provides the distinction across channels and has more public facing names than
gecko.