Commit Graph

1427 Commits

Author SHA1 Message Date
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
Jim Chen
5326296b3f Bug 1233812 - Remove obsolete methods in GeckoAppShell; r=snorp
These methods were from the XUL Fennec days and are obsolete.
2015-12-23 22:03:35 -05:00
Jim Chen
c56eece49a Bug 1229403 - Use existing states if possible when initializing GeckoView; r=snorp
This patch changes onAttachedToWindow in GeckoView, so that if we have
states that have been restored, we use those states for initialization
instead of creating new states (e.g. opening a new nsWindow). Because
the GLController instance is associated with the nsWindow instance, we
need to keep the GLController instance as part of our saved states. This
patch also adds a reattach method to GeckoView.Window, because
GeckoEditable needs to be notified when its target View changes.
2015-12-23 22:03:35 -05:00
Jim Chen
eefbe86eb5 Bug 1232456 - Create EGL surface through widget; r=snorp
This patch makes GLContextProviderEGL create EGL surfaces through
nsWindow/nsIWidget on Android. nsWindow then calls GLController in Java
to actually create the surface.
2015-12-23 22:03:34 -05:00
Jim Chen
b605aa550c Bug 1227706 - Remove unused GLController calls and events; r=snorp
Remove GLController calls and events in GeckoAppShell and GeckoEvent
that were made obsolete by the new native calls.
2015-12-23 22:03:34 -05:00
Jim Chen
5a099c186a Bug 1227706 - Get rid of compositor singletons in nsWindow; r=snorp
Now that we properly support individual compositors for nsWindows, we
should get rid of the static singletons that held the compositor
objects.
2015-12-23 22:03:34 -05:00
Jim Chen
0ab8e63862 Bug 1227706 - Implement nsWindow::GLControllerSupport; r=snorp
This patch adds native method implementations in GLControllerSupport to
manage compositor creation/pause/resume.
2015-12-23 22:03:34 -05:00
Jim Chen
b2961d2eee Bug 1227706 - Let GeckoView manage GLController instances; r=snorp
GLController instances are associated with a particular nsWindow, rather
than a particular View. Therefore, we need to let GeckoView manage
GLController instances, as part of GeckoView's handling of saving and
restoring states.
2015-12-23 22:03:34 -05:00
Jim Chen
93813233b3 Bug 1227706 - Add native methods to GLController; r=snorp
One nsWindow will have one corresponding GLController, and using native
GLController methods instead of GeckoEvents lets us control the
compositor for each nsWindow separately.
2015-12-23 22:03:34 -05:00
Jim Chen
6125552fa3 Bug 1227706 - Rename nsWindow::Natives to nsWindow::GeckoViewSupport; r=snorp
GeckoViewSupport better reflects the purpose of the class and will match
the GLControllerSupport class that another patch is adding. This patch
also changes the way GeckoViewSupport is constructed in order to be more
encapsulating.
2015-12-23 22:03:34 -05:00
Jim Chen
56c1df6cc9 Bug 1227731 - Add ability to redirect proxied native calls; r=snorp
This patch adds a way to set the target of a proxied native call, so the
call goes to another C++ function / class member than the original
target.
2015-12-23 22:03:34 -05:00
Jim Chen
0e9632f778 Bug 1227727 - Remove geckoConnected method in LayerView; r=snorp
Right now LayerView depends on geckoConnected being called by GeckoApp
or GeckoView during its initialization. However, we can get rid of it
and let LayerView handle the task itself. As part of this change, screen
depth overriding is moved to native code in nsAppShell.
2015-12-23 22:03:33 -05:00
Jim Chen
c3cf1e06c6 Bug 1227719 - Autogenerate LayerRenderer.Frame; r=snorp
This patch adds auto-generated bindings for LayerRenderer.Frame, and
uses the new bindings in nsWindow, in place of the old manual bindings
in AndroidJavaWrappers.
2015-12-23 22:03:33 -05:00
Wes Kocher
f01fa1274c Backed out 25 changesets (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE
Backed out changeset 31c0aadae8e7 (bug 1156742)
Backed out changeset f08df57ff700 (bug 1156742)
Backed out changeset 90c026d5dcb1 (bug 1156742)
Backed out changeset 8c6d14d80238 (bug 1156742)
Backed out changeset 72d86b0471c9 (bug 1156742)
Backed out changeset 363829accc09 (bug 1156742)
Backed out changeset 16360fe94d54 (bug 1156742)
Backed out changeset 5355c636a81a (bug 1156742)
Backed out changeset 18844d26b873 (bug 1156742)
Backed out changeset 99df86591613 (bug 1156742)
Backed out changeset 7ac1c7e15a11 (bug 1156742)
Backed out changeset de352000aae1 (bug 1156742)
Backed out changeset 4dd34ea230c6 (bug 1156742)
Backed out changeset 48c6ce65a5c2 (bug 1156742)
Backed out changeset dd52947f73c6 (bug 1156742)
Backed out changeset 5fe429ee880c (bug 1156742)
Backed out changeset dedca8fb19b0 (bug 1156742)
Backed out changeset d748b1354f92 (bug 1156742)
Backed out changeset 7f8e59588518 (bug 1156742)
Backed out changeset b90d302c57f6 (bug 1156742)
Backed out changeset 7a4da453572c (bug 1156742)
Backed out changeset a40eea914519 (bug 1156742)
Backed out changeset 99a8859afcdb (bug 1156742)
Backed out changeset 4934e88b2d7a (bug 1156742)
Backed out changeset 79733166f05e (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE
2015-12-21 13:47:33 -08:00
Bob Owen
13cbcd9ebb 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.
2015-12-21 20:33:13 +00:00
Chenxia Liu
109eec104c Bug 1212611 - Use system notification for website notifications in Android. r=mfinkle 2015-12-03 10:56:04 -05:00
Mark Capella
8147fbc13a Bug 1230617 - Editing text in an input field causes actionbar jank, r=snorp 2015-12-14 18:53:26 -05:00
Jim Chen
fc1694ecf5 Bug 1051556 - Re-flush IME changes when querying text triggers more changes; r=esawin
We send query text events when flushing IME changes, and sometimes these
events make Gecko commit more pending changes. In that case, we should
try flushing again, so we pick up the new changes.

This patch also makes the process of flushing text changes
transactional, so that if we have to bail due to more pending changes,
nothing will be committed.
2015-12-12 10:18:43 -05:00
Carsten "Tomcat" Book
1243a822e4 Merge mozilla-central to fx-team 2015-12-11 11:44:43 +01:00
Masayuki Nakano
e6e250467e Bug 1179632 part.2 WidgetCompositionEvent should store NativeIMEContext which caused the event and PuppetWidget should store it for GetNativeIMEContext() r=smaug, sr=smaug 2015-12-11 15:15:57 +09:00
Masayuki Nakano
24944df82e Bug 1179632 part.1 native IME context should not be stored in InputContext but should be able to retrieve with nsIWidget::GetNativeData() r=smaug 2015-12-11 15:15:57 +09:00
Kartikaya Gupta
9b77b6b8a3 Bug 1230522 - Make some unimplemented functions not be native. r=rbarker 2015-12-10 17:23:07 -05:00
sgiles
b2b5fc2c30 Bug 1230838 - Let hover events fall through to Gecko when accessibility is turned on - don't throw an exception in the NativePanZoomController when default prevented. r=kats 2015-12-10 13:20:53 -05:00
Reuben Morais
9762b0d504 Bug 1212679 - Handle KitKat default messaging app intents. r=fabrice r=snorp 2015-12-08 14:43:09 -05:00
Phil Ringnalda
7bffeb3b66 Back out 4 changesets (bug 1051556) for java.lang.IllegalArgumentExceptions
CLOSED TREE

Backed out changeset c89683497d23 (bug 1051556)
Backed out changeset c3f4c2d01bad (bug 1051556)
Backed out changeset 4a83a8594ddc (bug 1051556)
Backed out changeset fe3d880efce8 (bug 1051556)
2015-12-09 18:20:51 -08:00
Jim Chen
899201cf4f Bug 1051556 - Re-flush IME changes when querying text triggers more changes; r=esawin
We send query text events when flushing IME changes, and sometimes these
events make Gecko commit more pending changes. In that case, we should
try flushing again, so we pick up the new changes.

This patch also makes the process of flushing text changes
transactional, so that if we have to bail due to more pending changes,
nothing will be committed.
2015-12-09 17:46:45 -05:00
Nicholas Nethercote
086ae9a5bb Bug 1229237 (part 3) - Make nsIWidget::Invalidate() take a LayoutDeviceIntRect. r=botond. 2015-11-16 21:18:31 -08:00
Nicholas Nethercote
cbec00a8de Bug 1229237 (part 2) - Make nsIWidget::DrawWindowUnderlay() take a LayoutDeviceIntRect. r=botond. 2015-11-16 20:34:00 -08:00
Nicholas Nethercote
aa1114c018 Bug 1229237 (part 1) - Make nsIWidget::{Create,CreateChildren}() take a LayoutDeviceIntRect. r=botond. 2015-11-16 00:35:18 -08:00
Carsten "Tomcat" Book
0f9a85616c merge mozilla-inbound to mozilla-central a=merge 2015-12-02 15:20:57 +01:00
Jim Chen
a6b8eae5c3 Bug 1227604 - Fix compositor event order; r=snorp
When the queue only contains compositor events, a compositor event
should go to the back of the queue to maintain order.
2015-12-01 13:48:18 -08:00
Sebastian Kaspari
d8cfe26d6c Bug 1189336 - (Part 1) Rename RestrictedProfiles to Restrictions. r=ally
RestrictedProfiles: The name of the class can be confusing because it handles
guest profiles and restricted profiles. We might even query it from a normal
profile.
2015-11-11 12:29:07 +01:00
sgiles
b641f1b5c5 Bug 1224604 - Handle Hover events when TalkBack is enabled. r=kats 2015-11-25 15:25:11 +00:00
Nicholas Nethercote
ca061c58ed Bug 1225007 (part 1, attempt 3) - Use LayoutDevicePixel more in Cocoa widget code. r=kats. 2015-11-19 14:10:38 +11:00
Jan Varga
9be7ccf3fc Bug 961049 - Part 8: Move getFileReferences() from PContent under new protocol PBackgroundIndexedDBUtils; r=baku 2015-11-22 10:44:33 +01:00
Mark Capella
43630396ae Bug 1215959 - (GeckoCaret2) Upgrade Core and AccessibleCaret, r=smaug 2015-12-01 15:25:06 -05:00
Phil Ringnalda
05685d140b Backed out 2 changesets (bug 1225007) for frequent OS X "Shouldn't return empty rect" assertion failures, a=backout
Backed out changeset c5b352c74b35 (bug 1225007)
Backed out changeset 8a513c70ce7c (bug 1225007)
2015-11-19 20:55:26 -08:00
Nicholas Nethercote
dc42acdb6f Bug 1225007 (part 1, attempt 2) - Use LayoutDevicePixel more in Cocoa widget code. r=kats. 2015-11-19 14:10:38 +11:00
Nicholas Nethercote
81aa29c752 Backout 52ba24123046 and 66768d6a50fa (bug 1225007) for causing lots of test assertions on Mac. CLOSED TREE 2015-11-17 17:02:39 -08:00