Commit Graph
2909 Commits
Author SHA1 Message Date
Sebastian Hengst f4108d27b6 Backed out changeset 1bc5e32dd5f6 (bug 1399014) for failing android lint. r=backout 2017-09-14 12:29:35 +02:00
Sebastian Kaspari e01f3e1339 Bug 1396941 - SuggestedSitePreparer: Update local cache if suggested sites change. r=mcomella
MozReview-Commit-ID: 2QMqGHQaBSP
2017-09-13 19:57:19 +02:00
Nevin Chen 10e4129e4d Bug 1399014 - Alow 'enable tracking protection in normal browsing' for release and beta channel. r=maliu
In Android,  "privacy.trackingprotection.state" is not a "real" pref name, but it's used in the setting menu and browser.js.
 "privacy.trackingprotection.state" and "privacy.trackingprotection.pbmode.enabled"(deleted) in Android is init in Helper.getPrefs and  passed to browser.js when changed.
The real pref for tacking protection are two Gecko pref in browser.js. They are:
           "privacy.trackingprotection.pbmode.enabled"
           "privacy.trackingprotection.enabled"
All prefs in Android are delegated to them. The Android setting UI simply reflects the single source of truth (Gecko pref).
That's the reason why the two Android perfs use android:persistent="false"

MozReview-Commit-ID: 5ehBhtNM2Tx
2017-09-14 15:16:55 +08:00
Sebastian Hengst e420b2b8c0 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 6nttXoSo3Fh
2017-09-14 11:04:14 +02:00
Wes Kocher 44c4ae360e Merge inbound to central, a=merge
MozReview-Commit-ID: ClVRh99eIUo
2017-09-14 00:03:28 -07:00
Sebastian Hengst 1860e36d3f merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-14 00:15:34 +02:00
James Willcox 14d5d6f27d Bug 1395557 - Show the right icon for mixed passive mode in Custom Tabs r=esawin
MozReview-Commit-ID: GHXVl3BNW9Q
2017-09-13 15:36:52 -05:00
Grigory Kruglov 8729603a12 Bug 1399039 - Don't initialize GlobalPageMetadata more than once r=sebastian
MozReview-Commit-ID: 6VqkvDrEc5K
2017-09-12 20:28:36 -04:00
Jan Henning 94c01e5fca Bug 1398599 - Use default network access StrictMode policy on developer builds, too. r=snorp
Our user-facing builds crash if we manage to slip in some main thread network access by mistake (which is the default Android StrictMode policy since Honeycomb), so our developer builds shouldn't be more forgiving here.

MozReview-Commit-ID: 6bZwwwrSb3q
2017-09-12 22:07:14 +02:00
Jing-wei Wu 8a98e91562 Bug 1399384 - Part 2: Status bar color refinements. r=nechen
We would like to change the status bar color based on different situation:

- For mobile, the status bar color is
  #F7FAFC in normal mode,
  #38383D in private mode, and
  #272727 in tabs tray page

- For tablet, the status bar color is always #272727

MozReview-Commit-ID: Ala5ZOYJ8Ad
2017-09-13 17:17:25 +08:00
suneet 7cf31e5a7a Bug 1394879 - Replaced TouchDelegate usage with TouchDelegateWithReset .r=JanH
MozReview-Commit-ID: 4pTiOXAUkp0
2017-09-14 01:45:19 +05:30
Chenxia Liu 91fe14b36e Bug 1399042: Move NO_POSITION check for IndexOutOfBoundsException in onItemClick. r=mcomella
MozReview-Commit-ID: GAs6HOwp8ru
2017-09-13 14:31:51 -07:00
Michael Comella 608da86598 Bug 1393579: Show subdomain.domain for pages without titles in top sites. r=liuche
MozReview-Commit-ID: 9SugVwZDbD7
2017-09-12 13:58:51 -07:00
Michael Comella f58032a10a Bug 1388396: Add MinimumSizeProcessor; .forActivityStream takes effect. r=sebastian
This patch is necessary for the previous changesets to take effect.

MozReview-Commit-ID: 98IemAEgbmi
2017-09-11 17:41:33 -07:00
Michael Comella 6fb90e1488 Bug 1388396: Use IconRequestBuilder.forActivityStream in AS UI. r=sebastian
MozReview-Commit-ID: jLVtXk0hJZ
2017-09-11 17:27:22 -07:00
Michael Comella 2db71afd1b Bug 1388396: Add IconRequestBuilder.forActivityStream. r=sebastian
MozReview-Commit-ID: HwCjdyB7o7q
2017-09-11 17:25:10 -07:00
Michael Comella 6663d4674c Bug 1388396: Increase max favicon scale factor to 3. r=sebastian
This is part 1 of the good-enough approach: see the MAX_SCALE_FACTOR comment
as to what we're aiming for. The next changeset will discard any icons that
do not look good being scaled so much.

The MAX_SCALE_FACTOR field is non-private because it's used in the next
changeset.

MozReview-Commit-ID: HGzdQBEuMAy
2017-09-11 17:13:07 -07:00
Sebastian Kaspari 029e8bd7dd Bug 1389296 - TopSitesCard: Only load icon if we have a non-empty non-null page URL. r=mcomella
MozReview-Commit-ID: D7oTM9oJ3zT
2017-09-04 16:02:00 +02:00
Sebastian Hengst a39cf48422 Backed out changeset 0aff84a0a8af (bug 1388396) for failing linter android-test's TestResizingProcessor. testBitmapIsNotScaledMoreThanTwoTimesTheSize. r=backout 2017-09-13 09:51:46 +02:00
Sebastian Hengst e3d08eaace Backed out changeset 8756322ebb4a (bug 1388396) 2017-09-13 09:50:35 +02:00
Sebastian Hengst dfdc91dfab Backed out changeset 77f982a2f17b (bug 1388396) 2017-09-13 09:50:29 +02:00
Sebastian Hengst 3c5307c431 Backed out changeset 44fa7b379742 (bug 1388396) 2017-09-13 09:50:24 +02:00
Michael Comella d6754e7e58 Bug 1398834: Add telemetry for new browser menu pin site. r=liuche
MozReview-Commit-ID: 4GYXLk5yhbt
2017-09-12 17:03:23 -07:00
Michael Comella ec8d5bfcbb Bug 1398834: Add Pin to Top Sites page menu item. r=liuche
MozReview-Commit-ID: 3YK2V7zrUDC
2017-09-12 15:31:15 -07:00
Jing-wei Wu 904bf31b45 Bug 1380266 - Keep identical click behavior between HomeAsUpIndicator and back button. r=nechen
Call `onBackPressed()` when `android.R.id.home` is selected to make sure the same click behavior between
HomeAsUpIndicator and back button.

MozReview-Commit-ID: 3tTKtbDTugg
2017-09-11 10:23:25 +08:00
Grigory Kruglov f97dbbe992 Bug 1368147 - Migrate sync and reading list preferences to be keyed by account UID r=nalexander,sebastian
Due to how we access our prefs files (read: all over the place), the idea here is to perform the migration whenever
some component actually attempts to get the prefs. This guarantees that every consumer of prefs will receive the
correct version, and we won't accidentally duplicate our shared prefs either.

I would have preferred to just perform this migration at a set point.
We have a "services upgrade point" - FxAccountUpgradeReceiver - which receives a "package upgraded" intent and kicks
off some async work. Unfortunately, we can't guarantee that its tasks won't overlap with our uses of prefs
(either in the background or foreground code).

MozReview-Commit-ID: AWQ4IY7i32F
2017-09-12 16:00:37 -04:00
Chenxia Liu b37f494103 Bug 1380811 - Add telemetry to collect boolean state for toggle preference. r=francois,mcomella
MozReview-Commit-ID: DQUkuWQUouM
2017-09-11 18:42:29 -07:00
Michael Comella 4f48b46ff4 Bug 1388396: Add MinimumSizeProcessor; .forActivityStream takes effect. r=sebastian
This patch is necessary for the previous changesets to take effect.

MozReview-Commit-ID: 98IemAEgbmi
2017-09-11 17:41:33 -07:00
Michael Comella 7ed8015edb Bug 1388396: Use IconRequestBuilder.forActivityStream in AS UI. r=sebastian
MozReview-Commit-ID: jLVtXk0hJZ
2017-09-11 17:27:22 -07:00
Michael Comella bb4ba22798 Bug 1388396: Add IconRequestBuilder.forActivityStream. r=sebastian
MozReview-Commit-ID: HwCjdyB7o7q
2017-09-11 17:25:10 -07:00
Michael Comella e219275e2f Bug 1388396: Increase max favicon scale factor to 3. r=sebastian
This is part 1 of the good-enough approach: see the MAX_SCALE_FACTOR comment
as to what we're aiming for. The next changeset will discard any icons that
do not look good being scaled so much.

The MAX_SCALE_FACTOR field is non-private because it's used in the next
changeset.

MozReview-Commit-ID: HGzdQBEuMAy
2017-09-11 17:13:07 -07:00
Michael Comella aa0f4a38ea Bug 1391413: Show 2 lines of top sites titles for distributions. r=sebastian
MozReview-Commit-ID: JcW22s8oDMG
2017-09-11 13:27:54 -07:00
Michael Comella 830480e8b4 Bug 1391413: Add comment clarifying use of PREFS_IS_FIRST_RUN. r=sebastian
MozReview-Commit-ID: 465V6Q8Ig1D
2017-09-07 17:11:16 -07:00
Michael Comella 66f66f92eb Bug 1391413: Always show page titles for distributions. r=sebastian
This is the desired behavior but as per comment 8, it breaks a few existing
distributions' titles so we'll display two lines for those distributions in
the upcoming changesets.

MozReview-Commit-ID: CKFbHXbs3HT
2017-09-07 15:30:00 -07:00
Michael Comella 6c5ec0776b Bug 1391413: Add SuggestedSites.cachedDistributionSites and accessors. r=sebastian
MozReview-Commit-ID: HBqKc8a0tNJ
2017-09-07 15:18:41 -07:00
Michael Comella 8c48bffc67 Bug 1391413: Remove unused Site constructor. r=sebastian
MozReview-Commit-ID: F7cnUsBsmoR
2017-09-07 13:36:08 -07:00
Michael Comella b1774c2156 Bug 1398368: Drop malformed Pocket Top Stories. r=liuche
I tested this through the unit tests I added.

In theory, we could also validate URLs to make sure they're valid but users
should see 404s if they're not valid so this seems like unnecessary code.

MozReview-Commit-ID: 3XqsMawLabj
2017-09-12 16:36:21 -07:00
Jing-wei Wu dec031a9f1 Bug 1394720 - Refactor AnimatedProgressBar for performance tuning. r=walkingice
MozReview-Commit-ID: LKekOvdMS6u
2017-09-12 14:54:53 +08:00
Richard Newman 4c78fbe34e Bug 1378501 - Tell Gecko when the OS locale changes, even when backgrounded. r=mcomella
This ensures that `intl.locale.os` is always set, even if the system locale changes
while Fennec is in the background.

This commit also restores `Strings.flush()` calls that are necessary to have Fennec's
non-Java UI reflect locale changes.

With this commit, the geolocation popup still doesn't behave correctly: when the
locale system is set to match OS locale, although the pref is set the locale doesn't
change. This applies in two scenarios: on first run (the popup is always English)
and when the locale changes at runtime (the popup uses an earlier OS locale).

Bug 1397925 should complete the fix.

MozReview-Commit-ID: 8zeZuYXFYdy
2017-09-08 07:54:13 -07:00
Andrew Swan 4c7fe28769 Bug 1398326 Fix display of default extension icon in permission prompts r=walkingice
MozReview-Commit-ID: 9qaAVcAeJuf
2017-09-08 13:21:42 -07:00
Julian_Chu 2348878ae3 Bug 1355735 - Add util to pick name for default browser r=jwu
The util PackageUtil helps to get ResolveInfo of default browser, then
we can use it in CustomTabs menu. If user hasn't set any default
browser, instead we display "..." for browser name.

MozReview-Commit-ID: 6DkFkZ8Ovzq
2017-09-09 00:47:44 +08:00
Jan Henning 407040142f Bug 1271998 - Part 4 - Use a touch delegate to increase the clickable area of the URL bar. r=jwu
Originally, the listeners that trigger editing mode and the URL bar's context menu were attached to the BrowserToolbar itself. As this doesn't work properly in conjunction with wrapping the URL TextView into a ScrollView, the listeners were moved onto the TextView itself.

Bug 1389164 reduced the height of the TextView in order to better support lightweight themes with the new toolbar design, which in conjunction with the changes to support the ScrollView has the unfortunate side effect of also reducing the URL bar's hit target area.

Therefore, we increase it back to its old levels by using a TouchDelegate on the ScrollView. Because Android's ScrollView implementation doesn't support TouchDelegates, we have to add the missing bits of logic back in from the default View implementation.

MozReview-Commit-ID: 1nTrrNGvBza
2017-08-29 20:34:17 +02:00
Jan Henning 78225c908d Bug 1271998 - Part 2 - Make our URL bar scrollable. r=jwu
Limited space for URLs on mobile browsers has given rise to a class of phishing attacks that rely on a carefully crafted URL with a long subdomain being cut off such as to give the impression of another, legitimate URL [1]. We've experimented in the past with avoiding this by showing only the base domain or the EV certificate owner, but had to revert to the old behaviour because of users complaining about not being able to see as much of the URL as formerly possible.

Making the displayed URL scrollable is therefore a nice solution: It allows us to choose the initial scroll position such as to put the focus on the base domain, while giving users the freedom to easily view all the rest of the URL without having to enter editing mode.

To make the URL scrollable, we wrap the TextView with a HorizontalScrollView. Alternatively, it would have been possible to use a ScrollingMovementMethod with the TextView, however that way
- flinging the text doesn't work out of the box
- dragging the text around is still detected as a normal long-press as well and triggers the context menu


[1]. E.g. https://manage-myaccount.paypal.com-webapps.verifcheck.com/signin/ (see https://twitter.com/ericlaw/status/900429796240277504 for an example screenshot).

MozReview-Commit-ID: LPEXQA2kBvD
2017-08-27 17:31:13 +02:00
Jan Henning ab2db503f4 Bug 1271998 - Part 1 - Provide a ScrollView with a more efficient fadingEdge implementation. r=jwu
Our previous iteration of a more efficient fadingEdge implementation in FadedMultiColorTextView works by blending the text with a chosen colour. By choosing the same colour as the parent view onto which the TextView is placed, it was thus possible to achieve the impression of fading.

With our new URL bar design this is no longer possible quite as easily, since the image used for a lightweight theme will now be displayed behind the URL itself as well. Since the implementation would have also needed more work to make it compatible with scrolling text or being placed in a ScrollView anyway, the fading effect is now achieved directly via the ScrollView instead.

Android's built-in fadingEdge implementation calls Canvas.saveLayer (with CLIP_TO_LAYER_SAVE_FLAG omitted!) during a View's onDraw in order to fade out the contents of its children while preserving the background provided by its parents. This saveLayer call is rather expensive and is quite noticeable on a GPU profile even today.

Therefore, we implement a more efficient variety of fadingEdges that paints over its children's content in onDrawForeground. To avoid any background content from being faded out, the whole view then has to be placed on a separate layer, however this is still much more efficient than calling Canvas.saveLayer and doesn't show up noticeably in a GPU profile.

Prior to Marshmallow, onDrawForeground is not available, so we have to override draw instead in order to be able to paint over the content drawn by the ScrollView's descendants. This means that e.g. scrollbars would be faded out as well, but as we don't intend on showing a scrollbar within the context of this bug, it is an acceptable compromise.

MozReview-Commit-ID: DCDPt6ogs0h
2017-08-31 20:06:33 +02:00
Jing-wei Wu 78d06e0f1e Bug 1394404 - Part 1: Update AnimatedProgressBar's progress value to 100 before hiding it. r=walkingice
Our new animated progress bar follows the logic to hide itself:

1. When its progress value reaches 100, it disappears gracefully(with animation), otherwise,
2. It just disappears directly.

To make sure the progress bar always looked like fully loaded, we have to set its progress value to 100 before hiding it.

MozReview-Commit-ID: JSYEPYEhG4A
2017-09-08 18:14:33 +08:00
Michael Comella f4dd59c247 Bug 1393577: Change AS context menu title to subdomain.domain.tld. r=liuche
Unlike the previous changeset, we don't strip common subdomains because
"m.youtube.com" and "www.mozilla.org" can be informative and don't look bad
when you have a tld.

MozReview-Commit-ID: BOPH73pzAfh
2017-09-08 14:38:50 -07:00
Michael Comella 9b481cebb8 Bug 1393577: Change highlight domain title to subdomain.domain. r=liuche
We strip common subdomains from subdomain.domain because things like
"m.youtube" and "www.mozilla" look really bad.

MozReview-Commit-ID: wmWdcL8p8C
2017-09-08 14:43:40 -07:00
Michael Comella 8113f7c952 Bug 1395645: Increase Pocket Stories refresh to once an hour. r=liuche
I haven't tested this because it's very time-consuming for such a simple
change.

MozReview-Commit-ID: 7f4LLlBbrLw
2017-09-08 14:22:21 -07:00
Chenxia Liu 89ae90b9cb Bug 1396054 - Filter highlight candidates based on settings. r=mcomella
MozReview-Commit-ID: 8e36KZsuh27
2017-09-03 09:35:01 -07:00
Grigory Kruglov 231491af42 Bug 1335110 - Catch security exceptions while getting a GCM token to fail gracefully r=eoger
Exception handling upstream is already in place, and will ensure that we degrade gracefully.
Push won't work, but we won't crash either.

MozReview-Commit-ID: EfDNoJu46zg
2017-09-08 13:56:31 -04:00