Commit Graph
121 Commits
Author SHA1 Message Date
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
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 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
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
Andrei Lazar 4b288216fc Bug 1478735 Download with target=_blank switches to other tab target=_blank r=JanH,jchen
Download with target=_blank now switches to the parent tab.

Differential Revision: https://phabricator.services.mozilla.com/D6928
2018-10-10 09:49:07 +00:00
Noemi Erli 31db4dddbe Backed out changeset a42437c2e1fe (bug 1478735) for failures in mobile/android/tests/browser/chrome/test_session_parentid.html 2018-10-03 20:20:20 +03:00
Andrei Lazar 69c2da059e Bug 1478735 Download with target=_blank switches to other tab target=_blank r=JanH,jchen
Download with target=_blank now switches to the parent tab.

Differential Revision: https://phabricator.services.mozilla.com/D6928
2018-10-02 20:13:32 +00:00
Jim Chen f2f3a492bf Bug 1457255 - 2. Fix Java warnings; r=me
Fix all Java warnings in the Android codebase except deprecation and
serial warnings, and warnings in third-party code.

There is one required change to exoplayer2 code under thirdparty,
because that code is included directly in the geckoview project, instead
of the thirdparty project. I think I'll just make a pull-request to
upstream the change, instead of separating exoplayer2 into a
gv-thirdparty project.
2018-05-01 00:22:54 -04:00
Noemi Erli 3c14ea8f31 Backed out 4 changesets (bug 1457255) for kotlin warnings/errors are not being parsed by Treeherder a=backout
Backed out changeset 9c42ce50a911 (bug 1457255)
Backed out changeset 524a0f9fb978 (bug 1457255)
Backed out changeset a49833bfd519 (bug 1457255)
Backed out changeset 4eccde5dfbef (bug 1457255)
2018-05-02 01:16:57 +03:00
Jim Chen 1133dd50cb Bug 1457255 - 2. Fix Java warnings; r=me
Fix all Java warnings in the Android codebase except deprecation and
serial warnings, and warnings in third-party code.

There is one required change to exoplayer2 code under thirdparty,
because that code is included directly in the geckoview project, instead
of the thirdparty project. I think I'll just make a pull-request to
upstream the change, instead of separating exoplayer2 into a
gv-thirdparty project.
2018-05-01 00:22:54 -04:00
Jan Henning 9aa44013a6 Bug 1278581 - Part 4 - Ensure the progress bar doesn't get stuck after displaying the error page. r=esawin
For a normal load, we get a request start, the various location change/load
events and then a stop. When encountering an error (e.g. server not found), the
usual event order is start, stop and then the location change/load events while
the error page is loading (compare bug 976426).

When displaying the "unknown protocol" error page from within the Content-
DispatchChooser however, we never receive any onStateChange events from the
WebProgressListener. When this happens within an existing tab, this isn't a
problem - the UI never thinks that the tab is starting a page load and thanks
to bug 976426 never displays the progress bar.

When opening a link in a new tab, though, the UI speculatively creates the tab
as STATE_LOADING and shows the progress bar. Because we never receive any state
change events if the "unknown protocol" error was triggered, especially not a
"Stop" event, the progress bar then never gets hidden because the UI assumes
that the tab is still loading.

To work around this, we make use of the error type that we were still trans-
mitting during DOMContentLoaded - if an error page was detected, we reset the
tab's load state in the UI and stop the progress bar.

We also take this opportunity to change the handling of Content:LoadError
messages. Originally, this message was intended to reset the URL bar if an
attempt to load an URL resulted in an immediate error in browser.js. For un-
known reasons, the rewrite from loading throbber to progress bar changed the
meaning of the event to set the progress value of the progress bar to 80 %, just
like DOMContentLoaded.

With this patch, a Content:LoadError message will immediately stop and hide the
progress bar as well.

MozReview-Commit-ID: 8AXICB7mEfK
2018-03-22 21:51:33 +01:00
Jan Henning ac4cd3ef8e Bug 1437382 - Part 5 - Test that flushing pending session store data sends the expected messages to Java. r=jchen
We attempt to get the session store into a known state as far as is possible
from Java and then test various situations to check that the expected
"PrivateBrowsing:Data" message is received in each case.

MozReview-Commit-ID: 8RkCQjAPXTT
2018-02-20 20:18:36 +01:00
Eugen Sawin 0478424983 Bug 1432235 - [1.2] Move GeckoView API classes to org.mozilla.geckoview. r=snorp,jchen 2018-02-22 00:46:26 +01:00
Jan Henning f2835bd1fb Bug 1426613 - Determine private mode via browser toolbar. r=nechen
The currently selected tab might not actually exist immediately after startup,
in which case the browser toolbar is a safer bet for determining whether we're
in private mode or not.

I think the current worst case is when we're
- not restoring a previous session, and
- need to open some tab queue tabs, and
- also need to open some other tab in response to our launch intent

in which case we won't have a selected tab in Java until after Gecko is up and
running. This in turn can take a while, especially when a fresh copy of
libxul.so needs to be extracted after an update/installation/cleared cache/...,
which potentially gives the user ample time to click on a search result/Top
Sites entry/... that then triggers this crash.

MozReview-Commit-ID: FlJZw2aL8OM
2017-12-22 18:23:03 +01:00
Nevin Chen b16d015b07 Bug 1424179 - Hide PWA badge when site identity updates to mix content. r=walkingice
https://m.aliexpress.com is a good target to test. But it sometimes show mixed content, sometimes not.
I also chnage the check when adding a PWA shortcut. Only fail fast in nightly and local build.

MozReview-Commit-ID: 4sLoNERIYuW
2017-12-08 15:07:42 +08:00
Jan Henning 24138b05eb Bug 1413739 - Part 1 - Offer Firefox itself as an Assist App. r=nechen
The technique for setting our icon is just a straight reimplementation
of bug 1210242.

Because of the way the new tab might be opened from within a
processActionViewIntent Runnable, we can't enter editing mode by simply
listening for an ACTION_ASSIST intent from within BrowserApp, as we need to
enter editing mode *after* the correct tab has already been opened and selected
and BrowserApp doesn't get any hint on when that Runnable might have run.

Instead, we introduce a new tab event, so we can trigger editing mode at the
right time via the tab itself.

MozReview-Commit-ID: 8Bvv5TXyhhI
2017-12-03 21:16:03 +01:00
Jim Chen c995d47ab2 Bug 1416330 - 3. Update Fennec code to not use LayerView; r=rbarker
Use GeckoSession/LayerSession or GeckoView in Fennec code instead of
using LayerView.

MozReview-Commit-ID: Iod7XsqKy1e
2017-12-04 11:50:20 -05:00
Jan Henning 8afa5c87a5 Bug 1415297 - Dispatch TabEvents.LOADED again on DOMContentLoaded. r=sebastian
AddToHomeScreenPromotion uses this for triggering the self-same promotion and
the BrowserToolbar uses it to update its progress display.

MozReview-Commit-ID: 1xrwjWP5Idh
2017-11-07 22:07:05 +01:00
Jim Chen 9df57ef34f Bug 1406168 - 1. Remove JNI.jsm; r=sebastian
Remove JNI.jsm. Convert code that used JNI.jsm to the equivalent using
EventDispatcher.

MozReview-Commit-ID: JQdCubcTBAR
2017-11-01 14:48:48 -04:00
Nevin Chen 0c3f5d9064 Bug 1331290 - Refactor the code about closing all opening tabs. r=JanH,rnewman
MozReview-Commit-ID: LxcY1MyOypF
2017-09-21 14:12:40 +08:00
Nevin Chen d2d5bd20f5 Bug 1409191 - Prefetch manifest before install. r=snorp
This is a "hacked" fix. The key idea is to specify the value in manifest on "add to home screen confirm prompt."
We need to reuse prefetch result for  manifest.install().

The plan is to land this patch before Chrome Dev Summit(10/30) for demostration and fix the rest of the issue in a follow up bug.

MozReview-Commit-ID: A4B0ZK7UjyK
2017-10-19 00:59:58 +08:00
Nevin Chen(:nechen) 5c5d83d134 Bug 1393672 - Add a badge (at the same position of Page Actio) for PWA. r=jwu
This bug is for the front end work to make users more engaged with PWA.

Requirements
1. When the user goes to a web page that has manifest.json, we show a badge(in the same position of page action).
2. If the user switch to another normal page or other Java UI, the page action should be gone.
3. When the user see the PWA website for the first time, we  will display a onboarding prompt to teach him how to add PWA to home screen. This prompt only shows once.

MozReview-Commit-ID: AcyjHPVKg2b
2017-09-26 13:48:09 +08:00
Michael Comella 9598c2efe6 Bug 1393699: Add referrerURI to Tabs.loadUrl flows. r=liuche
This will allow us to call Tabs.loadUrl with a referrer URI from the Pocket top
stories.

MozReview-Commit-ID: IGdoTo80SGG
2017-08-30 15:26:03 -07:00
Jan Henning 22e4b15e96 Bug 1389564 - Part 2 - Test that restored (background) tabs are correctly written back to disk. r=gbrown
So far, we haven't tested session restoring and saving in combination, which led to bug 1379374 where restored background tabs weren't being written back to disk after upgrading to Firefox 55.

MozReview-Commit-ID: 7CUbis7u8fb
2017-08-11 19:57:56 +02:00
Jing-wei Wu 43bdef7b14 Bug 1375351 - Part 3: Remove SkinConfig. r=nechen,walkingice
SkinConfig is used to detect current skin is Australis or Photon at runtime.
Since we don't support Australis anymore in Nightly, this class should be removed.

MozReview-Commit-ID: 8yjTFYyQcgt
2017-08-09 14:19:28 +08:00
Nevin Chen 6cf395ca95 Bug 1384480 - Move MMA event to UI code. r=sebastian
MozReview-Commit-ID: FzrLqWVFWO0
2017-07-26 17:49:58 +08:00
cnevinc bb19e0422d Bug 1383762 - Change the event timing for adding a new normal tab. r=maliu
MozReview-Commit-ID: Lyf7yeTFpzq
2017-07-26 00:30:22 +08:00
Jan Henning 5e72a2ed31 Bug 1366098 - Part 1 - Remove Fennec tab type infrastructure. r=walkingice
The new, preferred solution for displaying additional web content outside of our normal tab infrastructure and UI is to use a separate GeckoView instance. Therefore, the support for different having additional "tab" types that aren't displayed in the normal UI, as well as for multiple GeckoApp instances displaying different tabs is no longer needed and can be removed.

MozReview-Commit-ID: FNx0gJIKybr
2017-06-27 14:13:40 -07:00
jwu dfce311abb Bug 1366659 - Show default homepage when creating a private tab. r=walkingice
MozReview-Commit-ID: JhGZIFgGYou
2017-07-04 10:52:08 +08:00
Nevin Chen d7e88f6f4f Bug 1377022 - Remove revisit Leanplum event. r=maliu
MozReview-Commit-ID: DlnGoOzHwz9
2017-06-29 14:24:15 -07:00
Nevin Chen 272ed1a7e9 Bug 1375931 - Align event name format r=nechen
MozReview-Commit-ID: 2Af1z7dYnsC
2017-06-28 18:23:47 -07:00
Dylan Roeh 3c40b42348 Bug 1365599 - Make Tabs use the window event dispatcher rather than global in some instances. r=jchen 2017-06-16 13:40:48 -05:00
Eugen Sawin 082e2224bd Bug 1369689 - [1.0] Make page load time logs depend on web progress events instead of throbber activity. r=snorp 2017-06-06 12:56:15 +02:00
Dylan Roeh 11f96ed230 Bug 1369393 - Backout GV-based custom tabs, PWAs, and Tabs.java changes. r=me 2017-06-01 09:28:31 -05:00
Dylan Roeh 2c114d0964 Bug 1365599 - Make Tabs use the window event dispatcher rather than global in some instances. r=jchen 2017-05-31 16:58:54 -05:00
Nevin Chen a110ffbac7 Bug 1361664 - Part2. Create MVP Triggers and Deeplinks for Mobile Marketing Automatin. r=maliu
This patch do 6 things. They are related so I put them in the same patch.
1. Extract MmaEvent Name
2. If MMA is diabled, don't send event.
3. Add check before sending 'Set Default Borwser' deep link
4. Add user attribute for delay messaging focus install status.
5. If the user pref off at runtime, we ask Leanplum to stop and prevent our app sending event to Leanplum.
6. Fix proguard. Only keep necceary files.

MozReview-Commit-ID: APEmr1JXBLH
2017-05-17 01:25:45 +08:00
Sebastian Hengst 3b4b03d8fb Backed out changeset d289ee2c794d (bug 1361664)
MozReview-Commit-ID: gNRtEiyg7W
2017-05-27 14:00:27 +02:00
Nevin Chen 912e74135b Bug 1361664 - Part2. Create MVP Triggers and Deeplinks for Mobile Marketing Automatin. r=maliu
This patch do 5 things. They are related so I put them is the same patch.
1. Extract MmaEvent Name
2. If MMA is diabled, don't send event.
3. Add check before sending 'Set Default Borwser' deep link
4. Add user attribute for delay messaging focus install status.
5. If the user pref off at runtime, we ask Leanplum to stop and prevent our app sending event to Leanplum.

MozReview-Commit-ID: APEmr1JXBLH
2017-05-17 01:25:45 +08:00
Sebastian Hengst 4f36d5e85b Backed out changeset 59dc8710d768 (bug 1361664) 2017-05-26 13:40:51 +02:00
Nevin Chen 592593a928 Bug 1361664 - Part2. Create MVP Triggers and Deeplinks for Mobile Marketing Automatin. r=maliu
This patch do 5 things. They are related so I put them is the same patch.
1. Extract MmaEvent Name
2. If MMA is diabled, don't send event.
3. Add check before sending 'Set Default Borwser' deep link
4. Add user attribute for delay messaging focus install status.
5. If the user pref off at runtime, we ask Leanplum to stop and prevent our app sending event to Leanplum.

MozReview-Commit-ID: APEmr1JXBLH
2017-05-17 01:25:45 +08:00
Jan Henning a36b9a932d Bug 1359531 - Part 5 - Trigger activity switching from GeckoApp. r=sebastian,walkingice
To avoid the need for tracking the currently active activity, we just respond from the activity itself by using GeckoApp's tab event listener.

As replacement for the "closeTabNoActivitySwitch()" function, we set a flag on the activity instead before closing the tab.

MozReview-Commit-ID: LdmyJ5i10jZ
2017-04-29 15:20:19 +02:00
Jan Henning 3c65d21240 Bug 1359531 - Part 3 - Creating new intents is a job for IntentHelper. r=sebastian,walkingice
MozReview-Commit-ID: 9s7aP35Q0AJ
2017-04-28 22:35:29 +02:00
Jan Henning c11ad4d04b Bug 1359531 - Part 2 - Move some tab switch functionality to the tab object. r=sebastian,walkingice
These methods already take a tab object as their argument, so we just turn them into Tab member functions.

MozReview-Commit-ID: 7fp7bzDbRja
2017-04-28 22:35:57 +02:00
Ryan VanderMeulen 4551e69b02 Merge m-c to autoland. a=merge 2017-05-19 12:26:48 -04:00
Jan Henning a76b19e64c 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
2017-05-18 20:45:22 +02:00
Alastor Wu 524ac35a9c Bug 1357639 - part8 : add annotiation @RobocopTarget. r=sebastian
To make sure these functions can be used in robocop test.

MozReview-Commit-ID: KPAKOrg5Ows
2017-05-08 14:10:56 +08:00
Sebastian Hengst 665f48c295 Backed out changeset 7ded779bd7fc (bug 1357639) 2017-05-04 21:23:42 +02:00
Alastor Wu be4b610ff8 Bug 1357639 - part8 : add annotiation @RobocopTarget. r=sebastian
To make sure these functions can be used in robocop test.

MozReview-Commit-ID: KPAKOrg5Ows
2017-05-04 15:24:00 +08:00
Sebastian Hengst fc80525db1 Backed out changeset d37e0ce6c7c9 (bug 1357639) 2017-05-02 21:40:30 +02:00