We used to flush the Java side text upon receiving the acknowledge-focus
event, at which point the Java side is waiting on the Gecko side.
Because of the async IME refactoring, we can no longer wait on the Java
side, so we have to flush the text early, before sending the first focus
notification. Also, the acknowledge-focus event is no longer needed as a
result.
Our call to InputMethodManager to restart input also has to changed due
to the change in calling sequence between notifyIME and
notifyIMEContext.
Due to async IME refactoring, we no longer need the blocking mechanism
in ActionQueue. As a result of the simplified code, we can remove
ActionQueue entirely and move its code to under GeckoEditable.
ActionQueue.offer() is now icOfferAction().
This patch also makes mText an instance of AsyncText, and change all
accesses to mText to reflect the new async interface, i.e. accesses on
the Gecko thread go through getCurrentText() and the current*** methods,
and accesses on the IC thread go through getShadowText() and the
shadow*** methods.
AsyncText keeps two copies of the text - the current copy on the Gecko
thread that is the authoritative version of the text, and the shadow
copy on the IC thread that reflects what we think the current text is.
When editing the text on the IC thread, the shadow copy is modified
directly, and then the modification is sent to the Gecko thread, which
modifies the current copy concurrently. Depending on what Gecko does to
the text, the current copy may diverge from the shadow copy, but
periodically, the shadow copy is synced to the current copy through
AsyncText.syncShadowText() to make the two copies identical again.
As part of async IME refactoring, we will no longer send composition
updates separately. Instead, composition updates will be integrated into
the set-span and remove-span events, similar to what we already do for
replace-text events.
GeckoEditable implemented GeckoEditableListener because GeckoAppShell
called its methods through GeckoEditableListener, but now we use JNI to
call GeckoEditable methods directly, so GeckoEditable no longer has to
implement GeckoEditableListener.
This change also lets us simplify GeckoEditableListener by making
onTextChange and onSelectionChange no longer have any parameters.
Currently, clearSpans calls are carried out immediately, but that makes
it out of order in relation to other calls, which have to go through
Gecko. This patch fixes this issue.
This will be needed for opening background/private tabs from the highlights menu.
MozReview-Commit-ID: 8wvFuTgl2SP
--HG--
extra : histedit_source : de4024ee986c5a48d9da4206160cf960b1d7bc3c
This flag seems to no longer be needed, and prevents the use of switch statements for resource ID's. It was first introduced for mach based geckoview builds, however geckoview now seems to be built using gradle which is able to invoke aapt to produce better R.java's, resulting in constant Resource ID's in Fennec.
MozReview-Commit-ID: EjWCX4nvlht
--HG--
extra : rebase_source : 3eb30debbc76c39bd8e367bf8709eaaf1592f42a
We want to access ActivityStreamContextMenu directly in our new test. That menu
extends BottomSheetDialog which is contained in the design support library, hence
we need to make that library available in robocop builds in order to access
the AS context menu.
MozReview-Commit-ID: EPyv7wvkJAE
--HG--
extra : rebase_source : cafe1e7dd6fbdcfb471cf5f66a1c0522e796c3aa
In the pageAction and browserAction schemas, several methods are
declared with `"async": true` but without a specified callback in the
`"parameters"` object, so callbacks are not allowed. However, when a
callback is proxied, the `ParentAPIManager` will mirror the call by
passing in an extra callback to the proxied API - and break.
This patch fixes the issue by removing uses of async:true. Also for
consistency between the browserAction and pageAction methods, the
methods that were not declared as async have also been marked as async.
MozReview-Commit-ID: JQqzmTUAotB
--HG--
extra : rebase_source : 62d1cbc4843dd6c792318337158e4311f8df94a4
This ensures no white borders around the favicons when on Android 4, no changes
on Android 5. Read FilledCardView for the full background on the border/corner
issue that happens on Android <= 4.
MozReview-Commit-ID: IsBcp7xxwjn
--HG--
extra : rebase_source : c37fbfe63eba9d8af4bc0c7b4d4535a380b6d3bd
Okay, this patch is much bigger than I anticipated. However at this point it is impossible
to separate all the interweaved changes.
* Update sizes and colors
* Use a dynamic number of top sites tiles to adjust to the screen size
* Do not keep references (to possible outdated) Cursors from every top sites page
* Remove unused bottom panel
* Add menu button to highlights items
MozReview-Commit-ID: 2CeEGCOXBKl
--HG--
extra : rebase_source : a780ec20fa6f87520c3418403ae4fe259ff39d69
Update path can be null. In this case we fallback to using the last saved path. However
if this doesn't exist either then we just continue with a null path and eventually crash
the service.
MozReview-Commit-ID: Kuihp496TEo
--HG--
extra : rebase_source : 96e2182571f4b2235b3fea25f449b2dbb3e17bb8
The Android version of TouchDelegate never resets the value of its
mDelegateTargeted, which means that once an event is delegated, future events
can get delegated as well, regardless of whether the event occurs within the
TouchDelegate's bounds. Because of the geometry this is more of an issue with
the (future RecyclerView version of) TabsGridLayout, but it can occur on
TabsLinearLayout as well where we use a TouchDelegate to increase the hit size
of the close button on a tab - once a close button is hit by delegation and the
tab is closed, the next time that tab is recycled it will continue to delegate
ACTION_UP events to the close button (in which case they're silently dropped)
even if the ACTION_DOWN was not in the close button's delegation area.
This commit introduces TouchDelegateWithReset, which is simply an override copy
of TouchDelegate with one extra block (commented in the new class) to reset
mDelegateTargeted on each new gesture received.
MozReview-Commit-ID: 5xrPBAdAK6D
--HG--
extra : rebase_source : d1b9c7a443b0590c63433ea6855c8a1ae0662455
extra : source : 0c267676cb0824d916f398155b0d5b7dec6f346c
Use the index in TabsLayout to specify where a tab was inserted instead of just
replacing the entire tabs list on a tab add.
MozReview-Commit-ID: Feft0RlN97r
--HG--
extra : rebase_source : 1ff47946d9e94d08dfcee34364c65ae7f8c02e7a
Also make a temporary testing adjustment to handle the fact that TabsListLayout
and TabsGridLayout don't currently share a common usable base.
MozReview-Commit-ID: HPExAnehKRq
--HG--
extra : rebase_source : 4d9d0ce9fff216090ae676163e22645cd45c92a5
extra : source : 411a8ac7368e3b69e8191812fb53f0d1b8aa3247
TabsListRecyclerAdapter.java will replace TabsLayoutAdapter.java when the time
comes.
Note from the future: the previous tabs layouts did a scroll each time an item
was added or selected, but GridLayoutManager sometimes does scrolls that aren't
necessary (like even when the position being scrolled to is already completely
in view), so we've adopted the approach of only scrolling when RecyclerView
makes it necessary.
MozReview-Commit-ID: JisX974zt88
--HG--
extra : rebase_source : 4105762cdd743d5120385e246350fc4059b6bcfc
extra : source : e4e74d6ae6da7dddda9a95e50c26656b07e67287
This converts nsIMediaManagerService to use nsIArray rather than
nsISupportsArray. All usages of the interface are updated.
MozReview-Commit-ID: 1PLczEptf59
This removes the rest of the usage of nsISupportsArray in MediaManager.
MozReview-Commit-ID: EqXTRNyKiva
--HG--
extra : rebase_source : afc25d91dfcabf6f8f5c9aca6828d41acac9e97e
This converts nsIMediaManagerService to use nsIArray rather than
nsISupportsArray. All usages of the interface are updated.
MozReview-Commit-ID: 1PLczEptf59
--HG--
extra : rebase_source : 069b6ec173bb98ab08d93279b5e983494184f8c0
Setting an empty view's visibility only for the view corresponding to the current PanelLevel was intended to make sure the empty view doesn't get hidden because of an unrelated status update - e.g. to prevent the history empty view hiding itself because the recent tabs count changes.
This approach however doesn't work for switching between panel levels (the user moving into and out of the sync/recent tabs folders) - in that case we always need to turn off the empty view of the previous panel level, which is not possible with the above approach.
So instead, we revert to always updating the visibility of the empty views, but at the same time initialise the desired state of current PanelLevel's empty view with its current visibility instead of simply defaulting to false.
MozReview-Commit-ID: 6Xsnuo29srk
--HG--
extra : rebase_source : d540c128df51ae0315f9ee05c3fb87cfcf44877a
This converts nsIMediaManagerService to use nsIArray rather than
nsISupportsArray. All usages of the interface are updated.
MozReview-Commit-ID: 1PLczEptf59
This allows us the use of VectorDrawable's (which can be created by converting SVG files) in a
limited set of circumstances.
MozReview-Commit-ID: 4n4dXnZYn9W
--HG--
extra : amend_source : 8fbf2579260590a26ecd0112d6fce1055e929bd7
Also this makes the gScreenWidth/gScreenHeight variables unused, so those can
come out too and the Window:Resize handler can be simplified a bit.
MozReview-Commit-ID: 96iF16jSKBB
--HG--
extra : rebase_source : 01db1de5cc548db107267d84dda5b774cd652883
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