ReaderModeUtils.getUrlFromAboutReader() will return null if this is not a 100% valid reader mode
URL. However ReaderMoteUtils.stripAboutReaderUrl() will return the original URL if the reader mode
URL could not be "decoded".
MozReview-Commit-ID: J07Gkyq07JK
Using a set is bad since it will silently ignore multiple files with the same timestamp, resulting in crashes when
the set has fewer items than we expected. A list is probably the best choice in this instance.
(Note: I am not familiar enough with this code to know whether or not this is an expected situation, i.e.
whether or not timestamps should be unique.)
MozReview-Commit-ID: 5TRNLgTsSHO
Gecko could potentially send notifications via ShowAlertNotification (or any related method). It's possible
for this to happen very soon after launching Gecko, so we need to set the GeckoAppShell's notificationClient
before launching Gecko to ensure that it can handle notifications (this also avoids the associated crash - we
could try to do null-checks instead, but that would result in dropped notifications, which doesn't seem
useful).
MozReview-Commit-ID: 5MG8bBnt12M
Because of the smart folders and section headers, the adapter position needs to be appropriately adjusted when trying to access the corresponding cursor item.
MozReview-Commit-ID: n3FvcsYJ5T
Moving all vertically listed items into one RecylerView avoids the layouting issues encountered
with nested RVs. This results in a slightly more complex adapter, however overall this still
seems simpler than having to hack around the RecyclerView height measurements. (This also
makes the layout itself simpler, which hopefully means better performance too.)
MozReview-Commit-ID: HFS9q5JNYpY
Put presentation surface native methods in PMPM Instead of in
GeckoAppShell, and also make these methods work with multiple GeckoViews
by having them take a GeckoView parameter if necessary. This also lets
us eliminate the static nsWindow reference in nsWindow.cpp.
Asynchronous mode was not available until API level 21. To make it transparent to the caller, introduce a wrapper interface that mimics the new API.
MozReview-Commit-ID: 7idq2lQo35I
Replace old flags in WrapForJNI usages with new flags. The calledFrom
and dispatchTo flags are set based on whether the method is native or
non-native, and how the method is used.
Also fix testEventDipatcher to respect NativeJSObject's calledFrom =
"gekco" flag, by moving a test to Gecko thread.
WrapForJNI has some flags that are obsolete or confusing. Clean it up so
that there are fewer but more meaningful flags. Add a "calledFrom" flag
to indicate the intended calling thread and add a "dispatchTo" flag to
indicate where a method call may be automatically dispatched.
The "Tabs from last time" section of the "Recently closed" folder is only read from sessionstore.bak when the adapter is created and subsequently never updated.
To prevent those tabs from lingering around after clearing history, the history panel initially directly called the RecentTabsAdapter. To handle this in a more generic manner, we now have the RecentTabsAdapter listen for "Sanitize:Finished" notifications instead.
MozReview-Commit-ID: AADXHd5iDo2
We can't register both GeckoEventListeners and NativeEventListeners for the same event - since GeckoEventListeners are deprecated anyway, we should simply convert GeckoPreferences's "Sanitize:Finished" listener to a NativeEventListener, so as not to cause conflicts with the RecentTabsAdapter.
MozReview-Commit-ID: Dh3iXPQIJPC