One work-around for the bug is to ensure that our content root is in a
document when flushing IME changes, because when an input becomes
hidden, the previous content root is removed from the document.
As soon as the user clicks on a link to download a file Gecko will start the download - even before prompting the
user. This led to problems when the user hadn't granted the permission to write to the downloads directory yet. The
download would fail even though the user (later) accepted the permission.
With this patch we will start the download to the app's cache directory (only if we do not have the permission) and
prompt the user. As soon as the user has accepted the permission the download will be moved to the public downloads
directory (even while still downloading). If the permission is denied the download will be cancelled.
After the permission has been granted all subsequent downloads will start writing to the downloads directory
directly.
MozReview-Commit-ID: CCqk9h7Sxor
When SPS profiler is disabled (breakpad is disabled etc), mozilla_sampler_stop() is undefined. We should use profiler_stop() instead. profiler_stop calls mozilla_sampler_stop() when SPS profiler is built.
MozReview-Commit-ID: LmuDJEQV7Pr
Flush IME changes when committing or canceling the composition, before
sending a notification, so that the Gecko and Java sides are on the same
page.
Also, use the GeckoEditableListener constants when calling notifyIME so
we don't rely on the Gecko platform constants having the same values as
our Java constants.
This patch convers the APZ:TransformEnd notification from a MessageManager message
to an observer notification so that it is more general and works on other platforms.
MozReview-Commit-ID: 8SSir828Ch7
This patch convers the APZ:TransformEnd notification from a MessageManager message
to an observer notification so that it is more general and works on other platforms.
MozReview-Commit-ID: 8SSir828Ch7
Add proper synchronization to the UI thread task queue so we don't run
into race conditions. Also use UniquePtr to manage the contained task,
to fix a previous memory leak.
When Java is changing the composition, we should ignore the Gecko
selection. However, when Gecko is committing its composition, we should
not be ignoring the corresponding Gecko selection change. In other
words, we should only ignore selection changes when we know the change
is from Java.
Improve the performance of JNI calls by making JNI calls require a
Context object. LocalRef inherits from Context and can make calls
directly. Non-local Ref classes will generate a Context object when
making a call. The patch also makes the template design cleaner in
several cases.
Remove obsolete SIZE_CHANGED event and its handler in nsWindow. Also
remove some other supporting code (such as gAndroidBounds and the
FORCED_RESIZE event) that should be unnecessary by now.
Convert the SIZE_CHANGED event to a native method in GLController, and
carry over the SIZE_CHANGED implementation to the new implementation in
GLController. Some other changes were made for correctness in handling
size changes.
Right now, we rely on browser.js sending Gecko:Ready, to set the
GeckoThread state to RUNNING upon receiving Gecko:Ready. This patch
gets rid of this dependency on browser.js and Gecko:Ready.
Convert the old prefs code in browser.js to use observer notifications
that are sent by the new PrefsHelper implementation, in order to handle
pseudo-prefs.
Implement the PrefsHelper native methods. The previous browser.js
implementation supported "pseudo-prefs" that did not exist as actual
prefs, but was accessible through PrefsHelper. In order to accommodate
these pseudo-prefs, we send observer notifications in order to
communicate with browser.js about prefs that we don't support.
We will now search for distributions in the following folders:
* 1) Data distributions (APK or OTA):
* 1.1) <dataDir>/distribution/<mcc>/<mnc> - For bundled distributions for specific network providers
* 1.2) <dataDir>/distribution/<mcc> - For bundled distributions for specific countries
* 1.3) <dataDir>/distribution/default - For bundled distributions with no matching mcc/mnc
* 1.4) <dataDir>/distribution - Default non-bundled distribution
* 2) System distributions:
* 2.1) /system/<package>/distribution/<mcc>/<mnc> - For bundled distributions for specific network providers
* 2.2) /system/<package>/distribution/<mcc> - For bundled distributions for specific countries
* 2.3) /system/<package>/distribution/default - For bundled distributions with no matching mcc/mnc
* 2.4) /system/<package>/distribution - Default non-bundled system distribution
With APZC supporting multiple nsWindows, this patch removes some
obsolete APZ code, including the previous implementation of
NativePanZoomController native methods in AndroidJNI.cpp, and the
various static members of nsWindow.
This patch adds a way to attach a particular NativePanZoomController
instance held by LayerView to a particular nsWindow instance. Because
LayerView already calls GLController.SetLayerClient during
initialization, this patch renames it to attachToJava and modifies it to
accept an additional NPZC parameter. In the new AttachToJava
implementation, we create or reuse a NPZCSupport object and associate it
with the NPZC instance.
This patch adds the NPZCSupport class to nsWindow and use it to
implement the NPZC native methods that were implemented in
AndroidJNI.cpp. For HandleMotionEvent, the code also includes a portion
from AndroidJavaWrapper::MakeMultitouchEvent.