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

22953 Коммитов

Автор SHA1 Сообщение Дата
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