Граф коммитов

23359 Коммитов

Автор SHA1 Сообщение Дата
Ryan VanderMeulen acb2f518fc Merge inbound to m-c. a=merge 2017-05-19 11:46:56 -04:00
Wes Kocher e9b5549946 Merge m-c to autoland a=merge
a=release IGNORE BAD COMMIT MESSAGES
2017-05-19 15:21:13 -07:00
cnevinc e20c89db7b Bug 1351585 - Part 3. Add proguard for leanplum. r=maliu
MozReview-Commit-ID: L2wpreGGYDP

--HG--
extra : rebase_source : f2852989744e1bce0ee77a94eba92891acc9b256
2017-05-13 13:37:27 -07:00
cnevinc e272eb73ae Bug 1351585 - Part 2. Add build flag and change our existing build system to inject leanplum implementation r=nalexander
MozReview-Commit-ID: uN7imeGYcj

--HG--
extra : rebase_source : 215b3c9b2df20d2fbc5f8679568509c3cc430a48
2017-05-13 14:08:57 -07:00
cnevinc bd3cffad0a Bug 1351585 - Part 1. Add Leanplum SDK source code to thirdparty module r=maliu
MozReview-Commit-ID: 6r7ZGpAww2n

--HG--
extra : rebase_source : 66659717f9e5815f9f4ea0f1e5534b5ae2cc93ed
2017-05-13 14:05:09 -07:00
Mike Hommey 282a2bc3b8 Bug 1363811 - Replace is_nightly with milestone.is_nightly. r=cmanchester+432261
And remove is_nightly.
2017-05-19 07:05:05 +09:00
Mike Hommey a79246698a Bug 1365477 - Use default=is_nightly instead of default=delayed_getattr(...). r=chmanchester
Per bug 1363811 comment 1, it's actually a bug that the linter doesn't
complain about it like it did in bug 1358215.

--HG--
extra : rebase_source : 68f0d022fb4f2c4e2de38edbafa314db42b7e103
2017-05-17 12:08:33 +09:00
Matthew Wein 880ae24e61 Bug 1360448 - Only ignore OPTIONS_TYPE_INLINE_BROWSER instead of ignoring all types which aren't OPTIONS_TYPE_INLINE r=mixedpuppy
MozReview-Commit-ID: Ks3Yryy22lL

--HG--
extra : rebase_source : 7708bddba429871ca02a894fca4e8f1b452ad12c
2017-05-10 22:54:40 -04:00
Shih-Chiang Chien 0131b8b831 Bug 1363421 - Part 2, delay the initialization of UserAgentOverrides.jsm until first nsHttpChannel is created. r=mcmanus
UAOverridesBootstrapper.js is introduced to delay the initialization of
UserAgentOverrides.jsm until the creation of the first nsHttpChannel.
Uninit will be triggered at profile-change-net-teardown because no network
traffice after this point.


MozReview-Commit-ID: F8Lpn6RyZEm

--HG--
extra : rebase_source : 7c3649b50ad8594dc0968961fbbd2766d0d98b0a
2017-05-16 12:11:12 +08:00
maliu 38e1603a4d Bug 1357356 - Open aurora transition page once user upgrade from aurora to nightly, r=sebastian
MozReview-Commit-ID: HEV06stuwm5

--HG--
extra : rebase_source : 19fb67225efb1b32de81c4132003760fa4d08ba6
2017-04-20 19:10:49 +08:00
Ryan VanderMeulen 96eca59299 Merge m-c to autoland. a=merge 2017-05-19 12:26:48 -04:00
Jan Henning 1a9dd92127 Bug 1363049 - getNextTab() should only use parent tabs of the same type. r=walkingice
That is if the currently selected tab has a web app or custom tab as its "parent tab", we'll ignore that fact when the tab is closed from the tabs tray, so we don't trigger an activity switch that way.

MozReview-Commit-ID: 7bOi90RQUhA

--HG--
extra : rebase_source : 5c658818bc0cf7b1ace0da7b6d306146ac3cf2b6
2017-05-18 20:45:22 +02:00
Sebastian Hengst aafad4390c Backed out changeset 86af05828caf (bug 1358946) for Android bustage in SafeIntent.java. r=backout 2017-05-18 13:54:07 +02:00
cnevinc edd2beae07 Bug 1358946 - Strip about:reader in intent data uri. r=maliu
MozReview-Commit-ID: AQ8txBAbtUr

--HG--
extra : rebase_source : 96f9a73ced0a0a8d948e8fe89f3e15fc9780b9d6
2017-05-05 13:24:51 +08:00
Alastor Wu 0e2e3db05b Bug 1364028 - enable specific robocop tests on Autophone. r=bc
robocop_autophone.ini
- it's used to test Adobe Flash issue only

robocop_autophone2.ini
- it's used to test other kinds of Robocop tests

MozReview-Commit-ID: KPniwy7rLJm

--HG--
extra : rebase_source : a82f7845b945a70da11587aec8acf78fc880cc8b
2017-05-18 11:02:33 +08:00
Iris Hsiao 77020e4e53 merge mozilla-inbound to mozilla-central a=merge 2017-05-18 12:05:45 +08:00
Jim Chen 65efbc986a Bug 1360321 - 7. Add AArch64 check to Fennec hardware checks; r=snorp
Add checks for "arm64-v8a" when we check for supported platforms.

MozReview-Commit-ID: IHklaZ7Q6BD
2017-05-17 13:06:23 -04:00
Matthew Wein 6aa68e4cef Bug 1331742 - Part 5 - Add unit tests for browserAction.onClicked r=mixedpuppy
MozReview-Commit-ID: DE7me6moxG

--HG--
extra : rebase_source : dd0b513348cfeea823aac0042a02ffb90299ccc2
2017-05-12 15:02:11 -04:00
Matthew Wein 5fe0c9b091 Bug 1331742 - Part 4 - Add support for adding and removing browser actions from the main menu r=sebastian,walkingice
MozReview-Commit-ID: ITIan73eIlx

--HG--
extra : rebase_source : d7a8797e115cdb8aea8536b89b1744ec802f8176
2017-05-16 13:43:35 -04:00
Matthew Wein e76ac278d6 Bug 1331742 - Part 3 - Create and register ext-browserAction.js r=mixedpuppy
MozReview-Commit-ID: CGR4689b6oo

--HG--
extra : rebase_source : 03a6961a6a2032048b465bc80395b4cdbe5c4cc7
2017-05-11 14:46:10 -04:00
Matthew Wein 3e6613bfb0 Bug 1331742 - Part 2 - Create a module for managing browser actions similar to PageActions.jsm r=sebastian
MozReview-Commit-ID: 2epdMD75e84

--HG--
extra : rebase_source : 7ba699ee966f4fb2e495592f45bc4c612e4a6070
2017-05-11 14:41:33 -04:00
Julian_Chu f0fad4d644 Bug 1366648 - Fix reload button color problem r=sebastian
configuration: Nexus 5 + Android Hammerhead 5.1.1 LMY48M

In CustomTabsActivity, the menu reload-button use a LevelListDrawable.
On some configurations, icon's state won't be set to Enabled by system, hence
the color of icon is incorrect. We have to enable it manually.

MozReview-Commit-ID: JB9t35OyatY

--HG--
extra : rebase_source : e0750f6b76ea25a6abcb5d1375aa1468522f0da4
2017-05-23 11:13:06 +08:00
Michael Kaply b19ff2b4a2 Bug 1367201 - Add MOZ_ANDROID_MOZILLA_ONLINE build flag to support MozillaOnline (Mozilla China) custom code. r=nalexander
MozReview-Commit-ID: BB0dcmLez0w

--HG--
extra : rebase_source : d14a9094a3e8a6008f86fcb4d5efc1af6b0bbb24
2017-05-23 15:36:10 -05:00
udara cd5f595a60 Bug 1367533 - Remove extra error logging during device disconnect on Android. r=eoger
MozReview-Commit-ID: wonLHOwwzP

--HG--
extra : rebase_source : 01a0723c88de1f45c57e0a8576f3f8e8304d5fec
2017-05-24 15:47:57 -04:00
Jan Henning 85451c5c8e Bug 1349155 - Show message when clearing user data on shutdown. r=sebastian
Properly clearing data (history etc.) when shutting down via "Quit" can introduce a possibly noticeable delay (up to the order of a few seconds in bad cases) before the UI actually closes. This patch shows a snackbar for this case, so we don't give users the impression of simply randomly hanging during shutdown.

MozReview-Commit-ID: AqYw8qK8xol

--HG--
extra : rebase_source : 3a1f650dd27ef07ec7eb21dc511decbd94c0a99c
2017-03-26 18:41:09 +02:00
Matthew Wein d17da2598c Bug 1331742 - Part 1 - Create and register browser_action.json r=mixedpuppy
MozReview-Commit-ID: AwYuTDU3Ki4

--HG--
rename : browser/components/extensions/schemas/browser_action.json => mobile/android/components/extensions/schemas/browser_action.json
extra : rebase_source : ed0a23cc73908361dfede3f6ed9e0c8d6ecfb5be
2017-03-15 21:02:56 -04:00
Mike Hommey a8b3b97bc4 Bug 780562 - Stop relying on the "platform" chrome flag for global-platform. r=bsmedberg
The "platform" chrome flag requires an irrelevant "content" chrome
manifest entry, while it's only used for locales. It only has exactly
one use, which can actually be replaced by uses of the "os" flag.

Note, we're doing something similar with the "os" flag for skins in
e.g. browser/extensions/pocket/jar.mn.

Unfortunately, for determinism reasons, the chrome manifest entries from
jar.mn are sorted (per bug 982075), so keeping global-platform/unix
would leave it appearing after /mac, and would override it on mac
because of the lack of "os" flag on the /unix entry (we can't put "os"
flags on that entry because we can't do something like os!=Darwin &&
os!=WINNT). So we move it to /gtk such that it always comes before /mac.

--HG--
extra : rebase_source : aaace8147ea54f74aef8a7b2314ad022e9f9be23
2017-04-14 20:44:35 +09:00
Carsten "Tomcat" Book e83697008e merge mozilla-inbound to mozilla-central a=merge 2017-05-16 15:04:38 +02:00
Iris Hsiao 9a2799794a Backed out 4 changesets (bug 1343912) for test_timer_flood.html perma-failing
Backed out changeset b2a7fe15c578 (bug 1343912)
Backed out changeset 69a33656f4a3 (bug 1343912)
Backed out changeset f370c47abb14 (bug 1343912)
Backed out changeset 7ff1878374dd (bug 1343912)
2017-05-16 17:43:57 +08:00
Jim Chen 76a5c980cb Bug 1363567 - 3. Remove GeckoInterface.getPluginContainer; r=me
GeckoInterface.getPluginContainer is no longer used anywhere and can be
removed. r=me for trivial patch.

MozReview-Commit-ID: 2IoQPqecWus
2017-05-15 23:11:18 -04:00
Jim Chen 3858e8e18e Bug 1363567 - 2. Move onFullScreenPluginHidden to GeckoApp; r=rbarker
Move the native call onFullScreenPluginHidden from GeckoAppShell to
GeckoApp itself.

MozReview-Commit-ID: APhGRBTNl0X
2017-05-15 23:11:18 -04:00
Jim Chen d0aff50e27 Bug 1363567 - 1. Remove addPluginView/removePluginView methods; r=rbarker
Remove the addPluginView and removePluginView methods from
GeckoInterface. Instead, move the JNI calls directly to GeckoApp itself.
GeckoApp then uses GeckoActivityMonitor to find the current activity,
instead of using GeckoAppShell.getGeckoInterface().

MozReview-Commit-ID: 7ym8kuElADV
2017-05-15 23:11:17 -04:00
Jim Chen 3f65d0de71 Bug 1362192 - Remove GeckoInterface.getDefaultUAString; r=snorp
Move GeckoInterface.getDefaultUAString() to GeckoApplication.

MozReview-Commit-ID: FHsRrbiqJ3F
2017-05-15 23:11:17 -04:00
Jim Chen e53a5e57a0 Bug 1325112 - 2. Purge caches in debug geckoview_example; r=rbarker
Preload Gecko with the "-purgecaches" flag in debug builds of
geckoview_example, similar to what we do for Fennec.

MozReview-Commit-ID: dBZgBbDUQ9
2017-05-15 23:11:17 -04:00
Jim Chen cf5d7c70ea Bug 1325112 - 1. Remove GeckoInterface.isOfficial; r=nalexander
There are two callers of isOfficial() in GeckoThread. For purging the
startup cache, the code to add the extra argument is moved to
GeckoApplication/GeckoApp/GeckoService. For logging the arguments, the
"debug" flag is used instead of the "official" flag.

MozReview-Commit-ID: 9atEWY1MVVt
2017-05-15 23:11:17 -04:00
Jim Chen c0ecba00ed 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
Jim Chen 7f18399feb Bug 1362231 - Remove GeckoInterface.getProfile; r=snorp
Since we only support one profile per process, replace all calls to
GeckoInterface.getProfile() with calls to GeckoThread.getActiveProfile().

MozReview-Commit-ID: 9PZOoBZt7Er
2017-05-15 23:11:10 -04:00
Nick Alexander 14dd745141 Bug 1365060 - Move MOZ_{NATIVE_DEVICES, INSTALL_TRACKING} to moz.configure. r=chmanchester
This intentionally allows to set MOZ_INSTALL_TRACKING without
reference to the milestone being release or beta.  That is, we
separate the default value (which depends on release or beta) from the
value specified, making life easier for developers.

MozReview-Commit-ID: 3vPF7KO7fEX

--HG--
extra : rebase_source : 8d5764104b5322a32e4a048bfd3222f62fed73bb
2017-05-15 14:37:54 -07:00
Ben Kelly b0626b4ff1 Bug 1343912 P3 Remove fixed limit on maximum consecutive timeout handlers to execute. r=ehsan 2017-05-15 11:58:51 -07:00
Randall Barker 962808afbf 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
James Willcox 2d93d7d835 Bug 1322650 - Adjust Android Flash support to API changes r=jchen
MozReview-Commit-ID: CmMINaGcTER
2017-05-15 09:37:52 -05:00
James Willcox b69402b0ba Bug 1322650 - Make video decoding work with new SurfaceTexture API r=jolin 2017-05-15 09:37:49 -05:00
James Willcox 395ab599a1 Bug 1322650 - Use SurfaceTexture for WebGL on Android in E10S r=jgilbert
The main advantage here is that it works cross-process.

MozReview-Commit-ID: 7YUTVB4Bydg
2017-05-15 09:37:44 -05:00
James Willcox 5de9b3dc5f Bug 1322650 - Add GeckoSurfaceTexture, GeckoSurface and associated Android Service r=jchen
This allows us to allocate an Android SurfaceTexture in the compositor process as well
as an accompanying Surface. We can then transfer the Surface back to the content process
via binder, where it can be used for things like WebGL and video decoding.

Each SurfaceTexture/Surface pair has a unique handle. We use this handle in
layer transactions to locate the SurfaceTexture for a given Surface and composite it
appropriately.

MozReview-Commit-ID: 68VSbXdfsMH
2017-05-15 09:37:43 -05:00
Honza Bambas d6d727a69e backout of f9abb9c83452 (bug 1319111) for crashes, r=bz 2017-05-13 13:55:11 +02:00
Wes Kocher 0a1e1fe23b Backed out changeset 95ff98f1c2e5 (bug 1319111) for talos failures a=backout
MozReview-Commit-ID: Gs09moFm5rQ
2017-05-12 18:24:42 -07:00
Randall Barker 39225e3f07 Bug 1364267 - Prevent Android gamepad from dropping axis values r=ted
MozReview-Commit-ID: 3G5xwPKD4mq
2017-05-12 15:55:32 -07:00
Jonathan Guillotte-Blouin 93c09b12e6 Bug 1270740 - Remove requestAutocomplete from toolkit/. r=mattn
MozReview-Commit-ID: 7cAWbAWZ2if

--HG--
extra : rebase_source : 53242ac9783f4c40e66a0ffd6b4f6f14e1a2dd63
2017-05-11 14:58:10 -07:00
Alastor Wu 66292f5573 Bug 1367295 - remove waitUntilTabMediaStarted(). r=sebastian
After bug1364202, we should use checkIfMediaPlayingSuccess(), checkTabMediaPlayingState()
or checkTabAudioPlayingState to check the tab's state, because these methods use
waitForCondition() instead of the EventExpecter.

If the test file is audible, we could use checkIfMediaPlayingSuccess() because
it would check both "media playing" and "audio playing" states.

If the test file is non-audible, we should use checkTabMediaPlayingState() to
ensure the media started playing successfully.

MozReview-Commit-ID: 6kOiglHBwch

--HG--
extra : rebase_source : 931d0e24ee0946e9e61bd987be06ea7353a1e507
2017-05-24 14:11:38 +08:00
Honza Bambas 70f62bdec1 backout of f9abb9c83452 (bug 1319111) for crashes, r=bz 2017-05-12 22:13:49 +02:00
Iris Hsiao e22349b74b Backed out 11 changesets (bug 1322650) for media test failures on android. a=backout
Backed out changeset 31bd912fba54 (bug 1322650)
Backed out changeset 4d486c7469eb (bug 1322650)
Backed out changeset 4cf8f4d5064c (bug 1322650)
Backed out changeset 3cb108f7492f (bug 1322650)
Backed out changeset bd53533c108e (bug 1322650)
Backed out changeset 3522917d8f10 (bug 1322650)
Backed out changeset 2c2c1e33eccc (bug 1322650)
Backed out changeset 2f19977cd6ab (bug 1322650)
Backed out changeset 4519296a323e (bug 1322650)
Backed out changeset e56e5e1c8786 (bug 1322650)
Backed out changeset 96fe52231b57 (bug 1322650)

--HG--
extra : amend_source : b11d2181d8f545f4ed1074f09986eddab0b637c8
2017-05-12 10:21:14 +08:00
Wes Kocher 3b736de62a Merge m-c to inbound, a=merge
MozReview-Commit-ID: ADbja7mAY4s
2017-05-11 17:41:11 -07:00
Jim Chen 2afb2c2ce7 Bug 1362195 - 6. Implement onFullScreen for geckoview_example; r=me
Follow-up to implement onFullScreen for geckoview_example's
implementation of ContentListener. r=me for trivial patch.
2017-05-11 18:24:32 -04:00
James Willcox 8069ecfcd6 Bug 1322650 - Adjust Android Flash support to API changes r=jchen
MozReview-Commit-ID: CmMINaGcTER
2017-05-11 15:42:44 -05:00
James Willcox 0f332539ae Bug 1322650 - Don't use inout param for Surface in ICodec r=jolin
It's unnecessary, and the serialization goes wrong with GeckoSurface on the return trip.

MozReview-Commit-ID: 9DUMoLQFhlv
2017-05-11 15:42:43 -05:00
James Willcox 31b30cd5c9 Bug 1322650 - Make video decoding work with new SurfaceTexture API r=jolin
MozReview-Commit-ID: EXQ5YDSMMGL
2017-05-11 15:42:43 -05:00
James Willcox ad1995d388 Bug 1322650 - Use SurfaceTexture for WebGL on Android in E10S r=jgilbert
The main advantage here is that it works cross-process.

MozReview-Commit-ID: 7YUTVB4Bydg
2017-05-11 15:42:42 -05:00
James Willcox 2372095708 Bug 1322650 - Add GeckoSurfaceTexture, GeckoSurface and associated Android Service r=jchen
This allows us to allocate an Android SurfaceTexture in the compositor process as well
as an accompanying Surface. We can then transfer the Surface back to the content process
via binder, where it can be used for things like WebGL and video decoding.

Each SurfaceTexture/Surface pair has a unique handle. We use this handle in
layer transactions to locate the SurfaceTexture for a given Surface and composite it
appropriately.

MozReview-Commit-ID: 68VSbXdfsMH
2017-05-11 15:42:42 -05:00
Jim Chen 04c08fbf1d Bug 1362195 - 5. Remove GeckoInterface.setFullScreen; r=me
Remove GeckoInterface.setFullScreen now that it's no longer used. r=me
for trivial patch.
2017-05-11 16:40:18 -04:00
Jim Chen 2edd8463c6 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 044b6b9b8c Bug 1362195 - 3. Call onFullScreen for full screen changes; r=snorp
Send an event from nsWindow to GeckoView when we enter/exit full screen
mode, and call ContentListener.onFullScreen to notify the implementer.
2017-05-11 16:40:17 -04:00
Jim Chen 1137640d64 Bug 1362195 - 2. Add onFullScreen to GeckoView.ContentListener; r=snorp
Add the onFullScreen method to GeckoView.ContentListener to handle
entering and exiting full screen mode.
2017-05-11 16:40:17 -04:00
Jim Chen 18c0a5d9ca Bug 1356698 - Use application context in AndroidGamepadManager; r=snorp
Use application context in AndroidGamepadManager to avoid crash when
trying to use GeckoAppShell.getContext() in content process.
2017-05-11 16:39:30 -04:00
Jim Chen 7785e0c15b Bug 1362191 - 4. Remove GeckoInterface.doRestart; r=me
Remove GeckoInterface.doRestart now that it's no longer used.
2017-05-11 16:39:30 -04:00
Jim Chen 05c9cfa565 Bug 1362191 - 3. Remove GeckoAppShell.scheduleRestart; r=snorp
GeckoAppShell.scheduleRestart was called from XPCOM toolkit when we
needed to restart after the Gecko thread exits. But because we made the
"Gecko:Exited" event contain a "restart" flag, we can handle that
entirely in Java now, so we don't need to call
GeckoAppShell.scheduleRestart anymore.
2017-05-11 16:39:30 -04:00
Jim Chen 2a44ba08f8 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
Jim Chen 87eb61480f Bug 1362191 - 1. Add "restart" flag for "Gecko:Exited" event; r=snorp
In the GeckoBundle data for the "Gecko:Exited" event, indicate whether
we should restart or not through the "restart" flag.
2017-05-11 16:39:29 -04:00
James Cheng 8c2476a913 Bug 1363994 - Use the same implementation of isAdaptivePlaybackSupported in LollipopAsyncCodec and JellyBeanAsyncCodec r=jolin
MozReview-Commit-ID: EWV1t0gdq8V

--HG--
extra : rebase_source : 30abbe44e9563182e4996bf2ec97e50b1b517c22
2017-05-11 16:12:55 +08:00
Alastor Wu ddde8e903b Bug 1351087 - part2 : add tests. r=sebastian
Add test for handling the cases, media with silent audio track and media without audio track.

MozReview-Commit-ID: 5vV9EjIjHQt

--HG--
extra : rebase_source : 37fccc055479a40fd802107ccdc45d11d11c1852
2017-05-09 14:10:46 +08:00
Jan Henning 925872d78e Bug 1360287 - Factor out history/tabs data purging into separate function to reduce session store observer complexity. r=sebastian
MozReview-Commit-ID: IhxMfUKEDgh

--HG--
extra : rebase_source : 4acce54322d85453722ec8a4a4a26f29a0a0252d
2017-05-10 23:55:26 +02:00
Jan Henning cd5c783e09 Bug 1253647 - Part 1 - Don't show page URL title on add-on restart doorhanger. r=sebastian
When a non-restartless add-on is (un)installed or updated, we show a doorhanger prompting the user to restart. Currently, the doorhanger's title is using the default logic for choosing its title, that is using the base domain of the tab the doorhanger is being displayed on.

By chance, when the doorhanger is triggered from about:addons there is no domain to display, so the doorhanger is just displaying the restart notification. If however an add-on is automatically updated while the user is browsing, then the restart prompt will show the domain of the currently open tab in conjunction with the restart message. This can be confusing for the user, as it looks like it was in fact the current page that triggered the restart prompt.

Therefore, we change this behaviour and just show a generic "Add-ons" as title for this case.

MozReview-Commit-ID: 3pMwSiLul99

--HG--
extra : rebase_source : 3c11fe19c5cef42226a849b78d554fa846114bfa
2017-05-10 22:24:14 +02:00
Jan Henning 5c67890d3a Bug 1253647 - Part 0 - Clean up imports. r=sebastian
MozReview-Commit-ID: F96sw4Xhn93

--HG--
extra : rebase_source : 94c3bfec96c3d7a1f0c6aa3088766fd345248e47
2017-05-10 22:03:58 +02:00
Jan Henning 3ff6d827ad Bug 1363321 - Part 2 - Reset crash loop counter after a presumably succesful startup. r=jchen
At the moment, our crash loop counter that turns off session restoring when multiple crashes happen in a row is reset only after a successful background-foreground cycle.

Since its purpose is to break out of startup crash loops caused by the currently loaded tab that is automatically loaded after starting the app, it makes sense to also reset it if we didn't crash soon after starting up. Otherwise, if the user remains within Firefox, another crash long after starting would still count towards the crash loop counter.

Desktop already employs a similar logic for deciding whether to automatically enable safe mode or not after a crash. Therefore, we use the same amount of time (30 s) after starting Gecko for resetting the counter.

We also take the opportunity to make our logic a bit more conservative and only turn off session restoring after two successive crashes in a row (desktop uses 3 by default).

MozReview-Commit-ID: CQDutkDgmfc

--HG--
extra : rebase_source : e3100394772bcebb64610dcadfd77676119e1de1
2017-05-09 23:12:54 +02:00
Jan Henning 02495c3a98 Bug 1363321 - Part 1 - Always copy crash restore settings to Java on startup. r=jchen
Those settings need to be stored in our shared preferences since they're needed before Gecko is available, however in order to allow them to be easily configured, we also expose them in about:config and sync them to the shared prefs via a change listener.

This however means that changes in the *default* value of those prefs won't be picked up. Therefore we now simply unconditionally copy the setting state into the shared preferences on startup and omit the change listener instead, as they're exposed in about:config only and there is in fact no pressing need for changes there to immediately take effect.

MozReview-Commit-ID: 7c950F1nkdj

--HG--
extra : rebase_source : 4be6e5124294a71b5d214b9ab10ada4e88aee3bb
2017-05-10 20:20:50 +02:00
Ted Mielczarek 9bcc883e51 bug 1357622 - update sccache to rev d3aa1116844b50c03015266d2f48235509fa7deb to pick up a fix for build failures. r=mshal
MozReview-Commit-ID: 8ixs6rYnE08

--HG--
extra : rebase_source : b4c315007cfb6c03e6534e381f6231d6c9bab54a
2017-05-09 09:12:26 -04:00
Alastor Wu ec04439c81 Bug 1357633 - part2 : add tests. r=sebastian
Based on bug1357639, add new test tasks.

MozReview-Commit-ID: 9k8ZkF00MwG

--HG--
extra : rebase_source : 36d86b23aba376e1c138e06623a9ad5bc8ebec8e
2017-05-10 23:43:14 +08:00
James Cheng b43da59473 Bug 1362918 - Extend the blacklist to cover certain Galaxy S4 models. r=jolin
MozReview-Commit-ID: WZFON3SBvU

--HG--
extra : rebase_source : 36c13d76546ca231a88ebb36d0a3e33c5fbf75dd
2017-05-08 11:56:56 +08:00
Jing-wei Wu 06f1e7cc9f Bug 1329128 - Part 2: Implement create bookmark folder page. r=ahunt,Grisha
MozReview-Commit-ID: JtSklBDUq7L

--HG--
extra : rebase_source : bb59a0974f6b56ff9630181c3d8345ffe5cbfaf1
2017-05-05 00:56:55 +08:00
Jing-wei Wu 88e8de85ed Bug 1329128 - Part 1: Implement the functionality of remove bookmark folder in BrowserProvider. r=Grisha
MozReview-Commit-ID: GQfM4Z9zU2x

--HG--
extra : rebase_source : 41ad92ab139214f900e6b70e8fc9972adb0f0d72
2017-05-02 17:52:55 +08:00
Jing-wei Wu e1fe7cc7e3 Bug 1329131 - Part 2: Implement selecting bookmark folder page. r=Grisha
MozReview-Commit-ID: 6uEC9iauvZj

--HG--
extra : rebase_source : fd022ccdc3841c697aef7e5b2305afd04fd1ab5e
2017-04-24 00:41:46 +08:00
Jing-wei Wu a381669023 Bug 1329131 - Part 1: Implement the functionality of listing all bookmark folders except special folders. r=Grisha
MozReview-Commit-ID: AK79E6kkXFI

--HG--
extra : rebase_source : 2f3730fd29c4d304342e631cb4a4f9289fe15ce5
2017-04-21 18:31:03 +08:00
Alastor Wu c821469fbb Bug 1357639 - part11 : increase the waiting time for notification UI changed. r=sebastian
I observe that sometime it takes longer time for the UI notification changed in
try sever, and it cause the intermittent fail.

Therefore, I would like to increase a little bit time for waiting UI changed.

MozReview-Commit-ID: BnsZq3DObFa

--HG--
extra : rebase_source : 034f38799a2f9722f23bb0a2a139047d21508729
2017-05-09 10:51:52 +08:00
Alastor Wu bf83e1f904 Bug 1357639 - part10 : check notification id. r=sebastian
Use notification id to check whether the notification is correct is more stable than just checking the
number of system notification.

MozReview-Commit-ID: BVYdMrBsSLR

--HG--
extra : rebase_source : 9be3ca9a854c25a61bf233a24e7ed7745efacb1a
2017-05-09 10:51:27 +08:00
Alastor Wu 33a5f6f6ea Bug 1357639 - part9 : wait tab event to make sure media started successfully. r=sebastian
Since the robocop tests would run on super slow emulator on try, and then we
can't wait the tab's audible state change within the MAX_WAIT_MS time. It might
need more time.

So, we should check the media has been started by waiting the "Tab:MediaPlaybackChange"
event, and then to check other tab's attribute.

In addition, move the tab attribute checking independently into new functions,
so that we would clearly see that we have four things need to check in function
checkIfMediaPlayingSuccess().
- tab's media playing state
- media notification UI
- tab's audio playing state
- audio focus state

MozReview-Commit-ID: 8S0Ems23iPX

--HG--
extra : rebase_source : 9bbe525ba1dcdf8415d034ced39d9a9a4836f1e9
2017-05-08 14:10:59 +08:00
Alastor Wu 2cd810d300 Bug 1357639 - part8 : add annotiation @RobocopTarget. r=sebastian
To make sure these functions can be used in robocop test.

MozReview-Commit-ID: KPAKOrg5Ows

--HG--
extra : rebase_source : 8ef6dd7c14e8dc0d3219aed0901793a17f945372
2017-05-08 14:10:56 +08:00
Alastor Wu 984b8d5b93 Bug 1357639 - part7 : add check for notification's content. r=sebastian
Add check for media notification's small icon, title and content text.

MozReview-Commit-ID: AOhag8gQVqs

--HG--
extra : rebase_source : 8ad1c7fa0e7796a0d873fba432c646846a0742d3
2017-05-08 14:10:54 +08:00
Alastor Wu 914b4abd82 Bug 1357639 - part6 : list all test tasks in the ctor. r=sebastian
It's easy to know what test tasks we'll run in this test.

MozReview-Commit-ID: DdtFp4pOXlC

--HG--
extra : rebase_source : 5615d2c1169ee0f59c95ab21d3e5e2fd26c99a33
2017-05-08 14:10:51 +08:00
Alastor Wu 99f67571e1 Bug 1357639 - part5 : create new type test class for media playback. r=sebastian
Create new test class for reducing the redundant code and can provide more
flexibility for adding new related test in the future.

MozReview-Commit-ID: 2f3O8vfHo12

--HG--
extra : rebase_source : 2b0d7a337c87afd8e844f435f7e605b881f1aa1b
2017-05-08 14:10:48 +08:00
Alastor Wu 7e133c4d94 Bug 1357639 - part4 : add Fennec test for media control and audio focus. r=sebastian
Add robocop tests and mochitest chrome.

MozReview-Commit-ID: JofkKRSNdB5

--HG--
extra : rebase_source : ffca871a0ea6a041beb4c14b0792dc72b8d2d40d
2017-05-08 14:10:46 +08:00
Alastor Wu 94a68ad4a5 Bug 1357639 - part3 : change audio focus state before notifying observers. r=sebastian
Notify observer might cause the method (notifyStoppedPlaying) is called by C++ side,
and we should change our internal state before calling the method.

MozReview-Commit-ID: 5xNXhGmAIrR

--HG--
extra : rebase_source : 362f921e68d795f568816b1c0a23c0f50c5d0790
2017-05-08 14:10:43 +08:00
Alastor Wu f9a25d2f2f Bug 1357639 - part2 : use enum for audio focus states. r=sebastian
MozReview-Commit-ID: LwLxs7WS5XF

--HG--
extra : rebase_source : e220227d7e08fde2731221c34a37c25061bad8c7
2017-05-08 14:10:41 +08:00
Alastor Wu d9cc434862 Bug 1357639 - part1 : change tab's media playing state when the tab is controlled by media control. r=sebastian
MozReview-Commit-ID: HGuMXut29uB

--HG--
extra : rebase_source : fe78344533cb691562e31ce68b382d8e514b349b
2017-05-08 14:10:39 +08:00
Tom Klein 0bfa0260c1 Bug 1363551 - Remove unused TabsLayoutRecyclerAdapter. r=sebastian
MozReview-Commit-ID: EMsVY1Edime

--HG--
extra : source : ae01497c1ed8ee14a7fb26f2f8c7380cc8ee8e24
2017-05-09 17:37:02 -05:00
Wes Kocher e2902f93a3 Merge inbound to m-c a=merge
MozReview-Commit-ID: Fp2oBAcru51
2017-05-09 14:34:34 -07:00
Mark Banner 0ae981d837 Bug 1363353 - Apply mozilla/recommended ESLint rules to mobile/android. r=sebastian
MozReview-Commit-ID: D0oCUcq3KNB

--HG--
extra : rebase_source : 4fbfa8a79e3f311ee5332ed207600ce94b829df1
2017-05-09 13:55:49 +01:00
Mark Banner b0c63f1126 Bug 1363353 - Rename the .eslintrc files for mobile to .eslintrc.js to match the rest of the tree. r=sebastian
MozReview-Commit-ID: 8XkJGyGkOW8

--HG--
rename : mobile/android/.eslintrc => mobile/android/.eslintrc.js
rename : mobile/android/chrome/content/.eslintrc => mobile/android/chrome/content/.eslintrc.js
extra : rebase_source : 8d6a5f6fa071be4e62738075f69d15f14ec42a68
2017-05-09 13:55:21 +01:00
Dale Harvey 1857d4538d Bug 1357438 - Add form assist popup to custom tabs / webapps. r=walkingice 2017-05-09 09:01:08 -04:00
Carsten "Tomcat" Book 76ca853e3e Merge mozilla-central to mozilla-inbound 2017-05-09 14:40:11 +02:00
Gijs Kruitbosch 70316b8ea8 Bug 1358248, r=nechen,evanxd
MozReview-Commit-ID: 1EBZFcyvmY1

--HG--
extra : histedit_source : 62066947ec5c3eb6218869be6131dcae15159d74
2017-04-22 15:00:22 +01:00
Jan Henning d5d0cff6cf Bug 1363074 - Part 2 - When skipping the selected tab during session restore, don't select a replacement if we're also opening an URL from our launch intent. r=walkingice
When starting up, ideally we want to only load the foreground tab, with all other tabs being created as delay-loaded "zombie" tabs that occupy minimal resources. To that extent, when restoring the previous session we need to know whether we're planning to open an additional, external tab for a URL received through the launch intent later on. If we do, we don't want to select any tab while restoring the previous session, as that selection is going to be overridden by the external tab anyway. Not selecting a tab from the previous session at this stage means that it can remain as a delay-loaded tab until it is eventually selected by the user.

MozReview-Commit-ID: 1lWnOx0ZuNl

--HG--
extra : rebase_source : 03a286ec3e1c66856d2ffb526cd4277c89b29594
2017-05-08 21:55:07 +02:00
Jan Henning 3e994206e0 Bug 1363074 - Part 1 - Clarify meaning of "isExternalURL" variable during session restore. r=walkingice
MozReview-Commit-ID: JnUiPSiqEhd

--HG--
extra : rebase_source : b66b395271bff0c33585789eb87116bca2d4d864
2017-05-08 21:51:34 +02:00
John Lin cd8259e1ee Bug 1361679 - use MediaCodec async API on supported devices. r=esawin
MediaCodec supports async callbacks since Lollipop. Buffer polling is no longer needed.

MozReview-Commit-ID: Iov65JI86i8

--HG--
extra : rebase_source : c3b0ed330e46ee2328de4d031c96f9792895c3b5
2016-12-30 13:52:08 +08:00
Wes Kocher cbfdaf8fb2 Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: 5kxOZZxjMEl
2017-05-08 16:07:25 -07:00
Paolo Amadini eddc9033bf Bug 1254558 - Remove about:config preferences only used by the legacy nsIDownloadManager code. r=mak
MozReview-Commit-ID: 7XSnNdirh8s

--HG--
extra : rebase_source : 9b475be16843af7c3dd2244ef43cd34b1c8e5ea3
2017-05-05 11:51:09 +01:00
Dylan Roeh 54cf076aa4 Bug 1325021 - Reduce reliance on GeckoAppShell.getGeckoInterface to solve some custom tabs crashes. r=jchen 2017-05-08 08:48:16 -05:00
Mats Palmgren ab81bf6d9e Bug 1359411 - Backout bug 1328030 since it caused a hang which is strictly worse than the original problem. r=smaug
MozReview-Commit-ID: C12Tajtc7Vy
2017-05-07 22:54:18 +02:00
Carsten "Tomcat" Book 3e473f5e15 Merge mozilla-central to autoland 2017-05-08 10:31:16 +02:00
Jonathan Hao 6a8a4ca331 Bug 1357997 - Use ProxySelector.openConnection instead of url.openConnection. r=sebastian
MozReview-Commit-ID: CAF2Ir81Fq

--HG--
extra : rebase_source : 3e360c067f8033bf072e1f608ce531628ae493cb
2017-04-25 12:01:46 +08:00
Sebastian Hengst 6ff84ee171 Backed out changeset b50714bd8d10 (bug 1322650) for failing chrome's test_video_discovery.html and mda's test_Eviction_mp4.html, both on Android. r=backout 2017-05-05 18:55:11 +02:00
Sebastian Hengst 087bd41f0f Backed out changeset 9badb2705567 (bug 1322650) 2017-05-05 18:54:09 +02:00
Sebastian Hengst eb6ea2b139 Backed out changeset 4135178bae2b (bug 1322650) 2017-05-05 18:53:55 +02:00
Sebastian Hengst 258857a6e9 Backed out changeset b79cbaa5cf1a (bug 1322650) 2017-05-05 18:53:50 +02:00
Sebastian Hengst f3bfd1e1da Backed out changeset d6516a10c808 (bug 1322650) 2017-05-05 18:53:40 +02:00
Sebastian Hengst b66276dd92 Backed out changeset 698a25fb6e01 2017-05-05 18:53:21 +02:00
James Willcox 5d0885869a No bug, fix up checkstyle failure NOBUILD
MozReview-Commit-ID: 3itUJgA2AKg
2017-05-05 09:14:35 -05:00
James Willcox 9392b1227a Bug 1322650 - Adjust Android Flash support to API changes r=jchen
MozReview-Commit-ID: CmMINaGcTER
2017-05-05 08:56:36 -05:00
James Willcox 086a858585 Bug 1322650 - Don't use inout param for Surface in ICodec r=jolin
It's unnecessary, and the serialization goes wrong with GeckoSurface on the return trip.

MozReview-Commit-ID: 9DUMoLQFhlv
2017-05-05 08:56:34 -05:00
James Willcox e92f96eef9 Bug 1322650 - Make video decoding work with new SurfaceTexture API r=jolin
MozReview-Commit-ID: EXQ5YDSMMGL
2017-05-05 08:56:32 -05:00
James Willcox a7f7a7b630 Bug 1322650 - Use SurfaceTexture for WebGL on Android in E10S r=jgilbert
The main advantage here is that it works cross-process.

MozReview-Commit-ID: 7YUTVB4Bydg
2017-05-05 08:56:28 -05:00
James Willcox 6b95623eac Bug 1322650 - Add GeckoSurfaceTexture, GeckoSurface and associated Android Service r=jchen
This allows us to allocate an Android SurfaceTexture in the compositor process as well
as an accompanying Surface. We can then transfer the Surface back to the content process
via binder, where it can be used for things like WebGL and video decoding.

Each SurfaceTexture/Surface pair has a unique handle. We use this handle in
layer transactions to locate the SurfaceTexture for a given Surface and composite it
appropriately.

MozReview-Commit-ID: 68VSbXdfsMH
2017-05-05 08:56:27 -05:00
Carsten "Tomcat" Book fdc689ba16 merge mozilla-inbound to mozilla-central a=merge 2017-05-05 15:17:26 +02:00
Jim Chen 8d537c0b39 Bug 1360629 - Update NDK on builders to include AArch64/ARM64 support; r=nalexander
Use a new version of the packaged NDK that includes AArch64/ARM64
support and includes the 'source.properties' file, so we can detect the
NDK version.
2017-05-04 19:19:30 -04:00
Honza Bambas a1b64b4694 Bug 1319111 - Expose URI to make security check against on LoadInfo (no LOAD_REPLACE flag). r=bz 2017-01-27 19:10:01 +01:00
Michael Kaply 50f2aad9c2 Bug 1320072 - Backout intent change - broke partner Google test. r=snorp 2017-05-04 12:27:35 -05:00
John Lin 89eafb3c7e Bug 1350279 - try other codecs when first one failed to create. r=esawin
Video fails to play on Sony Z3C when the media server is in a state that no hardware codec can be created unless reboot. Fallback to software codec when that happens to workaround the issue.

MozReview-Commit-ID: AaRIw7KPaF3

--HG--
extra : rebase_source : d5106d5c75c4430450a81bbe9cfd536f01ef4df9
2017-05-02 15:52:45 +08:00
Wes Kocher 4e89a77541 Merge m-c to autoland, a=merge
MozReview-Commit-ID: F7qkNALe0WT
2017-05-03 13:52:24 -07:00
Wes Kocher 21203b47b5 Merge inbound to m-c a=merge
MozReview-Commit-ID: JgXkqrOwl3N
2017-05-03 13:40:24 -07:00
Nick Alexander 0bfebf0c87 Bug 1361545 - Add "skin" flavorDimension for Photon mobile work. r=sebastian,bustage-fix
This is pretty straight-forward.

Sadly, this will require local developers to add a "skin" product
flavor to their invocations, like:

./mach gradle app:assembleLocalAustralisDebug

In addition, this shows how many different variants of the Gradle
product flavor are embedded into our automation configurations.  I
can't solve that at this time.

Since I was here, I took the time to rename "automation" to
"official", which makes "localAustralis" the default in Android
Studio, avoiding a common issue with new builders producing an APK
that doesn't include omni.ja in the IDE.

MozReview-Commit-ID: CtU7zFpNCob
2017-05-03 19:20:58 +02:00
Sebastian Hengst fcaaea05db Backed out changeset 289c6a3f7886 (bug 1361545) for busting Android gradle builds. r=backout 2017-05-03 19:19:52 +02:00
Nick Alexander 571de094b3 Bug 1361545 - Add "skin" flavorDimension for Photon mobile work. r=sebastian
This is pretty straight-forward.

Sadly, this will require local developers to add a "skin" product
flavor to their invocations, like:

./mach gradle app:assembleLocalAustralisDebug

In addition, this shows how many different variants of the Gradle
product flavor are embedded into our automation configurations.  I
can't solve that at this time.

Since I was here, I took the time to rename "automation" to
"official", which makes "localAustralis" the default in Android
Studio, avoiding a common issue with new builders producing an APK
that doesn't include omni.ja in the IDE.

MozReview-Commit-ID: CtU7zFpNCob

--HG--
extra : rebase_source : 477ef683f850ff11cfa128e17855666bb7758a7a
2017-05-02 15:27:37 -07:00
Jim Chen f915e1bd65 Bug 1352177 - 1. Add a "noLiteral" option for WrapForJNI; r=snorp
For static final fields, generate a getter instead of a literal when
specified. Used to generate bindings for runtime constants whose values
are unknown at compile time.
2017-05-03 11:36:18 -04:00
Nick Alexander 744e5386aa 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

--HG--
extra : rebase_source : 346f88882774f072316714cf637a54d771d81a9a
2017-05-02 11:49:16 -07:00
Andrzej Hunt 245eb8de9b Bug 1299949 - Move omg.home.activitystream into omg.activitystream.homepanel r=sebastian
Parts of ActivityStream already live under omg.activitystream, lets move the UI code there
too to make it easier to actually find AS code.

MozReview-Commit-ID: 6Aa7AZ9cw5n

--HG--
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStreamHomeFragment.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/ActivityStreamHomeFragment.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStreamHomeScreen.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/ActivityStreamHomeScreen.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStreamPanel.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/ActivityStreamPanel.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/HighlightsLoader.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/HighlightsLoader.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/StreamItemAnimator.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/StreamItemAnimator.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/StreamRecyclerAdapter.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/StreamRecyclerAdapter.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/menu/ActivityStreamContextMenu.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/menu/ActivityStreamContextMenu.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/menu/BottomSheetContextMenu.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/menu/BottomSheetContextMenu.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/menu/PopupContextMenu.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/menu/PopupContextMenu.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/model/Highlight.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/model/Highlight.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/model/Item.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/model/Item.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/model/Metadata.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/model/Metadata.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/model/TopSite.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/model/TopSite.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/stream/HighlightItem.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/HighlightItem.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/stream/HighlightsTitle.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/HighlightsTitle.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/stream/StreamItem.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/StreamItem.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/stream/TopPanel.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/TopPanel.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/stream/WelcomePanel.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/WelcomePanel.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/topsites/CirclePageIndicator.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/topsites/CirclePageIndicator.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/topsites/TopSitesCard.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/topsites/TopSitesCard.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/topsites/TopSitesPage.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/topsites/TopSitesPage.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/topsites/TopSitesPageAdapter.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/topsites/TopSitesPageAdapter.java
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/topsites/TopSitesPagerAdapter.java => mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/topsites/TopSitesPagerAdapter.java
extra : rebase_source : 517272e4feb41af8c0aec08be8d1e1bbfed93e01
2017-04-27 15:54:06 +08:00
Andrzej Hunt 9bb9ee4a8d Bug 1299949 - Pre: rename ActivityStream UI to ActivityStreamPanel r=sebastian
This will avoid conflicts with the ActivityStream helper class.

MozReview-Commit-ID: 5XNmwz4UwJo

--HG--
rename : mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStream.java => mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStreamPanel.java
extra : rebase_source : 23000ae152f776de874053c712fb6e1a4b1ab546
2017-04-27 15:47:40 +08:00
Edouard Oger 37008cf22a Bug 1361534 - Fix typo in AndroidFxAccount. r=eoger
MozReview-Commit-ID: EhMWO9jmLJ8

--HG--
extra : rebase_source : 1ebf2aa1d3b51a53377f5c4e42c6ce2ed8cd8b26
2017-05-02 18:52:21 -04:00
Sebastian Hengst f1ec56016e Backed out changeset ecf487cbca1b (bug 1357639) for frequently failing robocop's testAudioFocus. r=backout 2017-05-02 21:41:45 +02:00
Sebastian Hengst 9c1e09ea8a Backed out changeset 48e901332b4d (bug 1357639) 2017-05-02 21:40:56 +02:00
Sebastian Hengst ca8090b07a Backed out changeset 3e7bc9a792c2 (bug 1357639) 2017-05-02 21:40:52 +02:00
Sebastian Hengst 89d2fc612c Backed out changeset acb72bf2db09 (bug 1357639) 2017-05-02 21:40:47 +02:00
Sebastian Hengst 940cadeda0 Backed out changeset 916edbdfece6 (bug 1357639) 2017-05-02 21:40:43 +02:00
Sebastian Hengst 590d539454 Backed out changeset 4b332b74aba6 (bug 1357639) 2017-05-02 21:40:39 +02:00
Sebastian Hengst 47a5a1d2e6 Backed out changeset 99c71dd11632 (bug 1357639) 2017-05-02 21:40:35 +02:00
Sebastian Hengst 1fe0046fb3 Backed out changeset d37e0ce6c7c9 (bug 1357639) 2017-05-02 21:40:30 +02:00
Nevin Chen fa7b7e4d28 Bug 1356517 - Add deep links to handle events. r=Grisha
MozReview-Commit-ID: 4OQTrbEdVtQ

--HG--
extra : rebase_source : 2d42f89cf4b0f5a4de1e5ff700c6c5229a0c6278
2017-04-25 18:01:34 +08:00
Alastor Wu b281dab7c7 Bug 1357639 - part8 : add annotiation @RobocopTarget. r=sebastian
To make sure these functions can be used in robocop test.

MozReview-Commit-ID: KPAKOrg5Ows

--HG--
extra : rebase_source : 13632cef16c96457ce77c01bc4330a9793ab83ad
2017-05-02 18:53:40 +08:00
Alastor Wu a947a01211 Bug 1357639 - part7 : add check for notification's content. r=sebastian
Add check for media notification's small icon, title and content text.

MozReview-Commit-ID: AOhag8gQVqs

--HG--
extra : rebase_source : 2be27f95b2bc48b998734d8e702fc084b5b93683
2017-05-02 18:53:26 +08:00
Alastor Wu 310fb8528b Bug 1357639 - part6 : list all test tasks in the ctor. r=sebastian
It's easy to know what test tasks we'll run in this test.

MozReview-Commit-ID: DdtFp4pOXlC

--HG--
extra : rebase_source : 9c986e6104528cb66cc6ca3b468fe49031e637db
2017-05-02 18:53:23 +08:00
Alastor Wu 56ef3aba49 Bug 1357639 - part5 : create new type test class for media playback. r=sebastian
Create new test class for reducing the redundant code and can provide more
flexibility for adding new related test in the future.

MozReview-Commit-ID: 2f3O8vfHo12

--HG--
extra : rebase_source : 02e081dbac6e91bcac92bea1dbfc5abf07293e40
2017-05-02 18:53:21 +08:00
Alastor Wu af1774e465 Bug 1357639 - part4 : add Fennec test for media control and audio focus. r=sebastian
Add robocop tests and mochitest chrome.

MozReview-Commit-ID: JofkKRSNdB5

--HG--
extra : rebase_source : f8a5315927cf7e10a96337468fa2dec9871b7147
2017-05-02 18:53:18 +08:00
Alastor Wu 59a4e31527 Bug 1357639 - part3 : change audio focus state before notifying observers. r=sebastian
Notify observer might cause the method (notifyStoppedPlaying) is called by C++ side,
and we should change our internal state before calling the method.

MozReview-Commit-ID: 5xNXhGmAIrR

--HG--
extra : rebase_source : 23fb8bef4066cad5238f49bb692445d9b684a84e
2017-05-02 18:53:16 +08:00
Alastor Wu fcd83aadc6 Bug 1357639 - part2 : use enum for audio focus states. r=sebastian
MozReview-Commit-ID: AQ2R6zxnONU

--HG--
extra : rebase_source : 9196ed522fee8eadbf1cfcaa77f1680f01f7f434
2017-05-02 18:53:13 +08:00
Alastor Wu a539ce2e23 Bug 1357639 - part1 : change tab's media playing state when the tab is controlled by media control. r=sebastian
MozReview-Commit-ID: 4bXkaYxqtKD

--HG--
extra : rebase_source : a0b4a378c2a0bcb04be1f0f77d25501e8d0fad57
2017-05-02 18:53:05 +08:00
Jan Henning 5161ec32f8 Bug 1360658 - Forward BundleEvents from WebAppActivity to GeckoApp. r=daleharvey
Otherwise random stuff handled by GeckoApp (e.g. snack bars) won't work inside a WebAppActivity.

MozReview-Commit-ID: ElGOPQcqFJS

--HG--
extra : rebase_source : 71fe7c966513772701cd792c0bec1211c0d9e5e6
2017-04-28 20:48:08 +02:00
Jan Henning 28ef983d1e 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

--HG--
extra : rebase_source : d5404326e2cd4ce44a14340883dd338d14a18c05
2017-04-29 14:30:03 +02:00
Jan Henning 8409fc1a41 Bug 1360743 - Part 0 - Remove unneeded imports. r=walkingice
MozReview-Commit-ID: IfgzeaFmfOw

--HG--
extra : rebase_source : a775145310f70f9067197b934678516dca470386
2017-04-29 14:21:38 +02:00
Jan Henning 71df722cc8 Bug 1360699 - Finish CustomTabsActivities when leaving. r=walkingice
Looking again, the original motivation for *not* calling finish(), i.e. avoiding Gecko being unloaded from memory, doesn't quite seem to apply and in any case for custom tabs we *have* to finish() the activity, since we're most probably running within another activity's task.

There's also no point in overriding onDone() in SingleTabActivity any more if
- we just do the same thing as GeckoApp's default behaviour, and
- custom tabs now require a different behaviour anyway.

MozReview-Commit-ID: BsP1tMj5DEe

--HG--
extra : rebase_source : bd3dc71ec1a5d4dcbf83e6c00630e0d8ab04f611
2017-04-29 15:03:41 +02:00
Nevin Chen d7fa0adb51 Bug 1355852 - Show Text selection toolbar before Android 5. r=walkingice
MozReview-Commit-ID: 9fnTXxOitag

--HG--
extra : rebase_source : 53679659da37b60e91d833cfcb70f05a0390ccc6
2017-04-28 18:38:13 +08:00
Jim Chen 49768eb480 Bug 1357874 - Disable RegExp JIT for AArch64; r=snorp
I encountered crashes in jitted regexp code in my AArch64 Fennec build.
This patch disables that for now, but obviously we want to look into the
crashes and eventually turn this back on.
2017-05-01 14:46:00 -04:00
Sebastian Hengst 42fd33ff9c merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: ELENTh08Be7
2017-04-29 11:10:31 +02:00
Eugen Sawin 7d8b2ff4e0 Bug 1360599 - [1.0] Add multiprocess setting intent extra to the GeckoView example app. r=snorp 2017-04-28 22:18:18 +02:00
Ralph Giles 819141aa38 Bug 1360364 - Update builders to rust 1.17.0. r=mshal
Update tooltool manifests for official builds to use repacks
of the upstream rustc 1.17.0 (56124baa9 2017-04-24) stable release.

These repacks include cargo 0.19.0-beta.1 (03efb7fc8 2017-04-23)
to include support for the RUSTC_WRAPPER environment variable
needed for use of sccache with rust code.

MozReview-Commit-ID: L9Nq2iK4GK8

--HG--
extra : rebase_source : 882b201282a0e13ed77ec5876972657eab81a562
2017-04-27 15:24:57 -07:00
Randall Barker dd168bca55 Bug 1359618 - Prevent LayerView from accessing the compositor until UiCompositorControllerChild is open r=jchen
MozReview-Commit-ID: 3SmdJx0QXW8
2017-04-28 08:37:41 -07:00
Carsten "Tomcat" Book 1045b9730a merge mozilla-inbound to mozilla-central a=merge 2017-04-28 10:36:11 +02:00
Jim Chen 7c13eebba6 Bug 1353799 - 4. Add composition event tests to testInputConnection; r=esawin
Add two tests to testInputConnection that record the sequence of
composition events during editing, and check that the sequence is what
we expected.

The first test makes sure that we reuse the current composition on the
Gecko side when setting composing text; otherwise the Facebook comment
box behaves incorrectly.

The second test makes sure that we can move the cursor inside the
current composition, to fix this particular bug.
2017-04-27 20:59:42 -04:00
Jim Chen 7c1bd4a073 Bug 1353799 - 3. Add types and timestamps in testInputConnection; r=esawin
* Include the type of the editor (input, textarea, contentEditable,
  designMode) in BasicInputConnectionTest, so we can work around the
  differences in behavior among the different editor types.

* Add timestamps to key events, because lack of timestamps was
  triggering a crash when running testInputConnection.
2017-04-27 20:59:42 -04:00
Jim Chen c3aa7c74d4 Bug 1353799 - 2. Update current composition when setting/removing spans; r=esawin
Update the composition when setting/removing spans, so that we update
the selection/cursor during a composition. However, we must limit any
updating to the current composition only (as indicated by the
keep-current-composition flag), because the Facebook comment box behaves
incorrectly if we repeatedly start and end new compositions.
2017-04-27 20:59:42 -04:00
Jim Chen faae209c85 Bug 1353799 - 1. Make icMaybeSendComposition accept a flag parameter; r=esawin
Use a flag parameter instead of individual boolean parameters to make
it more convenient to add more options.
2017-04-27 20:59:42 -04:00
Sebastian Hengst 0936d33fb8 Backed out changeset 88c2a0b2dde5 (bug 1319111) for crashing Talos. r=backout 2017-04-28 00:16:39 +02:00
Andrzej Hunt 826710659c Bug 1356693 - infer: fix RESOURCE_LEAK's in geckoview r=walkingice
Similar to some previous commits, we prefer non-throwing constructors
in order to ensure we never lose a reference to an unclosed stream.
InpuStreamReader(..., Charset) is preferred over InputStreamReader(..., String)
since the latter can throw when the String is not a valid Charset.
(In reality we know that our Charset Strings are correct, but the compiler
 isn't able to determine that for itself. Moreover, using the preparsed
 Charset is more efficient.)

MozReview-Commit-ID: 9z07G3hqPI3

--HG--
extra : rebase_source : 4cee7d97a66e4c6f193547df019335db4443f45a
2017-04-26 17:22:30 +08:00
Eugen Sawin 4ba6d262b5 Bug 1360333 - [1.0] Add GeckoView chrome startup performance logs. r=snorp 2017-04-27 23:21:37 +02:00
Wes Kocher 9528ad9a03 Merge m-c to inbound, a=merge
MozReview-Commit-ID: DaH1djmEY5A
2017-04-27 13:29:07 -07:00
Wes Kocher 2aa72d4cdc Merge inbound to central, a=merge
MozReview-Commit-ID: HZUHBRK4UmL
2017-04-27 13:00:07 -07:00
Geoff Brown 708a1b1c64 Bug 1359541 - Enable eslint on mobile/android/tests; r=standard8,snorp 2017-04-27 07:52:58 -06:00
Andrzej Hunt f798a0402b Bug 1356693 - infer: fix RESOURCE_LEAK's in stumbler r=walkingice
MozReview-Commit-ID: 8bMGr6v9DKn

--HG--
extra : rebase_source : 0a53d3f694df3a631cc7b5ee2345e2ca1a6b6ec1
2017-04-17 16:33:57 -07:00
Andrzej Hunt 135c35d919 Bug 1356693 - infer: fix RESOURCE_LEAK's in services r=Grisha
The primary issue is that we use a throwing InputStreamReader
constructor. If it throws, then any nested streams will be lost.
We can fix that by using the non-throwing InputStreamReader
constructor (which uses a Charset as the second parameter,
instead of a String which causes an Exception to be thrown
if it can't be parsed)

We also simplify some nested Stream's a little: most of the
Stream constructors don't throw, so there's no harm in not keeping
individual references to those that don't throw - and that
results in less Stream references for us to handle.

MozReview-Commit-ID: 2hyRFGVmGnU

--HG--
extra : rebase_source : 9d2b25997e0f71089c0ef56c0069cafe068f821e
2017-04-14 20:58:59 -07:00
Andrzej Hunt 7fc72b4e1b Bug 1356693 - infer: fix RESOURCE_LEAK's in base r=walkingice
MozReview-Commit-ID: Gm9GqOk37UZ

--HG--
extra : rebase_source : 7f6a1716e31dae1cc1e46dbe19a12f45edc05b89
2017-04-19 08:26:38 -07:00
Andrzej Hunt 0e1b1383b2 Bug 1356693 - Pre: add comment explaining why MergeCursor can't handle null cursors r=Grisha
MozReview-Commit-ID: CGwMi9LKYTj

--HG--
extra : rebase_source : 3271350e1fc7cd972feb1dbd6fa733c834342d94
2017-04-28 08:38:41 +08:00
Andrzej Hunt e8919657c8 Bug 1356693 - Pre: use IOUtils.safeStreamClose() in IOUtils r=walkingice
MozReview-Commit-ID: 3dikakcAKqI

--HG--
extra : rebase_source : 97370160c6f8fe40d57ed8372097c585cdc94aa6
2017-04-14 15:24:45 -07:00
Wes Kocher a463bb4c4c Merge m-c to autoland, a=merge
MozReview-Commit-ID: 6CUQEJghjzU
2017-04-27 13:37:47 -07:00
Jan Henning 13d04aadff Bug 1353857 - Include the tab ID when notifying about leaving/entering a web app's scope. r=daleharvey,walkingice
We only want to process the AppEntered/Left message if it actually concerns our currently displayed tab.

MozReview-Commit-ID: EJ8RzRzDNAz

--HG--
extra : rebase_source : 2d05c8131a3b25968b36704647a9041b15599668
2017-04-17 16:37:58 +02:00
Carsten "Tomcat" Book e1e203f1f5 Merge mozilla-central to autoland 2017-04-27 16:36:41 +02:00
Carsten "Tomcat" Book 95c30cae37 Backed out changeset 0ca9044bb930 (bug 1356693) for android crashes
--HG--
extra : rebase_source : 689c8de0aaee267b02e5d79af840ecf969739648
2017-04-27 15:20:09 +02:00
Carsten "Tomcat" Book 1b10cd192e Backed out changeset 76c560e8d908 (bug 1356693)
--HG--
extra : rebase_source : baca62931b318645fc18b39153a837d7b15af81e
2017-04-27 15:19:55 +02:00
Carsten "Tomcat" Book 3cc309c314 Backed out changeset 8b672583d57c (bug 1356693)
--HG--
extra : rebase_source : 94d92549f1dfdaf81de6612e54d1aab9889ade53
2017-04-27 15:19:53 +02:00
Carsten "Tomcat" Book d7e4098cb8 Backed out changeset 6d26ad68f31f (bug 1356693)
--HG--
extra : rebase_source : 2f0adc16fa93b32d8183fa51b36cbb02e95597bd
2017-04-27 15:19:50 +02:00
Carsten "Tomcat" Book 30461c9143 Backed out changeset 731479637eda (bug 1356693)
--HG--
extra : rebase_source : 10edf5c7c726659be04670b01f607f7099624322
2017-04-27 15:19:48 +02:00
Carsten "Tomcat" Book 6fe25dded2 Backed out changeset 1fd99a71f607 (bug 1356693)
--HG--
extra : rebase_source : 5381e1aab3a5ac3f6dc74c690d83ebf38df20e96
2017-04-27 15:19:46 +02:00
Jan Henning 823bb8f884 Bug 1351808 - Part 2 - Exclude non-standard tab types from session store. r=sebastian
Restoring anything other than normal browsing tabs (e.g. custom tabs, web apps) is more involved because those tabs
- don't appear in our normal tabs UI
- are opened in separate activities
- when we're starting up, Android's task switcher might or might not still have available task entries corresponding to such tabs from the last session

Therefore, for now, the session store will simply exclude those kinds of tabs from being saved in the session store data.

Instead of a real restore, if the corresponding tab has been closed or Gecko stopped running, we just recreate the custom tab/web app based on the stored Activity intent data we have available (bug 1352997).
Tab zombification while Gecko is running however remains fully supported, as we continue collecting session history data for all tab types, even if we don't necessarily save it to disk.

Because custom tabs/web apps currently still share a common Gecko browser window with normal tabs, we also have to modify our selected tab tracking logic accordingly, so that selecting one of these special tab types doesn't overwrite the last selected normal browsing tab.

To that effect, we now track the selected tab *ID* in memory and only convert that to a tab index when writing the data to disk. As the ID remains stable while Gecko is running, this makes tracking changes for a sub-group of tabs only easier, as we don't have to watch out for closing tabs of *any* kind affecting the tab index of everything behind them.

Bug 1346008#c3 has some preliminary ideas on how session restoring for custom tabs/web apps could be made to work.

MozReview-Commit-ID: 1q5Jtv0DKrE

--HG--
extra : rebase_source : 150e61f2a205e6bc6ea6cf346de0ba42b1935d13
2017-04-08 13:43:09 +02:00
Jan Henning 4f5955815a Bug 1351808 - Part 1 - Replace some magic numbers in session store. r=sebastian
MozReview-Commit-ID: BzqieZVi7h4

--HG--
extra : rebase_source : 019d80844d65d075314ab57197793decca0853c5
2017-04-08 14:18:23 +02:00
Jan Henning eaf04b0fea Bug 1352997 - Part 7 - Don't switch activities if we're closing a tab while exiting the activity. r=sebastian,walkingice
Closing the currently selected tab will select another tab, which can trigger an activity switch if the tab types differ. We don't want that if we're about to close the activity, as that'll bring that activity into the foreground instead of simply walking back along the activity history stack.

To give an example: Without this patch, closing the last custom tab will select a normal browsing tab, which will trigger an activity switch, so instead of returning to the user's previous activity, pressing back will send us to BrowserApp.

There's one additional catch:
If we change our onDone() behaviour and no longer finish() the SingleTabActivity when exiting (in order to avoid a costly restart of Gecko should the user return to us soon), this means that the activity that has just been exited could be brought back into the foreground via the onResume() codepath.

In that case the mLastActiveGeckoApp-check won't be triggered if no other GeckoApp-based activity was active in the meantime, so we wouldn't reselect/reopen the activity's desired tab, but instead display the tab that was selected when closing the previous tab. Therefore, we track this via an additional flag that is set for this case.

MozReview-Commit-ID: 3jOvBXQUrfo

--HG--
extra : rebase_source : a535fff92c02ef9d711faf6083e9146ed992fc03
2017-04-14 19:58:09 +02:00
Jan Henning 612ab15860 Bug 1352997 - Part 6 - Switch over web apps and implement additional startup logic for them. r=sebastian,walkingice
Web Apps are single task activities, but Android's task switcher will only ever return the intent that originally created the activity and will never ever update its stored intent for subsequent launches via onNewIntent, so we have to do this ourselves.

Additionally, web apps have some additional logic when being launched via a new intent that checks whether the currently loaded page matches the scope of the web app intent and then resets it if necessary. We now hook up this logic to the new SingleTabActivity wiring.

MozReview-Commit-ID: 9bo4gXbfPNg

--HG--
extra : rebase_source : 3f8cf1e2e96889313ef83ad9ba92b7a36985b82a
2017-04-04 21:50:33 +02:00
Jan Henning a31794fbba Bug 1352997 - Part 5 - Implement common behaviour for custom tabs/web apps and switch over the former. r=sebastian,walkingice
This implements the common behaviour for restoring the correct tab when switching to/from custom tab and web app activities. Unlike our normal UI, those activities are basically single tab activities, that is each activity is linked to a certain Gecko tab, with no facilities (bugs aside) for the user to directly load/select a different tab within that activity.

Therefore, here we basically update the selected tab only when the activity is starting up and initially creating its new (or, especially once tab type switching will be implemented, taking over an existing) content tab.

When subsequently restoring, we then check whether the tab is still available. If it is, we select it, if not, we fall back to opening a new tab based on the available intent data.

This also means that we no longer have to finish() the activity on closing so the activity state (finished) matches the tab (closed), which means that we no longer have to prematurely kill Gecko as a side effect of that.

MozReview-Commit-ID: KjFz1qrqWLy

--HG--
extra : rebase_source : 188fd2275083ddb982af806d4660c02caab85bee
2017-04-08 19:19:32 +02:00
Jan Henning 6dcea3ee36 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

--HG--
extra : rebase_source : 6ff06fb1e1405201908ade4b04eba54a1a5aa7d5
2017-04-08 19:15:19 +02:00
Jan Henning abba7e0388 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

--HG--
extra : rebase_source : a7409f58b8df1f32f74b137513ece1e162605280
2017-04-08 22:55:10 +02:00
Jan Henning 639bd9d811 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

--HG--
extra : rebase_source : 184240fc79678a2e78d7052635acc4b836fce400
2017-04-09 19:30:21 +02:00
Jan Henning 8467f9e026 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

--HG--
extra : rebase_source : d08216a7a73b2f372b2357326e5c9d6de622c4d9
2017-04-08 11:16:13 +02:00
Jan Henning 0fcae12707 Bug 1351739 - Part 6 - Finish the WebAppActivity when closing via onDone. r=sebastian,walkingice
Custom and web app tabs behave as any other externally launched URLs, that is pressing the back button closes not only the activity, but the tab as well when reaching the beginning of session history. Therefore, we should finish the activity in this case (just as the CustomTabsActivity already does), so the next launch runs through the onCreate code path and opens a new tab again.

MozReview-Commit-ID: 14AhWkmb5O7

--HG--
extra : rebase_source : cfed1b6069409efe2444131c41db1ae2e828c43a
2017-04-02 15:43:31 +02:00
Jan Henning 7568f47029 Bug 1351739 - Part 5 - Implement activity switching for web apps. r=sebastian,walkingice
Differences to custom tabs:
- We don't have to store the full intent, just storing the manifest path is enough.
- Akin to the LauncherActivity we have to route the request to the correct WebAppActivity instance depending on the manifest path.

We also have to modify the intent handling when GeckoApp is starting up - the intent handling of the GeckoApp + BrowserApp combo requires "nulling" out (by setting it to ACTION_MAIN) the current intent if it's not a fresh intent (e.g. the activity is recreated after having been destroyed or relaunched from the task switcher).

For web apps on the other hand we want to keep the intent around even in those cases, as it contains state we need even later on. Additionally, we want to make use of GeckoApp's startup code for either selecting the tab from the intent or loading a new tab. Therefore we save the launch intent and restore it once GeckoApp's onCreate() has run.

Note that this solution is not entirely correct either, because with this each onCreate() call will open a new tab, even when this is not necessary when only the activity (but not Firefox and Gecko as a whole) had been destroyed. This behaviour will be fixed as part of bug 1352997.

This approach is also a bit different than the one chosen in bug 1351605 for custom tabs, which was independently developed in parallel. Bug 1352997 will unify this, too.

MozReview-Commit-ID: 94uZ3c8CUVD

--HG--
extra : rebase_source : 4997207d048924518870852d40cfc1fed233fab1
2017-04-02 18:26:45 +02:00
Jan Henning 4cc5180850 Bug 1351739 - Part 4 - Handle selected tab temporarily being undefined. r=sebastian,walkingice
This can happen if closing a tab (via the back button) simultaneously also triggered an activity switch (by selecting the parent tab). In that case the tab is closed, but formal selection of the new tab only completes after we've switched activities. At the moment activity switching might trigger an application-background/foreground cycle, which means we could hit the selected tab temporarily being undefined in Gecko.

MozReview-Commit-ID: 6p4cOqj29HX

--HG--
extra : rebase_source : 81db83e79d31cf6398f449bba14a4fb1bdc97810
2017-04-09 19:49:02 +02:00
Jan Henning 65014acc8c Bug 1351739 - Part 3 - Switch activities when a custom tab is selected/unselected. r=sebastian,walkingice
On tab selection, the Tabs instance now checks whether the type of the tab to be selected matches the currently running activity. If it doesn't, the tab switching is aborted and instead, an intent for the correct activity is sent. When the new activity launches, it finds that the intent also includes a tab ID, which means that instead of opening a new tab we retry the tab selection, which will then succeed now that we're in the correct activity.

Because for custom tabs the launch intent can contain all sorts of customisations, we now have to save the intent when a custom tab is opened for the first time, so that later on, when switching e.g. from BrowserApp back to a custom tab we can use the correct intent to launch the custom tab activity.

MozReview-Commit-ID: KWdkweKBocz

--HG--
extra : rebase_source : 6487f39a697a500d3a3eda505345f72f755bcbb7
2017-04-08 23:10:51 +02:00
Jan Henning 446b2c2ab7 Bug 1351739 - Part 2 - Convert CustomTabsActivity to SafeIntents. r=sebastian,walkingice
These are potentially untrusted external intents, so we should use SafeIntents for interacting with them.

MozReview-Commit-ID: 3nmjg85wbr1

--HG--
extra : rebase_source : 97c54e1dee8fc132aa3bb1d9c42051a4eb330018
2017-04-02 14:09:36 +02:00
Jan Henning 9fcd07adad Bug 1351739 - Part 1 - Track the currently active activity. r=sebastian,walkingice
Required because later on, we'll need to know if we're in the correct activity for a tab or need to switch activities.

As a follow-up, we can later also hook up our current manual activity tracking from GeckoApplication to this (we most probably won't be able to get rid of the GeckoActivityStatus shenanigans, though).

MozReview-Commit-ID: 5lZrAMsB9Gy

--HG--
extra : rebase_source : 5a8fec92cad15db05063dbb940874615c317c768
2017-04-02 11:22:12 +02:00
Jan Henning 1c3e4ca69b Bug 1351739 - Part 0 - Use INVALID_TAB_ID more. r=sebastian,walkingice
-1 is probably not all that mysterious as far as magic numbers go, but still...

MozReview-Commit-ID: zK3P6HeWzK

--HG--
extra : rebase_source : 59530eafb11f68fddb29a53775a394fcd1a08d69
2017-04-06 21:30:55 +02:00
Jan Henning c768aca43c Bug 1351739 - Part -1 - Housekeeping. r=sebastian,walkingice
MozReview-Commit-ID: Ev6jl4N3K0g

--HG--
extra : rebase_source : b62fda2b9c1c1a7e233c2245cedc5b61b2fcc930
2017-04-07 20:51:41 +02:00
Sebastian Hengst e1f043f96f Backed out changeset f349db3287ad (bug 1351808) for bustage on Android in GeckoApp.java. r=backout 2017-04-27 20:33:40 +02:00
Sebastian Hengst b53ff60076 Backed out changeset 4aa74fee0d37 (bug 1351808) 2017-04-27 20:33:03 +02:00
Wes Kocher 19e79c95be Backed out changeset 9ce0883ffd62 (bug 1353857) because a dependent bug failed to land a=backout
MozReview-Commit-ID: GuGF9G3KmS6

--HG--
extra : rebase_source : baf19a05b9fd3dd291623a8102406721f8b4a88e
2017-04-27 11:25:22 -07:00
Michael Kaply ae592e21d4 Bug 1360267 - Fix link in about:healthreport. r=snorp
MozReview-Commit-ID: Ea32Zp4HG63

--HG--
extra : rebase_source : 49cb98279b16fede560700a478e0b1b263c0f234
2017-04-27 12:20:00 -05:00
Jan Henning 3325142356 Bug 1353857 - Include the tab ID when notifying about leaving/entering a web app's scope. r=daleharvey,walkingice
We only want to process the AppEntered/Left message if it actually concerns our currently displayed tab.

MozReview-Commit-ID: EJ8RzRzDNAz

--HG--
extra : rebase_source : 2d05c8131a3b25968b36704647a9041b15599668
2017-04-17 16:37:58 +02:00
Jan Henning bc56a16f39 Bug 1351808 - Part 2 - Exclude non-standard tab types from session store. r=sebastian
Restoring anything other than normal browsing tabs (e.g. custom tabs, web apps) is more involved because those tabs
- don't appear in our normal tabs UI
- are opened in separate activities
- when we're starting up, Android's task switcher might or might not still have available task entries corresponding to such tabs from the last session

Therefore, for now, the session store will simply exclude those kinds of tabs from being saved in the session store data.

Instead of a real restore, if the corresponding tab has been closed or Gecko stopped running, we just recreate the custom tab/web app based on the stored Activity intent data we have available (bug 1352997).
Tab zombification while Gecko is running however remains fully supported, as we continue collecting session history data for all tab types, even if we don't necessarily save it to disk.

Because custom tabs/web apps currently still share a common Gecko browser window with normal tabs, we also have to modify our selected tab tracking logic accordingly, so that selecting one of these special tab types doesn't overwrite the last selected normal browsing tab.

To that effect, we now track the selected tab *ID* in memory and only convert that to a tab index when writing the data to disk. As the ID remains stable while Gecko is running, this makes tracking changes for a sub-group of tabs only easier, as we don't have to watch out for closing tabs of *any* kind affecting the tab index of everything behind them.

Bug 1346008#c3 has some preliminary ideas on how session restoring for custom tabs/web apps could be made to work.

MozReview-Commit-ID: 1q5Jtv0DKrE

--HG--
extra : rebase_source : 150e61f2a205e6bc6ea6cf346de0ba42b1935d13
2017-04-08 13:43:09 +02:00
Jan Henning 1e1372dff5 Bug 1351808 - Part 1 - Replace some magic numbers in session store. r=sebastian
MozReview-Commit-ID: BzqieZVi7h4

--HG--
extra : rebase_source : 019d80844d65d075314ab57197793decca0853c5
2017-04-08 14:18:23 +02:00
Alexandre Poirot c90bccb53a Bug 1356231 - Use toolkit EventEmitter.jsm instead of devtools module. r=mossop
MozReview-Commit-ID: 49JI7NtLwKK

--HG--
extra : rebase_source : 7fb015f56be94c4bbe2d56506653f069c9ad8dd3
2017-04-27 17:58:09 +02:00
Edouard Oger 45eeac5526 Bug 1360047 - Generate random GUIDs more reliably in TestFxAccountDeviceListUpdater. r=eoger
MozReview-Commit-ID: 9Ak99iIxOzY

--HG--
extra : rebase_source : 784fe09fadff525affb81563deb3044b5d8ca859
2017-04-27 09:50:24 -07:00
Nevin Chen c530f92f50 Bug 1329156 - Add telemetry for customtab customization usage. r=walkingice
MozReview-Commit-ID: EJrFzvHOqOU

--HG--
extra : rebase_source : b23aed0f61d120af3f99a842f54a1848415f26e2
2017-04-26 13:37:38 +08:00
Andrzej Hunt d8e202e0c6 Bug 1356693 - infer: fix RESOURCE_LEAK's in geckoview r=walkingice
Similar to some previous commits, we prefer non-throwing constructors
in order to ensure we never lose a reference to an unclosed stream.
InpuStreamReader(..., Charset) is preferred over InputStreamReader(..., String)
since the latter can throw when the String is not a valid Charset.
(In reality we know that our Charset Strings are correct, but the compiler
 isn't able to determine that for itself. Moreover, using the preparsed
 Charset is more efficient.)

MozReview-Commit-ID: 9z07G3hqPI3

--HG--
extra : rebase_source : 6ed740bf5a1e5296bd2afe5c58b19a43acab0647
2017-04-26 17:22:30 +08:00
Andrzej Hunt 1f9929fe75 Bug 1356693 - infer: fix RESOURCE_LEAK's in stumbler r=walkingice
MozReview-Commit-ID: 8bMGr6v9DKn

--HG--
extra : rebase_source : e8c1f7cbbd598ac5765ef10b84ee993bba42f858
2017-04-17 16:33:57 -07:00
Andrzej Hunt 1c5d02830f Bug 1356693 - infer: fix RESOURCE_LEAK's in services r=Grisha
The primary issue is that we use a throwing InputStreamReader
constructor. If it throws, then any nested streams will be lost.
We can fix that by using the non-throwing InputStreamReader
constructor (which uses a Charset as the second parameter,
instead of a String which causes an Exception to be thrown
if it can't be parsed)

We also simplify some nested Stream's a little: most of the
Stream constructors don't throw, so there's no harm in not keeping
individual references to those that don't throw - and that
results in less Stream references for us to handle.

MozReview-Commit-ID: 2hyRFGVmGnU

--HG--
extra : rebase_source : 15dd97d28012a017326b01ae8ddc370c7f1ec484
2017-04-14 20:58:59 -07:00
Andrzej Hunt 9614743c8f Bug 1356693 - infer: fix RESOURCE_LEAK's in base r=walkingice
MozReview-Commit-ID: Gm9GqOk37UZ

--HG--
extra : rebase_source : 762eac583f5d017aa0ccfa96a669d72c57f6f5bd
2017-04-19 08:26:38 -07:00
Andrzej Hunt 5108247dc0 Bug 1356693 - Pre: MergeCursor can handle null cursors r=Grisha
MergeCursor can handle null cursors (and is lightweight), we
don't need to specifically handle each case - which results in simpler
code.

MozReview-Commit-ID: CGwMi9LKYTj

--HG--
extra : rebase_source : 74c0c83ba4e8ea6ca036c24372ee7ff07a1cbc78
2017-04-27 11:57:41 +08:00
Andrzej Hunt 5341e86001 Bug 1356693 - Pre: use IOUtils.safeStreamClose() in IOUtils r=walkingice
MozReview-Commit-ID: 3dikakcAKqI

--HG--
extra : rebase_source : 05dd41ed123cdd9400da84fbcc03caef03624578
2017-04-14 15:24:45 -07:00
Wes Kocher 226702fd85 Merge m-c to autoland a=merge
MozReview-Commit-ID: LOGgOErcV9L
2017-04-26 17:43:38 -07:00
Wes Kocher c90904f9bf Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: 9HQViJrDT6S
2017-04-26 17:30:31 -07:00
Nick Alexander 9c8fde7730 Bug 1254355 - Follow-up: Use #ifdef, not #if, for MOZ_CRASHREPORTER. r=gps
On a CLOSED TREE

Style varies across the tree, and this matters as we transition to
Python and moz.build.  AppConstants.jsm already uses #ifdef, so this
is consistent with that.

MozReview-Commit-ID: Bal37lqlvjq

--HG--
extra : source : 41d155de1019c0c6c693e2bf46bd1dd7b91d244a
extra : amend_source : 989f6ba2447a2b40d4bc6604241d7986c0d5dd00
2017-04-18 17:26:15 -07:00
Nick Alexander 2bb32a2659 Bug 1254355 - Part 2: Generate AndroidManifest.xml using GENERATED_FILES. r=gps,mshal
MozReview-Commit-ID: BVYylS4qsP1

--HG--
extra : rebase_source : 6a9307175a8e876562571e0e5f276fff59c601db
extra : source : 6a0e9a3f26735b442f289c65c231986e1f829f9e
2017-04-25 13:42:19 -07:00
Andrea Marchesini 8beb8af7d4 Bug 1357846 - Introducing nsIFilePicker.displaySpecialDirectory, r=smaug
nsIFilePicker.displaySpecialDirectory is a string that can be set to TmpD,
Desk, or any other special directory value. The real value of this directory
will be read in the parent process.
2017-04-26 18:20:19 +02:00
James Willcox b69c4e2972 Bug 1359420 - Send correct status code in GeckoView security change listener r=esawin
MozReview-Commit-ID: 3B3PNxCNnm3
2017-04-26 10:11:35 -05:00
James Willcox 820edda4fd Bug 1359419 - Add GeckoView.preload() r=esawin
MozReview-Commit-ID: 6DYq2oiz1Ug
2017-04-26 10:11:28 -05:00
James Willcox 96b2d70241 Bug 1359422 - Add GeckoView constructor that allows both xml attribs and settings r=esawin
MozReview-Commit-ID: 8U1ojpLSSiK
2017-04-26 10:11:13 -05:00
Carsten "Tomcat" Book 68e9a2dfd5 Merge mozilla-central to mozilla-inbound 2017-04-26 09:04:59 +02:00
Carsten "Tomcat" Book 8f4e4ca99b merge mozilla-inbound to mozilla-central a=merge 2017-04-26 08:41:31 +02:00
Carsten "Tomcat" Book d9cce3c040 merge autoland to mozilla-central a=merge 2017-04-26 08:40:02 +02:00
Randall Barker fdcdbcefb5 Bug 1359659 - Ensure the complete pinned state is sent from the UI thread to the compositor r=jchen
MozReview-Commit-ID: GXRtfDZ8R17
2017-04-25 22:20:38 -07:00
Wes Kocher 5e8bdb175d Merge inbound to m-c a=merge
MozReview-Commit-ID: A85cs7Yriqj
2017-04-25 13:53:00 -07:00
Dale Harvey 7311d5038a Bug 1355676 - Check for nulls when decoding icons. r=sebastian 2017-04-25 16:53:29 +01:00
Mike Conley 47d93efc2d Bug 1357169 - Don't apply some unnecessary style rules to checkboxes or radio inputs on Android. r=mats
MozReview-Commit-ID: GGLkTmnBtxa

--HG--
extra : rebase_source : 1efc907e4203946bec2fd187c2fe12e7ea9be536
2017-04-20 16:15:07 -04:00
Randall Barker c82d528d56 Bug 1358805 - part 5: Update the dynamic toolbar animator to gracefully handle toolbar snapshot generation failure r=kats
MozReview-Commit-ID: B3t6l5ZqhC5
2017-04-25 15:14:00 -07:00
Randall Barker b1e89ec4b1 Bug 1358805 - part 4: Allow custom tabs to pin the dynamic toolbar r=droeh
MozReview-Commit-ID: BXoLU0BGrZq
2017-04-25 15:13:59 -07:00
Randall Barker 01ebd7c57f Bug 1358805 - part 3: Keep the toolbar state between UI thread and compositor thread consistent once IPC is open r=kats
MozReview-Commit-ID: H7qrShryomi
2017-04-25 15:13:59 -07:00
Randall Barker 7752cdc25d Bug 1358805 - part 2: Allow DynamicToolbarAnimator to query if the UiCompositorController is open in the case it missed the open message r=kats
MozReview-Commit-ID: 8wdMpQh44Zc
2017-04-25 15:13:58 -07:00
Randall Barker fc2f1cfb8d Bug 1358805 - part 1: Add new UiCompositorController message types TOOLBAR_SNAPSHOT_FAILED and IS_COMPOSITOR_CONTROLLER_OPEN r=kats
MozReview-Commit-ID: Ezd8Ng7Zsxm
2017-04-25 15:13:58 -07:00
Randall Barker b81353aaae 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
Mike Conley 622087afdf Bug 1357169 - Backed out changeset 61f417a156ac (Bug 418833). r=mats
MozReview-Commit-ID: 4R6PYCBDQXy

--HG--
extra : rebase_source : f666d43fa15c0e4b66ac1aa9e9c198f1bc3b4758
extra : source : 1f94cae5a27284c114b1f568a14c372345fd60d2
2017-03-31 09:38:56 -04:00
Edouard Oger 027e105cad Bug 1351805 part 3 - Refresh the remote devices list on Married/Engaged states. r=Grisha
MozReview-Commit-ID: 1Ktbtlzc1fI

--HG--
extra : rebase_source : 0d17b41e17b01f65d38be93b7b01be056c75f652
2017-04-19 17:45:49 -04:00
Edouard Oger f86ddc39d6 Bug 1351805 part 2 - Add remote devices to the Browser Provider. r=Grisha
MozReview-Commit-ID: 9yGU2Gy6mX1

--HG--
extra : rebase_source : f7c3bdd1ea703f5726c6c650736211625b4af8b3
2017-04-07 12:24:46 -04:00
Edouard Oger 61034e9bd7 Bug 1351805 part 1 - Create a org.mozilla.gecko.fxa.devices package. r=Grisha,nalexander
MozReview-Commit-ID: FjJmRiHlqEg

--HG--
extra : rebase_source : 0342756d408c89c82e2afbf3c561fd2efad9cb4f
2017-04-07 11:56:38 -04:00
Wes Kocher c9b3f40856 Backed out 3 changesets (bug 1351805) for android Test failures a=backout
Backed out changeset da34da5f310a (bug 1351805)
Backed out changeset 430b56176e04 (bug 1351805)
Backed out changeset a3dfb4b9dc66 (bug 1351805)

MozReview-Commit-ID: AE4RcKV3akz
2017-04-25 12:47:59 -07:00
Edouard Oger dd3f4bde18 Bug 1351805 part 3 - Refresh the remote devices list on Married/Engaged states. r=Grisha
MozReview-Commit-ID: 1Ktbtlzc1fI

--HG--
extra : rebase_source : 2d52926ee1ba8511a32b5a9cfdc13cd04ef4bbb8
2017-04-19 17:45:49 -04:00
Edouard Oger c48ef3d269 Bug 1351805 part 2 - Add remote devices to the Browser Provider. r=Grisha
MozReview-Commit-ID: 9yGU2Gy6mX1

--HG--
extra : rebase_source : 43557fec627f45e4a5e381233c5a5d3115246153
2017-04-07 12:24:46 -04:00
Edouard Oger 96c75ddc3d Bug 1351805 part 1 - Create a org.mozilla.gecko.fxa.devices package. r=Grisha,nalexander
MozReview-Commit-ID: FjJmRiHlqEg

--HG--
extra : rebase_source : 0342756d408c89c82e2afbf3c561fd2efad9cb4f
2017-04-07 11:56:38 -04:00
Carsten "Tomcat" Book aac521e681 Merge mozilla-central to mozilla-inbound 2017-04-25 11:52:19 +02:00