This commit introduces a special type of a pin, "Activity Stream pin".
It's identified by a fixed position of -1. Activity Stream pins are displayed inline
with top sites, at the very front. They are "non-positioned", as opposed to regular pins
which have a position on Top Sites grid. This approach was selected (as opposed to creating a
new kind of a "non-positioned pins bookmark folder") because it is simpler, does not
involve any migrations or sync changes, and is thus preferred in light of a moving
target that is the current vision for Activity Stream.
Two types of pins, regular ones and Activity Stream pins, are independent of each other.
Due to the fact that pins and bookmarks are almost the same thing, we can only figure our,
based on the underlying queries, the following ahead of time:
- pinned state of a pinned top site item (trivial case)
- pinned state of a non-pinned top site item (trivial case)
- bookmark state of a "bookmarked" hightlight item (trivial case)
- bookmark state of a non-pinned top site item
For all other combinations, states have to be looked up when user opens a context menu for an item.
MozReview-Commit-ID: 3KbOp9S4Pz7
--HG--
extra : rebase_source : a86893a235ee7c6c7d2215b9c8a3b56f986480a9
Since we want to include pinned sites in A-S Top Sites, this removes the "plain top sites"
query which excludes pinned sites.
Maximum number of suggested sites displayed is set so that they will fill out at most two "pages".
MozReview-Commit-ID: 8uynmwiaPkt
--HG--
extra : rebase_source : 763633fca5f9f606a8f6cfd1f4a4332273c34dee
Convert JavascriptBridge, JavascriptTest, and other relevant code to use
the new Bundle events. We used the same "Robocop:JS" event for
communicating both ways before, but now that we have a unified bus, we
need two different events, "Robocop:JS" and "Robocop:Java" for two-way
communication.
Convert events that are only used in robocop tests to Bundle events,
which are then used through Actions.expectGlobalEvent /
expectWindowEvent.
"Content:" prefix is added to "DOMContentLoaded" to follow the event
naming convention.
SelectionHandlerTest.java is removed because it's no longer used
anywhere.
This results in the highlights title smoothly animating upwards with the remaining RecyclerView items.
Previously RV would crossfade between a panel containing both the welcome message AND the highlights
title, which means the Highlights title would vanish and reappear. This patch results in a more
correct and pleasing animation. We also upgrade to using a ViewStub for the welcome panel as part of
this commit.
MozReview-Commit-ID: GYxrSiqKeS5
--HG--
extra : rebase_source : d766347b74971874a28062b48cdf2a2880031608
Converting this image to webp results in artifacts on the rectangle, therefore
we can only try to minimise its size by removing the alpha channel. (All other
firstrun images will be converted to webp as they do not display these artifacts
after conversion.)
MozReview-Commit-ID: EdAgdfHna8C
--HG--
extra : rebase_source : 21a483c304607d6fd3876ddd52e14376c771578f
Bug 1321418 - 1. Use GekcoBundle events in GeckoApp; r=snorp r=sebastian
Switch GeckoApp to using GeckoBundle events everywhere. UI or Gecko
events are used if the event requires the UI or Gecko thread,
respectively, and background events are used for all other events.
There are changes to some other Java classes, such as SnackbarBuilder
and GeckoAccessibility, due to the switch to GeckoBundle.
For "Snackbar:Show", we need the global EventDispatcher because the
event can be sent to both GeckoApp and GeckoPreferences. Howveer, we
only want one listener registered at the same time, so we register and
unregister in GeckoApp's and GeckoPreferences's onPause and onResume
methods.
Bug 1321418 - 2. Use appropriate JS EventDispatcher to send GeckoApp events; r=snorp r=sebastian
Change JS code that sends events to GeckoApp to use either the global
EventDispatcher or the per-window EventDispatcher.
"Session:StatePurged" is not used so it's removed. "Gecko:Ready" in
geckoview.js is not necessary because it's only used for GeckoApp, so
it's removed from geckoview.js.
Bug 1321418 - 3. Use GeckoBundle events in BrowserApp; r=snorp r=sebastian
Switch BrowserApp to using GeckoBundle events, in a similar vein as
GeckoApp. UI or Gecko events are used if the event handlers required UI
or Gecko thread, respectively, and background events are used for all
other events.
Some other Java classes also have to be modified as a result of
switching to GeckoBundle.
Bug 1321418 - 4. Use global EventDispatcher to send BrowserApp events; r=snorp r=sebastian
Change JS code that sends events to BrowserApp to use the global
EventDispatcher instead of "Messaging".
Bug 1321418 - 5. Update usages of events in tests; r=gbrown
Update cases where we use or wait for events in tests.
Add expectGlobalEvent, expectWindowEvent, sendGlobalEvent, and
sendWindowEvent to the Robocop Actions interface, along with changes to
EventExpecter, to support GeckoBundle events on Gecko, UI, and
background threads.
Changing the setting currently won't take effect until you rotate the tabs
panel (to cause it to be recreated); that will be fixed in the next commit.
MozReview-Commit-ID: HZfQRy8zubV
--HG--
extra : rebase_source : 78c3606eb55146afe3d59b0cdfa623999f09796b
- move all buffer related code from the Callbacks class to (Input|Output)Pocessor
- don't implicitly release output buffer to codec. Do it when client calls releaseOutput()
- fix buffer management problem in reset()
- minor code formatting issue
MozReview-Commit-ID: FmMjFBQax0s
--HG--
extra : rebase_source : 88fcaa58fe1cae1a8603bdbce2ad0cd6c6f7a21e
%l seems to be for hour in 12hr clock (i.e. 1-12), but we're applying it to a filesize.
%d seems more appropriate in order to display the actual raw filesize.
MozReview-Commit-ID: AKTpYndm81o
--HG--
extra : rebase_source : 4107bd4ebbe6169ecd3823b2613099bb73ae81a1
Fix a crash in GeckoBundle.fromJSONObject due to wrong values array
type. Also, fix a bug where the first element of a converted array is
repeated. r=me for trivial patch.
In general, any code that was using nsIX509Cert.nickname should be able to use
the attribute displayName (if using nickname for display purposes) or the
attribute dbKey (if using nickname as a unique identifier for a certificate).
MozReview-Commit-ID: G9CfMJDfLqe
--HG--
extra : rebase_source : 1c464dab8f028568cedd5a42cf87428b8bb63fc0
A subtest's cleanup function only runs at the very end, after *all* subtests have finished. This means that we cannot use it to close the test tabs if we want to reuse the tab variables during following subtests. If we did, we'd be leaking those previous tabs, meaning they remain open at the end of the test and cause possible problems for following tests as well as lots of "Unable to restore focus" messages in the log.
MozReview-Commit-ID: H87JQ5gcIAg
--HG--
extra : rebase_source : 5e870acba4c8ee05557f1ac0175bda12606b4e28