Commit Graph
3472 Commits
Author SHA1 Message Date
Cosmin Sabou eb21b4eef4 Merge mozilla-inbound to mozilla-central. a=merge 2018-11-28 06:08:19 +02:00
Ryan Hendrickson 803e559f4f Bug 1500479 - Part 1: browser.tabs.onActivated; r=mixedpuppy,rpl,JanH
Add an optional previousTabId property to the onActivated event,
which is present if the previously activated tab is still open.

Differential Revision: https://phabricator.services.mozilla.com/D9271
2018-11-26 04:16:30 +00:00
Eugen Sawin 05227ed0f9 Bug 1509266 - [2.0] Update onContextMenu delegate implementations. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D12968
2018-11-27 20:30:47 +00:00
Petru Lingurar 7d52f9671c Bug 1504780 - Prevent crash if GeckoProfile path is not known; r=geckoview-reviewers,snorp
In this case the profile name will be null, situation already handled, in which
a telemetry ping about the crash will not be sent but the crash can still be
reported to crash-stats.

Differential Revision: https://phabricator.services.mozilla.com/D12741
2018-11-26 19:21:56 +00:00
James Willcox 3696731844 Bug 1486524 - Don't use XZ compression for libs on Android r=glandium,nalexander
This also uses idiomatic packaging of the native libraries, which
will allow easier downstream consumption of GeckoView.

Differential Revision: https://phabricator.services.mozilla.com/D10775
2018-11-23 20:31:57 +00:00
James Willcox 2f121855cc Bug 1509146 - Remove default implementations in GeckoView interfaces r=nalexander
JaCoCo chokes on default implementations in interfaces, so remove those
for now.

Differential Revision: https://phabricator.services.mozilla.com/D12607
2018-11-23 19:42:26 +00:00
Jan Henning 7910c8377e Bug 1500023 - Only process previous session file once per app startup. r=nalexander
Even if the GeckoApp activity is destroyed, the user's tabs remain open as long
as the app process itself isn't killed.
Therefore, for users who aren't automatically restoring their previous session's
tabs on startup, there's no point in renaming the current session store file so
it appears under "Recently closed" instead of being automatically restored,
unless we're really doing a cold startup (and hence mIsRestoringActivity is
false).
This also better matches what we do when we *are* automatically restoring tabs:
We only do it when !mIsRestoringActivity, too.

Differential Revision: https://phabricator.services.mozilla.com/D11800
2018-11-22 17:10:49 +00:00
Petru Lingurar 9b28da3a4f Bug 1484528 - Prevent page loading indicator running continuously; r=JanH
The page loading indicator should be animated while it is visible.
Previously for controlling the animation the visibility state of the parent
Drawable - ShiftDrawable would be checked, which in all cases would return
true, so the animation would run indefinitely.

The patch modifies setVisible() in accordance with the Framework version of
DrawableWrapper to corectly set the visibility of both the wrapper and the
wrapped drawables so that isVisible() will now return the correct value which
will allow stopping the animation.

Differential Revision: https://phabricator.services.mozilla.com/D12552
2018-11-22 14:52:46 +00:00
Petru Lingurar 1b10daacc1 Bug 1505685 - Part 3 - Register HeadSetStateReceiver on the main thread; r=JanH
Summary:
Speculative fix.

initialize() is called by Gecko on it's background thread after it started.
The value for the "dom.audiochannel.mediaControl" preference also comes on a
background thread.
This both can end up registering the HeadSetStateReceiver while unregistering it
happens only on the main thread.
The patch tries to avoid the race condition by making sure Receiver's
registering and unregistering is done serially on the main thread.

Depends on D12032

Reviewers: JanH

Reviewed By: JanH

Subscribers: jya

Bug #: 1505685

Differential Revision: https://phabricator.services.mozilla.com/D12033
2018-11-21 12:16:34 +02:00
Petru Lingurar 1e046e0ef9 Bug 1505685 - Part 2 - Cleanup - remove second SwitchBoard.loadConfig(); r=JanH
Summary:
Executing SwitchBoard.loadConfig() on a background thread is the main purpose
of the AsyncConfigLoader so executing it immediately again in the same thread
is redundant.

Depends on D12031

Reviewers: JanH

Reviewed By: JanH

Bug #: 1505685

Differential Revision: https://phabricator.services.mozilla.com/D12032
2018-11-21 12:15:12 +02:00
Petru Lingurar 08cee66083 Bug 1505685 - Part 1 - Register PackageAddedReceiver on the main thread; r=JanH
Summary:
Speculative fix for avoiding the situation in which the initialization of Mma
and registering of the PackageAddedReceiver continues on the background thread
after BrowserApp is destroyed and calls for unregistering the receiver.
By registering the receiver on the main thread we have the benefit of
sequentially execution which would guarantee that the registration is done
before trying to unregister it.

Reviewers: JanH

Reviewed By: JanH

Bug #: 1505685

Differential Revision: https://phabricator.services.mozilla.com/D12031
2018-11-21 12:12:53 +02:00
Cosmin Sabou 53d63a70cf Backed out 3 changesets (bug 1505685) for android checkstyle failures on GeckoMediaControlAgent.
Backed out changeset 6e2a67a9a9c9 (bug 1505685)
Backed out changeset a46710b7723f (bug 1505685)
Backed out changeset 9344087c8d8e (bug 1505685)
2018-11-21 11:45:59 +02:00
Petru Lingurar b9ec0f7597 Bug 1505685 - Part 3 - Register HeadSetStateReceiver on the main thread; r=JanH
Summary:
Speculative fix.

initialize() is called by Gecko on it's background thread after it started.
The value for the "dom.audiochannel.mediaControl" preference also comes on a
background thread.
This both can end up registering the HeadSetStateReceiver while unregistering it
happens only on the main thread.
The patch tries to avoid the race condition by making sure Receiver's
registering and unregistering is done serially on the main thread.

Depends on D12032

Reviewers: JanH

Reviewed By: JanH

Subscribers: jya

Bug #: 1505685

Differential Revision: https://phabricator.services.mozilla.com/D12033
2018-11-21 11:21:52 +02:00
Petru Lingurar 8a3051fd17 Bug 1505685 - Part 2 - Cleanup - remove second SwitchBoard.loadConfig(); r=JanH
Summary:
Executing SwitchBoard.loadConfig() on a background thread is the main purpose
of the AsyncConfigLoader so executing it immediately again in the same thread
is redundant.

Depends on D12031

Reviewers: JanH

Reviewed By: JanH

Bug #: 1505685

Differential Revision: https://phabricator.services.mozilla.com/D12032
2018-11-21 11:21:01 +02:00
Petru Lingurar 5c7ddcde0e Bug 1505685 - Part 1 - Register PackageAddedReceiver on the main thread; r=JanH
Summary:
Speculative fix for avoiding the situation in which the initialization of Mma
and registering of the PackageAddedReceiver continues on the background thread
after BrowserApp is destroyed and calls for unregistering the receiver.
By registering the receiver on the main thread we have the benefit of
sequentially execution which would guarantee that the registration is done
before trying to unregister it.

Reviewers: JanH

Reviewed By: JanH

Bug #: 1505685

Differential Revision: https://phabricator.services.mozilla.com/D12031
2018-11-21 11:18:41 +02:00
Dylan Roeh 6959532b0d Bug 1509342 - Move startService() call to BrowserApp.onResume() to guarantee we're foregrounded. r=snorp 2018-11-27 10:10:06 -06:00
Dylan Roeh 792b9b3d4d Bug 1494748 - Add a service to kill the Fennec process when the user swipes-to-kill Fennec. r=snorp
Leaving the Fennec process running after a swipe-to-kill puts Fennec in an unrecoverable state; this ensures we kill the process anytime a user swipes-to-kill Fennec and therefore lets us recover as usual.
2018-11-20 09:35:29 -06:00
Narcis Beleuzu b1810946e8 Backed out 2 changesets (bug 1500479) for bc failures on browser_ext_tabs_update_highlighted.js. CLOSED TREE
Backed out changeset e93f7c2b5263 (bug 1500479)
Backed out changeset 838185d7a6e7 (bug 1500479)
2018-11-15 21:05:39 +02:00
Ryan Hendrickson 56956c7a14 Bug 1500479 - Part 1: browser.tabs.onActivated; r=mixedpuppy,rpl,JanH
Add an optional previousTabId property to the onActivated event,
which is present if the previously activated tab is still open.

Differential Revision: https://phabricator.services.mozilla.com/D9271
2018-11-15 15:17:16 +00:00
Andreea Pavel 9d857f691b Backed out changeset 2bc6db0a2574 (bug 1486524) android raptor failures ona CLOSED TREE 2018-11-14 23:04:59 +02:00
Andreea Pavel 2ef93af30c Backed out 2 changesets (bug 1500479) for failing bc at browser/components/extensions/test/browser/browser_ext_tabs_events.js on a CLOSED TREE
Backed out changeset 6f209bee42c5 (bug 1500479)
Backed out changeset 02ea631f55c3 (bug 1500479)
2018-11-14 21:09:19 +02:00
James Willcox 1719c73fa2 Bug 1486524 - Don't use XZ compression for libs on Android r=glandium,nalexander
This also uses idiomatic packaging of the native libraries, which
will allow easier downstream consumption of GeckoView.

Differential Revision: https://phabricator.services.mozilla.com/D10775
2018-11-14 17:48:58 +00:00
Ryan Hendrickson 1ef15daf8a Bug 1500479 - Part 1: browser.tabs.onActivated; r=mixedpuppy,rpl,JanH
Add an optional previousTabId property to the onActivated event,
which is present if the previously activated tab is still open.

Differential Revision: https://phabricator.services.mozilla.com/D9271
2018-11-14 17:22:26 +00:00
Petru Lingurar 6a26d95cb3 Bug 1501571 - Inform user that FHR must be enabled for 'Product and feature tips' to work; r=geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D11457
2018-11-13 19:21:16 +00:00
Eugen Sawin 8d70659833 Bug 1499418 - [3.2] Refactor and move Fennec's telemetry classes to geckoview/. r=jchen 2018-11-13 17:39:27 +01:00
Jan Henning b02d8544d7 Bug 1506699 - Make dumping a profile to disk easier when using MOZ_PROFILER_SHUTDOWN. r=snorp
We're already have some special handling in the Android UI when detecting
MOZ_PROFILER_STARTUP, so we might as well handle MOZ_PROFILER_SHUTDOWN, too.

This means two things:
1. In order to actually quit the app, the "Quit" button needs to be enabled.
2. We need to wait until we're sure that the profile has been dumped to disk
   before finishing the activity (and thereby possibly killing our process).

Differential Revision: https://phabricator.services.mozilla.com/D11696
2018-11-13 06:55:03 +00:00
Jan Henning eb00a5069a Bug 1506689 - Wait for JNI_READY before getting profiler time stamp from Gecko. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D11692
2018-11-13 06:55:01 +00:00
Agi Sferro a2f0c7beb9 Bug 1436754 - Move LayerSession and related to org.mozilla.geckoview; r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D10989
2018-11-07 17:28:17 +00:00
Petru Lingurar 3cce74e26d Bug 1501648 - Prevent crashes for unregistered receivers from MmaDelegate and GeckoMediaControlAgent; r=jchen,JanH
Although this two receivers are guarded by checks for if they were initialized
(and so registered) there are reports of crashes because of trying to unregister
them without them actually being registered.

The underlying issue will be investigated further in bug 1505685 but for the
moment wrapping the unregister operations in a try-catch saves the users from
a crash and because the unregister is done when the app is closed
(for the MmaDelegate receiver) or when the app finished playing media
(for the GeckoMediaControlAgent receiver) the user doesn't loose any
functionality going forward.

Differential Revision: https://phabricator.services.mozilla.com/D11177
2018-11-08 12:08:40 +00:00
Petru Lingurar eefd5e0e91 Bug 1499415 - Check mExtensionPermissionsHelper for null before using it; r=sdaswani
`mExtensionPermissionsHelper` is initialized in BrowserApp's onCreate() and
nullified in it's onDestroy().
GeckoApp's onCreate() can finish after BrowserApp's onDestroy() because it uses
background initialization.
`mExtensionPermissionsHelper` will be checked for null before using it and
if null it's safe to ignore it's method's results as it only can be null if the
app was already closed.

Differential Revision: https://phabricator.services.mozilla.com/D10910
2018-11-05 17:09:43 +00:00
Jan Henning b07c7fcb92 Bug 1488874 - Part 2: Notification channel name changes. r=nalexander
The media and default channels are changed as per comment 2 of this bug.
I'm keeping the location service string as it is, though, as our settings UI
uses "&vendorShortName; Location Service" as well.

Differential Revision: https://phabricator.services.mozilla.com/D10771
2018-11-05 18:54:24 +00:00
Jan Henning cfede68f7a Bug 1488874 - Part 1: Fix notes. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D10770
2018-11-05 18:54:17 +00:00
James Willcox a1c4c6fb32 Bug 1405081 - Add WebRequestError and use it in NavigationDelegate.onLoadError r=esawin,jchen
Differential Revision: https://phabricator.services.mozilla.com/D7797
2018-11-01 09:51:50 -05:00
Petru Lingurar 0b96bf8091 Bug 1502435 - 2 - Include new bug_1501329_affected property in the core ping; r=jchen
Summary: Depends on D10202

Reviewers: jchen

Reviewed By: jchen

Subscribers: jchen, janerik

Bug #: 1502435

Differential Revision: https://phabricator.services.mozilla.com/D10205
2018-10-31 01:13:57 +02:00
Daniel Varga 6a2abefd37 Backed out changeset ef5037b7a3cd (bug 1501571) requested by dev for concerns regarding localization. a=backout 2018-10-30 13:21:59 +02:00
Petru Lingurar dbb9bbd5d2 Bug 1501571 - Update <Product and feature tips> setting summary when disabled; r=jchen
Needed to allow localizers more control over what needs to be translated in a
String that contains another already translated String that should be bolded.

Differential Revision: https://phabricator.services.mozilla.com/D9629
2018-10-29 16:24:10 +00:00
Julien Wajsberg a506948fea Bug 1502321 - Remove unexpected log in the Java Sampling code r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D9905
2018-10-29 01:28:55 +00:00
Nick Alexander 486572fa16 Bug 1501053 - Drop minApi flavor dimension. r=petru
Differential Revision: https://phabricator.services.mozilla.com/D9428
2018-10-25 20:29:49 +00:00
Nick Alexander 8845e72430 Bug 1391551 - Drop Fennec skin flavor dimension. r=petru
Differential Revision: https://phabricator.services.mozilla.com/D9308
2018-10-25 20:24:44 +00:00
Ciure Andrei e282caf47d Backed out 2 changesets (bug 1501053, bug 1391551) for causing lint build bustages CLOSED TREE
Backed out changeset 91ab8acb16b2 (bug 1501053)
Backed out changeset 9397caac8090 (bug 1391551)
2018-10-25 22:34:21 +03:00
Nick Alexander 657fe25781 Bug 1501053 - Drop minApi flavor dimension. r=petru
Differential Revision: https://phabricator.services.mozilla.com/D9428
2018-10-24 19:50:55 +00:00
Nick Alexander 8c8921a752 Bug 1391551 - Drop Fennec skin flavor dimension. r=petru
Differential Revision: https://phabricator.services.mozilla.com/D9308
2018-10-25 05:52:58 +00:00
Jan Henning 2b0901ff9f Bug 1500906 - Suppress FileUriExposedExceptions when launching helper apps. r=jchen
Sharing tabs with file:// URIs is not possible, but users can still send them to
other apps via the helper app system in the URL bar/context menu. "Intent:Open"
and "Intent:OpenForResult" are both sent from Gecko by HelperApps.jsm.

The same reasoning as in bug 1450449 applies as to why for publicly accessible
files content:// URIs are more trouble than they're worth.

Differential Revision: https://phabricator.services.mozilla.com/D9420
2018-10-24 16:00:06 +00:00
Petru Lingurar e919ebc5d4 Bug 1459864 - Modify <Product and feature tips> setting summary when disabled; r=jchen
Inform the user about why is this feature disabled and what to do to enable it.

Differential Revision: https://phabricator.services.mozilla.com/D8545
2018-10-19 14:25:57 +00:00
Eugen Sawin ac3f859386 Bug 1499895 - [1.3] Add triggering URI to onLoadRequest. r=snorp,jchen 2018-10-19 02:56:11 +02:00
Edouard Oger 7ab54c4e02 Bug 1497977 p1 - Renew the fxa device registration/client record on FxA account reconnection. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D8606
2018-10-17 18:22:57 +00:00
shindli 5260b3dc8b Merge inbound to mozilla-central. a=merge 2018-10-17 03:55:26 +03:00
Jan Henning 80f8c26be7 Bug 1498854 - Rework dismissing of TabHistoryFragment. r=jchen
1. The patch from bug 1476710 was nonsense and had the same effect as simply
   deleting that line, because the ChildFragmentManager is only of interest if
   the TabHistoryFragment loaded further Fragments itself.
2. The issue at hand is that under some circumstances the TabHistoryFragment
   will be trying to dismiss itself while its responsible FragmentManager is
   already busy transacting some Fragment state changes.  More precisely, the
   fact that the Fragment is calling popBackStack*Immediately*, which isn't
   allowed if the FragmentManager is already handling some other transaction.
3. The dismiss() calls in response to the onClick() handlers are unproblematic,
   because they won't trigger any FragmentManager activity through any route
   other than the dismiss() call itself.
4. The dismiss() calls in onPause() *are* problematic because the Fragment-
   Manager will already be busy pausing the TabHistoryFragment, so triggering a
   further synchronous transaction is not allowed (and originally caused
   bug 1476710).
5. If the onPause() call happened because some external entity was attempting to
   remove the fragment (either BrowserApp directly, or indirectly by forwarding
   a back button press to the FragmentManager), then the Fragment trying to
   additionally remove itself is unnecessary.
6. If the onPause() call happens because the containing activity itself is being
   paused, then the Fragment being dismissed is the desired outcome (see
   bug 1093209), however the Fragment won't be able to remove itself because
   a) A synchronous transaction is illegal at that point in time.
   b) An async transaction would be possible, but might not complete until after
      onSaveInstanceState() had subsequently already been called, which again
      would be illegal because of state loss.
   c) An async transaction allowing state loss would succeed in any case, but
      would mean that if BrowserApp was subsequently destroyed while in back-
      ground and then later recreated from the savedInstanceState, the Tab-
      HistoryFragment would be recreated as well, which is undesired.
7. Therefore, the only way to dismiss the TabHistoryFragment when the containing
   activity is pausing is to synchronously dismiss the Fragment from inside the
   activity, *before* the onPause() call is forwarded to the FragmentManager.
8. Calling dismiss() in response to onDestroy() is unnecessary, because the
   Fragment is already irrevocably being removed as soon as we hit onPause().
9. Because it doesn't make sense to have multiple TabHistoryFragments active at
   the same time, we also change the logic such that any attempt to show a new
   TabHistoryFragment will now replace the previous fragment.
   This is also useful in view of the fact that in order to close the Fragment,
   BrowserApp retrieves it by calling findFragmentByTag(), which simply returns
   the first matching Fragment, i.e. wouldn't properly handle things if we ever
   accidentally ended up with multiple Fragment instances active at the same
   time.

Differential Revision: https://phabricator.services.mozilla.com/D8680
2018-10-16 16:17:18 +00:00
Rob Wu 076faf1471 Bug 1005268 - Remove "datetime" UI from Fennec and fix capitalization issue r=jchen
`<input type=datetime>` was dropped from the spec many years ago,
and is not supported by the platform. To JS code, it looks like a
regular text input box.

With removed support for "datetime" inputs, we can also fix a bug in the
InputWidgetHelper. Due to the use of getAttribute, if the attribute
value was capitalized, then the special date/time picker UI would not be
shown. This is corrected by using the "type" property instead.

I verified on Android Nougat that all other input types (date,
datetime-local, week, month, time) still work as intended.

Depends on D8668

Differential Revision: https://phabricator.services.mozilla.com/D8666
2018-10-16 15:57:26 +00:00
Rob Wu c46c5ef71c Bug 1498787 - Support seconds in time inputs r=jchen
When a time input expects seconds, e.g. via `<input type=time step=1>`,
then the UI should show a way to input seconds.

On Nougat, `data:text/html,<input type=time step=1>`,
the UI used to show a clock to select hours and minutes.
As of this commit, three spinners are shown (HH mm ss),
and if 24-hour mode is disabled, four of them (HH mm ss AM).

Depends on D8667

Differential Revision: https://phabricator.services.mozilla.com/D8668
2018-10-16 15:59:24 +00:00