Commit Graph

1465 Commits

Author SHA1 Message Date
Birunthan Mohanathas
9bed3781f9 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Jim Chen
5f448383ca Bug 1243070 - Remove obsolete size-change code; r=snorp
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.
2016-02-01 17:38:14 -05:00
Jim Chen
728b693286 Bug 1243070 - Use native method to notify window size change; r=snorp
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.
2016-02-01 17:38:14 -05:00
Jim Chen
04869506de Bug 1243069 - Control GeckoThread state entirely from C++ code; r=snorp
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.
2016-02-01 17:38:14 -05:00
Jim Chen
195a41f4e6 Bug 1243049 - Convert browser.js prefs code to use observer; r=margaret
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.
2016-02-01 17:38:14 -05:00
Jim Chen
b9d1a002a8 Bug 1243049 - Implement new PrefsHelper native methods; r=snorp
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.
2016-02-01 17:38:13 -05:00
Jim Chen
d0a68f73f0 Bug 1243049 - Update native bindings for PrefsHelper; r=me
Update auto-generated native bindings for PrefsHelper.
2016-02-01 17:38:13 -05:00
Phil Ringnalda
863943dfb7 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas
f94b4ff6a2 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Phil Ringnalda
c6000dca8a Merge m-c to m-i 2016-01-30 09:43:42 -08:00
Kyle Huey
94f653c385 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Mark Capella
41443fd558 Bug 1240286 - Deleting text with backspace causes the action bar to glitch, r=smaug, TYLin, jchen 2016-01-30 00:08:55 -05:00
Kartikaya Gupta
1c933c6cff Bug 1243547 - Route scroll position adjusting for surface shifting directly to APZC. r=rbarker 2016-01-28 16:00:05 -05:00
Randall Barker
4de780992c Bug 1230674 - part 3, Add overscroll api to GeckoContentController and AndroidContentController r=snorp,kats 2016-01-27 07:45:31 -08:00
Randall Barker
4bddb28647 Bug 1230674 - part 2, Add overscroll API to Android nsWindow r=snorp 2016-01-27 07:45:31 -08:00
Randall Barker
3f96948842 Bug 1230674 - part 1, Add Overscroll API to NativePanZoomController r=snorp 2016-01-27 07:45:31 -08:00
AJ Kerrigan
b90d863836 Bug 1230750 - Export GENERATED_FILES headers from moz.build. r=ted.mielczarek
Add GENERATED_FILES headers to EXPORTS inside moz.build, and
remove associated Makefile.in rules.
2016-01-24 02:19:45 -05:00
Sebastian Hengst
a10345e651 Backed out 5 changesets (bug 1230674) for webgl bustage and crashes. r=backout on a CLOSED TREE
Backed out changeset 07cdcb9b4565 (bug 1230674)
Backed out changeset d21d089c447f (bug 1230674)
Backed out changeset a26de45cdb6a (bug 1230674)
Backed out changeset 59ec0033bd22 (bug 1230674)
Backed out changeset 74a06f6d85e1 (bug 1230674)
2016-01-26 22:40:18 +01:00
Randall Barker
1be0460c1b Bug 1230674 - part 3, Add overscroll api to GeckoContentController and AndroidContentController r=snorp,kats 2016-01-26 12:02:51 -08:00
Randall Barker
2e2c2eda73 Bug 1230674 - part 2, Add overscroll API to Android nsWindow r=snorp 2016-01-26 12:02:51 -08:00
Randall Barker
aeff1fcc8f Bug 1230674 - part 1, Add Overscroll API to NativePanZoomController r=snorp 2016-01-26 12:02:51 -08:00
Eugen Sawin
6542ec7fcd Bug 1192539 - [1.3] Add MediaCodecList JNI query support. r=snorp 2016-01-26 13:50:51 +01:00
Carsten "Tomcat" Book
874721849e Merge mozilla-central to fx-team 2016-01-18 14:24:37 +01:00
Sebastian Kaspari
deb051dc45 Bug 1227603 - Add support for sub-distributions based on MCC/MNC (SIM). r=margaret,mfinkle
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
2016-01-15 10:11:34 +01:00
Jim Chen
56f36cca89 Bug 1238761 - Autogenerate constants for MotionEvent; r=snorp
This patch autogenerates constants for MotionEvent to replace the manual
definitions in AndroidJavaWrappers.
2016-01-15 13:05:45 -05:00
Jim Chen
37091dff4e Bug 1238761 - Remove obsolete APZ code; r=rbarker
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.
2016-01-15 13:05:45 -05:00
Jim Chen
04e56b3de0 Bug 1238761 - Rewrite AndroidContentController to work with multiple nsWindows; r=rbarker
This patch rewrites AndroidContentController to get rid of any
dependencies on a static nsWindow or APZC tree manager.
2016-01-15 13:05:45 -05:00
Jim Chen
b23f255449 Bug 1238761 - Attach NativePanZoomController through GLController; r=snorp
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.
2016-01-15 13:05:45 -05:00
Jim Chen
919de6549b Bug 1238761 - Implement NativePanZoomController native methods; r=rbarker
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.
2016-01-15 13:05:45 -05:00
Jim Chen
296a0a08cc Bug 1238761 - Add specializations of jni::Ref for primitive arrays; r=snorp
This patch adds specializations of jni::Ref for primitive arrays like
IntArray and FloatArray, so that the arrays can be accessed through the
GetElement, GetElements, and Length members.
2016-01-15 13:05:44 -05:00
Jim Chen
ebe41f27c9 Bug 1238761 - Switch NativePanZoomController to use native methods; r=rbarker
This patch turns NativePanZoomController's MotionEvent handler into a
native method, and it adds the WrapForJNI annotations to all native
methods so that bindings will be automatically generated for them.
2016-01-15 13:05:44 -05:00
Nicholas Nethercote
3d32a4fdf1 Bug 1239589 - Change nsBaseWidget::mBounds to a LayoutDeviceIntRect. r=kats.
This patch removes dozens of ToUnknown/FromUnknown conversions and doesn't add
any new ones, which is nice. It also removes UntypedDevPixelsToCocoaPoints(),
which is no longer needed.
2015-11-22 20:32:29 -08:00
Jim Chen
3791d71d0d Bug 1238413 - Guard against drawing methods being called during compositor shutdown; r=snorp
When waiting for the compositor to shut down, it's possible for
nsWindow::DrawWindowunderlay and DrawWindowOverlay to be called. In that
case, the GL controller is already destroyed, and we should just bail.
2016-01-14 18:20:02 -05:00
Jan de Mooij
a33fee8b54 Bug 1237201 part 9 - Fix remaining issues. r=nfroyd 2016-01-14 22:12:13 +01:00
Jim Chen
2e597f1fad Bug 1237932 - Fix crash when renewing EGL surface fails; r=snorp
We shouldn't crash when renewing an EGL surface fails, because the
compositor is able to handle it gracefully.
2016-01-13 14:35:27 -05:00
Jim Chen
5822ef576f Bug 1237690 - Fix possible deadlock in nsAppShell::SyncRunEvent; r=snorp
In order to prevent the deadlock, we need to release sAppShellLock when
we start waiting in SyncRunEvent. However, we cannot simply unlock it
before the wait because that introduces an out-of-order unlocking wrt
mSyncRunMonitor, which can cause further deadlocks. So this patch
converts mSyncRunMoitor to a condvar and make it use sAppShellLock. That
then involves making aAppShellLock a Mutex instead of a StaticMutex. The
final result is having one lock (sAppShellLock), which supports any
other condvars that we have like mSyncRunFinished.
2016-01-13 14:35:27 -05:00
Jonathan Kew
c2c031081e Bug 890156 - patch 0.3 - Create a version of nsIWidget::Create that takes Desktop pixels, because that's what we actually need to pass in some cases. r=mstange 2016-01-13 07:32:55 +00:00
Jonathan Kew
28d5952fc4 Bug 890156 - patch 0.2 - Remove the (unused) aRect parameter from nsBaseWidget::BaseCreate. r=kats 2016-01-13 07:32:55 +00:00
Nicholas Nethercote
6b299ad225 Bug 1209812 (part 6) - Convert all gfxImageFormat values to SurfaceFormat equivalents. r=jrmuizel.
This patch:

- Makes the following substitutions (plus necessary namespace qualifiers:

    gfxImageFormat::ARGB32      --> SurfaceFormat::A8R8G8B8_UINT32
    gfxImageFormat::RGB24       --> SurfaceFormat::X8R8G8B8_UINT32
    gfxImageFormat::A8          --> SurfaceFormat::A8
    gfxImageFormat::RGB16_565   --> SurfaceFormat::R5G6B5_UINT16
    gfxImageFormat::Unknown     --> SurfaceFormat::UNKNOWN

- Changes gfxImageFormat to be a typedef to gfx::SurfaceFormat. This will be
  removed soon.

- Removes gfxCairoFormatToImageFormat() and gfxImageFormatToCairoFormat() and
  replace calls to them with CairoFormatToGfxFormat() and
  GfxFormatToCairoFormat().

- Removes ParamTraits<gfxImageFormat>.

- Add namespace qualifiers to SurfaceFormat instances where necessary.
2016-01-07 20:57:38 -08:00
Carsten "Tomcat" Book
d1ee9c9f70 merge mozilla-inbound to mozilla-central a=merge 2016-01-07 11:50:57 +01:00
Andrzej Hunt
c349a42fac Bug 826400 - Part 3: Simplify homescreen shortcut creation, and use apple-touch-icon if available r=nalexander,jchen 2015-12-29 11:49:54 -08:00
Bob Owen
00e78ab6fc Bug 1156742 Part 9: Add a new nsIDeviceContextSpec for proxied printing. r=roc
This also changes aPrintToFileName parameter for BeginDocument to an nsAString& from char16_t*.
Having a char16_t* caused a pain with VS2105 where wchar_t != char16_t (as on VS2103), after it had been sent over IPDL.
This could have been worked around with casting, but this seemed like the tidier solution.
2016-01-05 10:08:57 +00:00
Jim Chen
17cdf6a53d Bug 1236654 - Properly shut down GLController on nsWindow closing; r=snorp
When nsWindow closes, notify GLController to shut down. To ensure any
pending calls on the UI thread are processed first, post a Runnable to
the UI thread that disposes the GLController on the UI thread.
2016-01-06 21:33:18 -05:00
Jim Chen
e2aca4db00 Bug 1236643 - Reorder GeckoEditable destruction sequence; r=esawin
To guarantee that GeckoInputConnection and GeckoEditable are not used by
GeckoView after GeckoEditable has been destroyed, we need to make sure a
certain sequence is followed. We should first unset the
InputConnectionListener in GeckoView on the UI thread; then unset the
GeckoEditableListener on the IC thread; and finally finish destroying
the GeckoEditable instance through disposeNative. This patch merges this
logic with the initialization logic in GeckoEditable.onViewChange, so
that onViewChange can be used for both initialization and destruction.
2016-01-06 21:33:18 -05:00
Jim Chen
9169e5b31b Bug 1236640 - Make selection change part of the IME change transaction; r=esawin
We notify IME text changes in transactions. We should make selection
change notification part of that transaction.
2016-01-06 21:33:18 -05:00
Jim Chen
8ab9b775f0 Bug 1235246 - Configure GeckoLayerClient after GLController is initialized; r=snorp
LayerView used to call GeckoLayerClient.onGeckoReady directly if Gecko
is sufficiently loaded. However, onGeckoReady indirectly calls
GLController.createCompositor, and it's possible for the
createCompositor event to be prioritized so that it happens before we
initialize GLController, causing a crash. This patch moves the
onGeckoReady call to the Gecko thread, after GLController is
initialized, to avoid this race condition.
2016-01-06 21:33:18 -05:00
Jim Chen
8b313ba329 Bug 1235246 - Only prioritize compositor events in GLController; r=snorp
Only three GLController events -- CreateCompositor, PauseCompositor, and
OnResumedCompositor should be prioritized through GLControllerEvent. The
other GLController events should follow the normal event queue ordering
to prevent race conditions.
2016-01-06 21:33:17 -05:00
Jim Chen
dbe0fdff66 Bug 1235475 - Crash at the exception source when an exception is in native code; r=snorp
When we have a Java exception in native code, the Java stack in the
exception will not be very useful because the top frame is the native
entry point. In this case, the native stack is more useful. However,
currently we don't get a good native stack in this situation because we
go through Java when handling the exception, and the native stack we get
will have a lot of unknown frames inside libdvm or libart. This patch
makes us stay in native code when handling an uncaught exception from
native code, so that we get a good native stack.
2015-12-30 18:36:41 -05:00
Jim Chen
d60611f65f Bug 1233812 - Move SyncRunEvent to nsAppShell; r=snorp
This patch moves the SyncRunEvent logic from GLControllerSupport to
nsAppShell, as it could be useful elsewhere. This patch fixes a race
condition related to shutdown, where a deadlock could occur if Gecko
shuts down when another thread is waiting for a synchronous event to
finish running. This patch also fixes a crash on shutdown when we tried
to create a mutex after the deadlock detector has shut down.
2015-12-23 22:03:35 -05:00
Jim Chen
896c5bd072 Bug 1233812 - Fix possible race in accessing nsAppShell instance; r=snorp
When getting nsAppShell from another thread, there could be a race with
nsAppShell being destroyed on the main thread. This patch makes the raw
nsAppShell pointer only accessible from the main thread, and use a
static mutex to coordinate accessing nsAppShell from other threads.
2015-12-23 22:03:35 -05:00