Bug 1305498 - 1. Remove NotificationClient task queue; r=sebastian
Not sure why we needed a task queue for NotificationClient actions. The
actions all go through IPC and are non-blocking, so it's perfectly fine
to perform them off of whatever thread we're on.
Bug 1305498 - 2. Integrate NotificationHandler et al into NotificationCllient; r=sebastian
There's no reason to have NotificationHandler, AppNotificationClient,
and ServiceNotificationClient all separate from the base
NotificationClient class. This patch adds the functionality of
those three classes to NotificationClient.
The notifications hash map is changed from a ConcurrentHashMap to a
regular HashMap with synchronization because I think the use case here
doesn't warrant the added performance and overhead of ConcurrentHashMap.
NotificationService is changed to match the new NotificationClient. Now
the only job for NotificationService is to set a notification as
foreground, rather than to manage all notifications like before.
NotificationHandler, AppNotificationClient, and
ServiceNotificationClient will be removed in a later patch.
Bug 1305498 - 3. Set NotificationListener in GeckoApplication; r=sebastian
Set NotificationListener once in GeckoApplication.onCreate, instead of
spreading it out in GeckoApp, BrowserApp, and GeckoService. This is
possible because there's no longer a distinction between
AppNotificationClient and ServiceNotificationClient in the new,
consolidated NotificationClient.
Bug 1305498 - 4. Remove obsolete notification classes; r=sebastian
Remove AppNotificationClient, ServiceNotificationClient, and
NotificationHandler, now that they've all been replaced by the new,
consolidated NotificationClient.
Bug 1305498 - 5. Use NotificationReceiver for web notification callbacks; r=sebastian
Previously, web notification callbacks went to GeckoApp directly, but
that presented some problems such as not being able to implement the
on-close callback, because we don't want to launch GeckoApp when the
notification is closed by swiping. This patch makes us use
NotificationReceiver for callbacks, and let NotificationReceiver launch
GeckoApp if necessary.
Bug 1305498 - 6. Don't keep notification cookie in native code; r=sebastian
Keep the notification cookie a single location (in the notification
intent itself), and simplify the native notification handling code.
Bug 1305498 - 7. Use NotificationReceiver for persistent notifications; r=sebastian
Currently, persistent notification callbacks go through a different code
path, but it'd be more consistent and correct to let persistent
notification callbacks go through NotificationReceiver as well.
This takes care of some housekeeping work that was missing for
persistent notifications, such as deleting the mNotifications entry when
the notification is closed.
The fixup migration assumes that there must be a default panel, and sets the history panel as default if not.
This assumption is wrong in the case where no panels are visible: in this case there is no default.
Before this commit, that migration will make the history panel visible for all users who had no
visible panels, with this commit that migration will retain the all-panels-hidden state.
Note: it's impossible for us to recover the all-panels-hidden state for clients that have already
run the migration, however we can at least prevent this issue from happening for users who
have not yet migrated (i.e. in release).
MozReview-Commit-ID: 9JlmltPW2Ly
--HG--
extra : rebase_source : 4e608910775c971ec09c0f9096b8ae36e9f7b877
Sometimes the tab doesn't get its favicon yet when we send the notification.
Therefore, we would listen the FAVICON event and then re-send the notification again if we used the default cover icon in previous notification.
MozReview-Commit-ID: JSphLBEhGy2
--HG--
extra : rebase_source : 55f12e30583480a1d0d7f2743974a05180198ad5
We need to bump the Gradle Deps task, which fetches dependencies, to
include new test dependencies; and use freshly uploaded tooltool
archives (manually uploaded) containing the new test dependencies.
MozReview-Commit-ID: 8bNOVQPHlk6
--HG--
extra : rebase_source : 0c80117fb58e43f9c857027941f0a14f03b97f13
Web Crypto returns an unhelpful "operation failed for an
operation-specific reason" error if the actual decryption fails, but
we can report more useful errors for missing and invalid header
values.
MozReview-Commit-ID: JRdGHBUodmb
--HG--
extra : rebase_source : 8f1b047b6f01c89a852aefbb1349a608f1178ab8
On Windows, the contextmenu event is fired when the finger is lifted after a
long-press. However, there are various bits of code, such as the AccessibleCaret
or potential fixes for bug 1147335, which would benefit from knowing when the
long-press gesture was detected. By moving eMouseLongTap event up we can satisfy
that need. An alternative approach considered was to fire the eMouseLongTap
before the contextmenu on all platforms unconditionally, but that makes it harder
to implement platform-specific text selection behaviour the way we want. In
particular we would have to add an extra message or notification for non-Windows
platforms that initiated text selection if the contextmenu event was not
consumed.
MozReview-Commit-ID: 2lmwxmmGrVD
This patch introduces WebsiteMetadata.jsm which imports fathom and page-metadata-parser.
The code has been slightly modified to not depend on more node libraries.
On DOMContentLoaded the module will extract the metadata asynchronously and send it with
a 'Website:Metadata' event.
MozReview-Commit-ID: LxhYOTvvdsF
--HG--
extra : rebase_source : e31286bd7268ad62d55f1a5318cde79442e9acba
Huge oversight in my original patch. Pressing any hardware button will result
in the history list being shown after the long-press delay (regardless of long-pressing).
MozReview-Commit-ID: KO8u0NzTxaO
--HG--
extra : rebase_source : 6f6932c4f35b9e580a84a2d68a7688abe4da79de
After the splitting of text overlay and the caret images, the caret image should
be placed from the top of #image div.
Delete those "top" style for Fennec since they're not needed anymore in current
setup.
MozReview-Commit-ID: Dn6jgqaFfek
--HG--
extra : rebase_source : 92b697db26cb7311fbd22a63e9f0ed71e6a434f4
It looks like the update (23.4) version of palette returns the actual dominant colour
for a red mock (FF0000). Previously it returned a more muted red (F80000).
MozReview-Commit-ID: 5VpRavyooHY
--HG--
extra : rebase_source : ab55e787a305481f890d00739de2843b87063bed
Make contentDocumentChanged and isContentDocumentDisplayed calls require
the caller to pass in a window object, so that we can get the widget and
GeckoLayerClient from the window object. This way these calls no longer
depend on having a global layer client in AndroidBridge.
This converts nsIMediaManagerService to use nsIArray rather than
nsISupportsArray. All usages of the interface are updated.
MozReview-Commit-ID: 1PLczEptf59
--HG--
extra : rebase_source : a8beed043989f6e69e89d17c0db1864c6d7258ac
I've also updated espresso versions. For some reason using espress results in test-app
defaulting to annotations 23.0.1 or 23.1.1 (depending on espresso version), but we can
override this with the actual annotations library version to make gradle happy again.
MozReview-Commit-ID: 6rFtvVgceJV
--HG--
extra : rebase_source : 3c9fb20cad396eebbfbd890cc37a4931221488d9
Going forward there will be just one highlights item/layout with an optional image.
MozReview-Commit-ID: BmtUTtanjJr
--HG--
extra : rebase_source : e80edea42af9bdc9c3a79b3bd9588d0a91f8faf7
The UNION operator requires the two result sets to have the columns in the same order.
MozReview-Commit-ID: JRtw0LDZ5ib
--HG--
extra : rebase_source : a2cc6b2a9190cf9fb8ec75351446e0a91e613710
Per bug 1307100 comment 3, we use "height equals to 0" to hide the floating
toolbar so we only need to adjust the handlesOffset when height > 0.
MozReview-Commit-ID: AdIOxIFUrI
--HG--
extra : rebase_source : c62658c19362e5b49b1b36829cd4b1ef81be87e4
CLOSED TREE
--HG--
extra : amend_source : 1f0c7bbb5aa8a3dab38f0785e13e32f59e8f8c79
extra : histedit_source : ca99420cac7019a4b6fd6aab781b93151092a8bc%2C0ef091317a27688c734f20417875406726e35de7
CLOSED TREE
MozReview-Commit-ID: Apt89thqPfX
--HG--
extra : source : 548560e9e76273fa6df17415e9b29bfd0361e61b
extra : amend_source : c8022b27421c033809ce5b543f49c0af2ed91020
extra : histedit_source : 22ec0210605b62ef3990e6ee9007d1816cd2a722
I am open to replacing "constellations" with a different name, but it was the best
I could come up with so far.
MozReview-Commit-ID: 9pljV8nC6O8
--HG--
extra : rebase_source : 781b5e1776adf457c92cacfecc09dc7afe03ad41
Note: we also change the return value of a long-press when the tab history fragment is showing:
we want to completely ignore long-presses in this case, previously we used to return false in this
case, which suggests that we didn't handle the event - however we explicitly consider this a no-op,
so should return a value reflecting that (in reality: no one else handles the long-press, so this
makes no effective difference).
MozReview-Commit-ID: FYrCVsNHfjv
--HG--
extra : rebase_source : d1af525a119264ea820b665198f45ff32898e8e1
This ensures that a DB modification will trigger a refresh of any clients
using getHighlights().
MozReview-Commit-ID: Cauc89ryDHr
--HG--
extra : rebase_source : e70401ba51ea406ab339f02abec73ec9bf1b3332
Distribution.getDistributionDirectories is currently annotated with
@WrapForJNI, but because it's used from JS through JNI.jsm, the
@JNITarget annotation is more appropriate.
We need to ensure we can explicitely close any database connections we open in the TestLegacyLoader,
so we initialize a BrowserProvider instance so that we can then call .shutdown() on it once we're done,
which will close any open connections.
Additionally, we need to make sure to use correct authority when registering (using AUTHORITY_URI produces dual mapping
of providers, from content://org.fennec... and from org.fennec...), and wrap our providers in a DelegatingTestContentProvider,
which will append PARAM_IS_TEST param to wrapped URIs - when present this ensure we won't try to load a per-profile database.
MozReview-Commit-ID: LnzPhGOe6OY
--HG--
extra : rebase_source : 76eaadaa78bed7918b90012f8bdcc996dc3b2024
If the replacement panel was DEFAULT, then the migration should retain the DEFAULT flag.
By trying to ensure visibility of the default panel, we accidentally discarded the DEFAULT flag.
This patch provides a minimal fix for not discarding the default flag. It might be better
to rearchitect the whole method, but a minimal solution is preferred for now since this requires
uplifting to beta.
MozReview-Commit-ID: EkbDD7pipgJ
--HG--
extra : rebase_source : 4d6981feefef988fe2a4cb9d3ec294d71896c2b3
Bug 1251362 can result in there no default panel being set (this happens if the history
panel was the default panel before the panel migration). We can reuse the code from a previous
bug which sets history as the default panel if no other panel is set as default.
A second commit fixes the broken migration to ensure that history remains the default
homepanel, however this cleanup migration will help ensure existing clients get fixed.
MozReview-Commit-ID: EcUb2uUfOeJ
--HG--
extra : rebase_source : 41a313d1c0c55900cd3a075128b1d861a155b52e
It's not obvious how to listen to individual errors in most cases, so
we just link to the reports for now. Progress!
MozReview-Commit-ID: 8nGRJdpzZnO
--HG--
extra : rebase_source : e81c9b29cb03c5ba73e793512525b5c9c68ab655
extra : amend_source : ce1e2368d43d37cab8fe41cd7a978342ad3e2ea6
Provide Fennec's implementation of GeckoAppShell.NotificationListener in
NotificationClient. A lot of the code was removed in an earlier patch
from GeckoAppShell, so combined with this patch, we're essentially
moving code from GeckoAppShell to NotificationClient.
Use string names instead of integer IDs to identify notifications. The
integer IDs came from the hashes of the string names, so they are not
guaranteed to be unique. Because the names from Gecko are a combination
of the site origin and notification tag, there can be unintentional
collisions, or worse, a site can intentionally make its notification
collide with and replace another site's notification.
GeckoService and the notification package have some interdependencies,
so if we want to move the notification package, we have to move
GeckoService also. With that said, it's good to move GeckoService in any
case, because it's a Fennec component just like GeckoApp.
--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoService.java => mobile/android/base/java/org/mozilla/gecko/GeckoService.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/notifications/AppNotificationClient.java => mobile/android/base/java/org/mozilla/gecko/notifications/AppNotificationClient.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/notifications/NotificationClient.java => mobile/android/base/java/org/mozilla/gecko/notifications/NotificationClient.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/notifications/NotificationHandler.java => mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHandler.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/notifications/NotificationHelper.java => mobile/android/base/java/org/mozilla/gecko/notifications/NotificationHelper.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/notifications/NotificationReceiver.java => mobile/android/base/java/org/mozilla/gecko/notifications/NotificationReceiver.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/notifications/NotificationService.java => mobile/android/base/java/org/mozilla/gecko/notifications/NotificationService.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/notifications/ServiceNotificationClient.java => mobile/android/base/java/org/mozilla/gecko/notifications/ServiceNotificationClient.java
Instead of using NotificationClient directly from GeckoAppShell, add a
NotificationListener interface, which NotificationClient would
implement. This isolates NotificationClient (and the notification
package) from GeckoAppShell and lets us move the notification package to
Fennec. It also makes a cleaner interface for GeckoView consumers to
implement notification support.
General cleanup patch: make JNI methods in GeckoAppShell private if
possible, because they're not meant to be used in Java from outside of
GeckoAppShell.
We decided to remove it because:
* Modern video controls include an exit fullscreen button
* After bug 1031519, you have to swipe down from the top of the screen to
display the soft back button so the copy does not make sense.
Note that the `MozShowFullScreenWarning` event was removed previously in the
platform in [1] so we remove the listener attachment here without replacing it.
[1]: https://hg.mozilla.org/integration/fx-team/rev/a6a5f79e630d
MozReview-Commit-ID: HwyyUkWkUUH
--HG--
extra : rebase_source : 99b81c1f71aca357c3a9ea34e63fc7d20bed994f
This is only there to silence the linter.
MozReview-Commit-ID: 8zEDsrbjyeo
--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/UnusedResourcesUtil.java => mobile/android/base/java/org/mozilla/gecko/util/UnusedResourcesUtil.java
extra : rebase_source : be9a886cc2d28a4336690255279f9cf50e9ed047
extra : histedit_source : 43c4512d56f5a01f04ecada6a493107b6ac9581f
Remove following domains from ua-update.json.in:
auctions.yahoo.co.jp
news.yahoo.co.jp
shopping.yahoo.co.jp
travel.yahoo.co.jp
sports.yahoo.co.jp
mixi.jp
Update bug number inline
ANRReporter is a telemetry tool that belongs in Fennec code.
GeckoJavaSampler is a developer tool that belongs in Fennec code.
SwipeDismissListViewTouchListener is only used in FormAssistPopup, which
is no longer referenced in geckoview code.
--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/ANRReporter.java => mobile/android/base/java/org/mozilla/gecko/ANRReporter.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoJavaSampler.java => mobile/android/base/java/org/mozilla/gecko/GeckoJavaSampler.java
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/widget/SwipeDismissListViewTouchListener.java => mobile/android/base/java/org/mozilla/gecko/widget/SwipeDismissListViewTouchListener.java
Separate compiled JARs into GECKOVIEW_JARS and FENNEC_JARS, and run
AnnotationProcessor separately on each set. The GeckoView bindings are
put into widget/android/GeneratedJNI* (same as before), while the
Fennec-specific bindings are put into widget/android/fennec/FennecJNI*.
Compile geckoview sources into a separate gecko-view.jar file, apart
from gecko-browser.jar. This lets us separate JNI binding generation,
among other things.