Commit Graph
312 Commits
Author SHA1 Message Date
Matthew Wein 0cbf6ec98e Bug 1331742 - Part 4 - Add support for adding and removing browser actions from the main menu r=sebastian,walkingice
MozReview-Commit-ID: ITIan73eIlx
2017-05-16 13:43:35 -04:00
Jim Chen 8d4381582a Bug 1363167 - Remove GeckoInterface.getActivity; r=snorp
Use available Context or GeckoActivityMonitor to derive an Activity
instance, instead of using GeckoInterface.getActivity().

MozReview-Commit-ID: GHLMtnQkr2l
2017-05-15 23:11:11 -04:00
Randall Barker ac850dd756 Bug 1364194 - Refresh static toolbar snapshot when page width changes r=botond,jchen
MozReview-Commit-ID: HaQo66j640g
2017-05-15 11:30:09 -07:00
Jim Chen 7a262c95b9 Bug 1362195 - 4. Implement onFullScreen for GeckoApp/BrowserApp; r=snorp
Use a custom ContentListener for GeckoApp/BrowserApp that implements
onFullScreen to set full screen mode for the Activity.
2017-05-11 16:40:17 -04:00
Jim Chen ed8806835d Bug 1362191 - 2. Move shutdown to GeckoApplication; r=snorp
Move the code that actually performs shutdown from BrowserApp to
GeckoApplication, so we can shutdown even without an active BrowserApp.
From inside GeckoApp/BrowserApp, all shutdown now go through
finishAndShutdown(), which destroys the Activity before shutting down.
2017-05-11 16:39:30 -04:00
Nick Alexander 169f28cd80 Bug 1361418 - Remove Java Addons from Firefox for Android. r=sebastian
The Java Addons mechanism never got traction and is not Web Extensions
compatible.  Removing it simplifies the product and the build system.

MozReview-Commit-ID: ABUxkqqMISa
2017-05-02 11:49:16 -07:00
Nevin Chen fb1decd53f Bug 1356517 - Add deep links to handle events. r=Grisha
MozReview-Commit-ID: 4OQTrbEdVtQ
2017-04-25 18:01:34 +08:00
Jan Henning 7c7cb3cb0f Bug 1360743 - Part 1 - Ignore last selected tab in BrowserApp when opening a new tab through an intent. r=walkingice
When there's no more history to go back in an externally opened tab, we background the activity and close that tab. This means that some other tab gets selected instead, which could in theory trigger an activity switch if that tab is of a different type.

Because we're leaving the app, we don't want to actually launch a new activity, so now the currently selected tab might not match the last active GeckoApp (e.g. closing the last open Web App tab will select a normal tab). Therefore if the same activity is subsequently resumed again, we need to run the restoreLastSelectedTab() even if the "last active GeckoApp"-check doesn't trigger.

For BrowserApp however, this can conflict with session restoring/startup tabs/tabs opened from intents, because in that case we're going to select some other tab, anyway. We already ignore the "last selected tab within this activity" check when doing a full startup, so now we extend this behaviour to cover tabs loaded through onNewIntent() as well.

MozReview-Commit-ID: IDistdhwuZ5
2017-04-29 14:30:03 +02:00
Jan Henning afb9aa2df7 Bug 1360743 - Part 0 - Remove unneeded imports. r=walkingice
MozReview-Commit-ID: IfgzeaFmfOw
2017-04-29 14:21:38 +02:00
Jan Henning 832cf6a240 Bug 1352997 - Part 4 - Remember the tab selected by session restoring if somebody other than BrowserApp is starting up first. r=sebastian,walkingice
The first activity to run triggers Gecko startup and therefore session restore. Since the selected tab stored in the session file is only of interest for BrowserApp, we need to store it somewhere safe if some other activity (e.g. custom tab/web app) starts up first.

This is because currently everything needs to share the same Gecko browser window, so those other activities selecting a tab of their own when starting up will necessarily override session restore's tab selection.


MozReview-Commit-ID: 9GwTDbzgWF9
2017-04-08 19:15:19 +02:00
Jan Henning bcf91f0d9c Bug 1352997 - Part 3 - Re-implement tracking of last selected tab for BrowserApp. r=sebastian,walkingice
Currently, we basically take a snapshot of the currently selected tab when pausing an activity and then later re-select that tab ID when switching back from another activity within our application. In practice, this doesn't seem entirely fool-proof, so when switching between our normal UI (BrowserApp) and custom tabs or web apps we can eventually end up with the wrong tab being selected in the wrong activity.

In this part, we'll rip out the current code and replace it by a new implementation for BrowserApp - following parts will then cover custom tabs and web apps.

As BrowserApp is our normal tabbed browsing interface, we can simply track all tab switches for BROWSING-type tabs as they happen, which ensures that our data is always up-to-date.

Because tab IDs remain unique only within the same application session and are reused if we're terminated and then later restart, we need to take additional precautions to make sure we're really selecting the correct tab object - the savedInstanceState can carry even across (OOM-)kills. Therefore we now additionally also store and compare the current per-session UUID to make sure that the tab we're trying to select is really the same one it was when the activity was last running.

For BrowserApp caring about this is less important because on a full startup, the selection behaviour will be overridden by session restore anyway (although we can still hit it if only BrowserApp gets destroyed while Gecko keeps running, or if BrowserApp is launched after some other activity has already loaded Gecko), but it'll be quite relevant for web apps and custom tabs which don't have that benefit.

As it stands, this patch temporarily breaks behaviour around activity restoring for custom tabs/web apps, but tearing the old implementation out in one go was easier and the patch needs to be split somewhere.

MozReview-Commit-ID: I0Tq9XZGvpV
2017-04-08 22:55:10 +02:00
Jan Henning e420adebbe Bug 1352997 - Part 2 - Provide dedicated methods for typical homepage operations. r=sebastian,walkingice
That is figuring out whether a homepage has been set (but not caring about the specific page), or else getting the homepage URL with an automatic fallback (to about:home) if no homepage has been set.

MozReview-Commit-ID: D6Uy3A4P4Qc
2017-04-09 19:30:21 +02:00
Jan Henning 79ec803b38 Bug 1352997 - Part 1 - Register GeckoApp's onTabsChangedListener earlier. r=sebastian,walkingice
For BrowserApp we want to switch the last selected tab tracking to use tab selection events instead, so we need to register the listener earlier in order to catch the initial selection of the startup tab as well.

MozReview-Commit-ID: F7luIE6oNK
2017-04-08 11:16:13 +02:00
Jan Henning 4f418c3e10 Bug 1351739 - Part -1 - Housekeeping. r=sebastian,walkingice
MozReview-Commit-ID: Ev6jl4N3K0g
2017-04-07 20:51:41 +02:00
Randall Barker 11c2920ea2 Bug 1358554 - On Android devices that use static action bar prevent content from sliding down after a long press r=jchen
Only show real toolbar chrome for fixed action bar. Showing the static
snapshot causes the content to shift.

MozReview-Commit-ID: D4EN8qbe8Fu
2017-04-25 09:54:28 -07:00
Dale Harvey 6e14aa23b9 Bug 1355676 - Check for nulls when decoding icons. r=sebastian 2017-04-25 16:53:29 +01:00
Carsten "Tomcat" Book e4a38ceacf Backed out changeset 753e71053540 (bug 1331742) 2017-04-24 12:27:49 +02:00
Carsten "Tomcat" Book 63fbb13aec merge mozilla-inbound to mozilla-central a=merge 2017-04-21 10:57:02 +02:00
Jing-wei Wu 3492de4b9c Bug 1232439 - Part 3: Implement full-page bookmark edit dialog. r=ahunt,Grisha
MozReview-Commit-ID: 8wB9CEptVeu
2017-04-20 09:04:28 +08:00
Matthew Wein a118532668 Bug 1331742 - Part 4 - Add a position property to keep track of the menu item's position instead of using the ID r=sebastian
MozReview-Commit-ID: 7ZtfaVQFhKX
2017-03-25 22:35:54 -07:00
Wes Kocher b174ba68b3 Merge m-c to inbound, a=merge
MozReview-Commit-ID: HfJqvXF2Ux7
2017-04-20 15:55:31 -07:00
Randall Barker c955f482b1 Bug 1335895 - Android GeckoView Dynamic Toolbar Version 3 r=botond,dvander,jchen,kats
This version of the Dynamic Toolbar moves the animation of the toolbar
from the Android UI thread to the compositor thread. All animation for
showing and hiding the toolbar are done with the compositor and a static
snapshot of the real toolbar.

MozReview-Commit-ID: BCe8zpbkWQt
2017-04-20 15:15:14 -07:00
Carsten "Tomcat" Book 70857de759 Merge mozilla-central to autoland 2017-04-19 10:57:24 +02:00
Jim Chen 2d7457a413 Bug 1354911 - Guard against null menu item names; r=sebastian
Addons may give us invalid menu item names; bail instead of crashing in
such cases.
2017-04-18 17:42:58 -04:00
Julian_Chu 5eebd6f885 Bug 1352993 - Part 2, Add presenter class which response text-selection r=sebastian
To create new interface ActionModePresenter, a presenter could to
operate action-mode.

For pre-marshmallow Android version, we use ActionBar to provide UI
action for text-selection. Therefore BrowserApp will implement this
presenter for text-selection.

MozReview-Commit-ID: GdLB3ke2pYe
2017-04-18 18:12:43 +08:00
Julian_Chu 1aa55968bc Bug 1352993 - Part 1, Generalize ActionModeCompat r=sebastian
We want to reuse ActionBarTextSelection in more activities, so remove
custom classes from it, to make it easier to interactive with general
Andorid classes.

To achieve that
    * Let ActionModeCompat to be a subclass of ActionMode
    * Get rid of GeckoMenu

BrowserApp is the only one consumer for ActionModeCompat, and it do
understand the class type. We could move animateIn to it safely. After
doing this, TextSelectionActionModeCallback could become a general
ActionMode.Callback.

MozReview-Commit-ID: 7FTwDTe1JYG
2017-04-18 15:26:53 +08:00
Nevin Chen 0ef3091202 Bug 1352004 - Fix doorhangers missing background. r=sebastian
MozReview-Commit-ID: 6vrY17fYXD6
2017-04-10 18:13:47 +08:00
nechen aa8e0ccbf9 Bug 1293713 - Make new tab action respect HomePage preference. r=mkaply,sebastian
MozReview-Commit-ID: 9N7tLrr20nv
2017-03-13 16:13:18 +08:00
Michael Kaply 6a5f9160fe Bug 1348412 - Add dist specific menu for set as homepage. r=snorp
MozReview-Commit-ID: 1ipDDs4ZVAm
2017-03-27 17:05:22 -05:00
Jim Chen ace55be6f0 Bug 1321418 - Update menu items using the correct ID; r=sebastian
Regression caused by an incorrect ID used to update menu items.
2017-04-05 14:23:44 -04:00
Dale Harvey a629f01519 Bug 1347616 - Fall back to bookmark when manifest invalid. r=sebastian 2017-03-28 21:42:22 +01:00
Jan Henning 12ae52a4e4 Bug 1346004 - Part 2 - Tabs helper functions for searching next/previous tab should take the Tab type into account. r=sebastian
MozReview-Commit-ID: DRBjBrndDWW
2017-03-11 20:29:17 +01:00
Julian_Chu 2af17ff9a8 Bug 1337238 - Reuse some id resources in layout xml file r=sebastian
No need to create id resources for common widgets in each activities, e.g.
toolbar. Reuse id resources to make less ambiguous when invoking `findViewById`

In BrowserApp and CustomTabsActivity, both of them have ActionBar and
Progress-Bar. Let them use the same id resource.

MozReview-Commit-ID: 2jq18dwlBlm
2017-03-10 12:39:27 +08:00
Dylan Roeh 0568758ce4 Bug 1345267 - Check NEON compatibility in BrowserApp/GeckoApp.onCreate() and fail with an appropriate error message if necessary. r=jchen 2017-03-17 18:38:54 -05:00
Dale Harvey 09dba93fdd Bug 1336355 - Open webapps in new activity. r=sebastian 2017-03-15 15:39:01 +00:00
Wes Kocher 2b3321b10c Backed out changeset 0cbf58746cae (bug 1345267) under suspicion of causing android x86 chrome mochitest failures a=backout
MozReview-Commit-ID: CrUlU8uVeLx
2017-03-10 16:26:10 -08:00
Dylan Roeh c2a8f2356b Bug 1325021 - Set mDoorHangerPopup to null after destroying it. r=sebastian 2017-03-09 13:28:35 -06:00
Dylan Roeh cd4cb0c99b Bug 1345267 - Check NEON compatibility in BrowserApp/GeckoApp.onCreate() and fail with an appropriate error message if necessary. r=jchen 2017-03-10 10:29:31 -06:00
Tom Klein f4e311c28f Bug 1331154 - 7. Update the tab strip after tabs are moved in the tabs tray. r=sebastian
The tabs tray is drawn on top of the tab strip, not instead of it, so the tab
strip needs to be updated after tabs are moved in the tabs tray before the tab
strip becomes user-visible again.

This introduces a slight change in behavior: *if* a move (of a tab matching the
privacy state of the tab strip) occurs while the tabs panel is open, the tab
strip will be scrolled to the currently selected tab when the tabs panel is
closed - previously the tab strip maintained its old scroll position if a tab
wasn't closed or added while the tabs panel was open.

MozReview-Commit-ID: Ipy5huthNYB
2017-02-25 19:22:01 -06:00
Jim Chen 78ccd0611f Bug 1337467 - Convert observers to bundle events; r=rbarker r=sebastian
Bug 1337467 - 1. Convert "Window:Resize" observer to event; r=rbarker

Bug 1337467 - 2. Convert "ScrollTo:FocusedInput" observer to event; r=rbarker

Bug 1337467 - 3. Convert "Update:CheckResult" observer to event; r=sebastian

Also remove notifyCheckUpdateResult from GeckoInterface.

Bug 1337467 - 4. Convert "GeckoView:ImportScript" observer to event; r=sebastian

Bug 1337467 - 5. Convert accessibility observers to events; r=sebastian

Bug 1337467 - 6. Convert media/casting observers to events; r=sebastian

Bug 1337467 - 7. Convert "Sanitize:ClearData" observer to event; r=sebastian

Bug 1337467 - 8. Convert "Notification:Event" observer to event; r=sebastian

Bug 1337467 - 9. Convert BrowserApp observers to events; r=sebastian

Bug 1337467 - 10. Convert Tab observers to events; r=sebastian

Bug 1337467 - 11. Convert "Passwords:Init" and "FormHistory:Init" observers to events; r=sebastian

Bug 1337467 - 12. Convert Reader observers to events; r=sebastian

Bug 1337467 - 13. Convert Distribution observers to events; r=sebastian

Bug 1337467 - 14. Convert "Fonts:Reload" observer to event; r=sebastian

Bug 1337467 - 15. Convert RecentTabsAdapter observers to events; r=sebastian

Bug 1337467 - 16. Convert "Session:Prefetch" observer to event; r=sebastian

Bug 1337467 - 17. Convert "Browser:Quit" and "FullScreen:Exit" observers to events; r=sebastian

Bug 1337467 - 18. Convert SessionStore observers to events; r=sebastian

The "Session:NotifyLocationChange" observer is sent by browser.js and
requires passing a browser reference, so it's left as an observer.

Bug 1337467 - 19. Remove unused "Tab:Screenshot:Cancel" notifyObserver call; r=me

Bug 1337467 - 20. Convert "Session:Navigate" observer to event; r=sebastian

Bug 1337467 - 21. Convert "Locale:*" observers to events; r=sebastian

Bug 1337467 - Add log for unhandled events; r=me

Add back the log indicating no listener for an event, which can be
useful when reading logcat. r=me for trivial change.

Bug 1337467 - Don't return error from EventDispatcher when OnEvent fails; r=me

When a listener's OnEvent method returns an error, continue to dispatch
to other listeners and don't return an error from the dispatch function.
This avoids unexpected errors when dispatching events. r=me for trivial
patch.
2017-03-07 12:34:04 -05:00
Randall Barker b6d0ae6183 Bug 1344517 - Keep dynamic toolbar visible while page is loading r=kats 2017-03-06 14:01:46 -08:00
Carsten "Tomcat" Book dc21916166 merge mozilla-inbound to mozilla-central a=merge 2017-03-02 14:02:48 +01:00
Dylan Roeh 68a41fec08 Bug 1305815 - Issue EOL warning if non-NEON-compatible device detected. r=glandium 2017-03-01 13:26:12 -06:00
Tom Klein 8c1ad00722 Bug 1216489 - 3. Remove unnecessary touch intercept code for TabsPanel. r=sebastian
MozReview-Commit-ID: 7pf9GRLgHXg
2016-11-30 18:30:57 -06:00
Jan Henning 05d9f4c323 Bug 1337115 - Part 1 - Make "Is first run" pref generally useable. r=sebastian
This pref could be useful for things outside of the TelemetryCorePingDelegate as well, so we have it live in GeckoApp now.

MozReview-Commit-ID: 2JZ3vNqSzcl
2017-02-23 22:16:26 +01:00
Michael Kaply 8702aa26dd Bug 1332562 - OMA Downloads should go to the system Download directory. r=snorp
MozReview-Commit-ID: 48fGzGYBoS6
2017-02-23 12:27:43 -06:00
Michael Kaply 7e3ae86ebb Bug 1330714 - Allow distributions to override firstrun wizard. r=rnewman
MozReview-Commit-ID: 8vEqApRi9bC
2017-02-17 11:33:03 -06:00
Andrzej Hunt 7b889268ba Bug 1336084 - Remove unneeded isForegrounded() call r=sebastian
I accidentally added this while working on a fix for Bug 1120441,
and forgot to remove it before landing. This call isn't harmful,
but it's unnecessary.

MozReview-Commit-ID: FrnhoYWFvKR
2017-02-02 10:37:58 -08:00
Jim Chen efb7112fd1 Bug 1333590 - 2. Convert SearchEngine observers to events; r=sebastian
Convert the "SearchEngine:*" observers to events that go through
GlobalEventDispatcher.
2017-02-01 17:35:44 -05:00
Sebastian Kaspari b07d54df7e Bug 1334562 - DLC: Start study action from BrowserApp.onCreate() and never in automation. r=ahunt
Previously we started the DLC service from GeckoApplication. The reason for that was that we wanted to
download content like fonts as early as possible so that they are available the next time we display
a website.

However we do not know whether we are running in automation until the BrowserApp activity is launched.
This patch will start the service from BrowserApp.onCreate() now if we are not running in automation.

MozReview-Commit-ID: C3Ob6S3yve4
2017-01-30 17:41:38 +01:00