Commit Graph

24353 Commits

Author SHA1 Message Date
Wes Kocher
fee8c46ef7 Backed out changeset f51248231d0e (bug 1397818) for linting failures in Sanitizer.jsm a=backout
MozReview-Commit-ID: AcRgH0NjTGB
2017-09-11 14:29:42 -07:00
Richard Newman
f31d98a272 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

--HG--
extra : rebase_source : 9da9aae7ed8420faa7567c9db29b1110b3289d9f
2017-09-08 07:54:13 -07:00
Jan Henning
37aded2f78 Bug 1397818 - Make sure to always return Promises from the Sanitizer. r=Grisha
Our shutdown code needs this, so it can wait for sanitising to have actually finished before continuing further.

MozReview-Commit-ID: DGNgFrvYIXV

--HG--
extra : rebase_source : 8859ae296af5ad30eca713473ea94a201b98f76b
2017-09-07 19:27:01 +02:00
Michael Comella
b24ecca8ea Bug 1395761: Remove layout_gravity=center in webpage_item_row. r=liuche
This has the effect of:
- Aligning the webpage item row with top sites (both 10dp margins)
- Making the icons not cut off

Unfortunately, I don't know why this solved the problem considering the size of
the container did not change. However, the layout_gravity was extraneous and
given all the other work we have to do, I'm fine not researching further.

One thing I noticed is that with layout_gravity, there was an additional
non-colored space in the "Show Layout Bounds" mode with layout_gravity than
there was with out it.

MozReview-Commit-ID: KTZRi1s32gx

--HG--
extra : rebase_source : 3484fc8a0257323c51d805c57979b0904e596483
2017-09-11 10:09:10 -07:00
Botond Ballo
cb97473493 Bug 1398858 - Have apz.frame_delay.enabled ride the trains on desktop. r=kats
MozReview-Commit-ID: HAOFPBlqEq0

--HG--
extra : rebase_source : 3df9ddd8590d9f168f8f2f1f7f2d44b66aa4cef9
2017-09-11 13:33:54 -04:00
Jing-wei Wu
ec6a9f05ea Bug 1398655 - Remove unused color resources in colors.xml. r=nechen
MozReview-Commit-ID: 6lPno8C3GhE

--HG--
extra : rebase_source : 0ba91dcdd07f1d474f6e1358575ebd1f044a1e37
extra : source : 867cb5c5dacbf7cbfe0d4a4507651837052f0f83
2017-08-29 15:08:43 +08:00
Andrew Swan
4a67e82a59 Bug 1398326 Fix display of default extension icon in permission prompts r=walkingice
MozReview-Commit-ID: 9qaAVcAeJuf

--HG--
extra : rebase_source : 97bfef09d4565baab68739bea4e3391c418a6b24
2017-09-08 13:21:42 -07:00
Julian_Chu
2a6acc7625 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

--HG--
extra : rebase_source : 3ee3d7cccd6e926eafb5edaba6763920979819d6
2017-09-09 00:47:44 +08:00
Nevin Chen
a2f0a2765b Bug 1396465 - Make onboarding images smaller. r=jwu
MozReview-Commit-ID: LKFOlBd5bdv

--HG--
extra : rebase_source : 60411f2f01aa943711794116ad6f8f94311f6a7a
2017-09-04 10:16:05 +08:00
Jan Henning
e6d3779ad4 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

--HG--
extra : rebase_source : 338f3cef0f7e36e7c2968f01170184792a816e9c
2017-08-29 20:34:17 +02:00
Jan Henning
8530a2979b Bug 1271998 - Part 3 - Scroll the URL to focus the origin for overlength URLs. r=jwu
If the domain is long enough that it doesn't fully fit within the URL bar, we scroll it such that the end of the domain aligns with the right side of the URL bar, taking any possible fadingEdge effect into account. That way, we always try to show as much of the most important part of the origin as possible.

Chrome uses a similar approach, although their URL bar neither fades nor allows scrolling.

MozReview-Commit-ID: Ep4H4kO4MRH

--HG--
extra : rebase_source : 2ef619e8e756627e8ff55ef394f483ce12505ddd
2017-08-24 22:09:56 +02:00
Jan Henning
9e84d48ea6 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

--HG--
extra : rebase_source : dc5a9428a64cb8961b5783505f67599fa1e22f34
2017-08-27 17:31:13 +02:00
Jan Henning
89e1cb07fb 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

--HG--
extra : rebase_source : eae7088d00918d0b6e7a8088fc414ac5adfdff9d
2017-08-31 20:06:33 +02:00
Jan Henning
39dd7dd7d7 Bug 1271998 - Part 0 - Clean up imports. r=JanH
MozReview-Commit-ID: 5y5C77jFYUg

--HG--
extra : rebase_source : e875e54bf1dcf787c582fa8ffea771309bdb6704
2017-08-27 19:58:16 +02:00
Jing-wei Wu
903a88d66e Bug 1394404 - Part 2: Keep AnimatedProgressBar has same height in both BrowserApp and CustomTabsActivity. r=walkingice
MozReview-Commit-ID: EWXn98emP2g

--HG--
extra : rebase_source : 5dc125883779926a78e6ffac67380f7bb6dc1d1f
2017-09-08 18:16:50 +08:00
Jing-wei Wu
0c4ac70569 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

--HG--
extra : rebase_source : 6a432f093abb188f43da8ee3980c7681577c4f2c
2017-09-08 18:14:33 +08:00
Jan Henning
6e54f839f6 Bug 1396324 followup. Add comment referencing this bug to the test. r=JanH
DONTBUILD

MozReview-Commit-ID: AFEnH5VSuM4

--HG--
extra : rebase_source : a11f70d27f0bb43a833a6050b3f581c7133381fb
2017-09-09 22:54:55 +02:00
Michael Comella
69792063a5 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

--HG--
extra : rebase_source : 1c5f7dc4aec2b91a2929d24d5cdaf587a3715623
2017-09-08 14:38:50 -07:00
Michael Comella
650089bbd8 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

--HG--
extra : rebase_source : 165b72395a28f745c9a4e4b82d72299e648615ed
2017-09-08 14:43:40 -07:00
Michael Comella
00721ed12d 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

--HG--
extra : rebase_source : ce8fbbbf2a745395f0986fd76442f72743dc68ca
2017-09-08 14:22:21 -07:00
Chenxia Liu
2f4e269a50 Bug 1396054 - Filter highlight candidates based on settings. r=mcomella
MozReview-Commit-ID: 8e36KZsuh27

--HG--
extra : rebase_source : a23dfbf4d98e0c81334da558ba579e5491169241
2017-09-03 09:35:01 -07:00
Tomislav Jovanovic
3dce599c63 Bug 1394348 - Fix document_idle run_at timing r=kmag
MozReview-Commit-ID: FBPlw6CiUE2

--HG--
extra : rebase_source : b72037e7ce600eafb15de639ec7e98e8abb580b3
2017-09-08 00:36:50 +02:00
Grigory Kruglov
bbd1d078dd 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

--HG--
extra : rebase_source : fab5546108b8da29b3b2e3c8ee02e6459e6fc6dc
2017-09-08 13:56:31 -04:00
Jan Henning
96f846e8fb Bug 1396076 - Part 4 - Revert TabsLayoutItemView padding changes for the "close tab" button. r=jwu
We're using Touch- and HoverDelegates to increase the effective clickable area, so there's no need to actually pad the button itself, which disturbs the layout and eats into the space available for displaying the tab's title.

MozReview-Commit-ID: CKS2OIoS1xr

--HG--
extra : rebase_source : 1e67c7a4c9014156d4e21424cae805dc30d35608
2017-09-01 19:17:33 +02:00
Jan Henning
f8c0448722 Bug 1396076 - Part 3 - Switch to a LayoutChangeListener for setting up the delegates. r=jwu
When the device is rotated between portrait and landscape mode (or vice versa), the View's final size is not yet available during the first OnPreDrawListener call for some of the TabsLayoutItemViews. It would be possible to skip the listener removal, so this is no longer used as a one-shot listener, however onPreDraw is frequently called even when the View's dimensions haven't changed.
Therefore, we switch this to an OnLayoutChangeListener, which is more appropriate for what we need.

MozReview-Commit-ID: 6JAzXdEBxbL

--HG--
extra : rebase_source : dc5d5bb94c783cb4eb5045335b4da192a68fe512
2017-09-07 22:26:57 +02:00
Jan Henning
964d0d555e Bug 1396076 - Part 2 - Use the HoverDelegate for TabsLayoutItemView's close button. r=jwu
MozReview-Commit-ID: FU4KVwVgtWy

--HG--
extra : rebase_source : 2c0eb2111d5172165cfe2a68f594011b950c7a4f
2017-09-01 20:12:52 +02:00
Jan Henning
b88c18949f Bug 1396076 - Part 1 - Add a HoverDelegate class. r=jwu
This is more or less a straight copy of our TouchDelegateWithReset class adapted to using HoverEvents instead of TouchEvents.

MozReview-Commit-ID: KtQvf1is5xK

--HG--
rename : mobile/android/base/java/org/mozilla/gecko/widget/TouchDelegateWithReset.java => mobile/android/base/java/org/mozilla/gecko/widget/HoverDelegateWithReset.java
extra : rebase_source : 80a45db00554ea6271f258c0d6ebf75b05f90032
2017-09-01 19:49:23 +02:00
Sebastian Kaspari
5a5211805e Bug 1385988 - HighlightsDividerItemDecoration: Use adapter position and not current position in parent view. r=mcomella
MozReview-Commit-ID: Ih6USplyBTb

--HG--
extra : rebase_source : 72e050306454ea0a9261a2ffb6ce0351e662d198
2017-09-08 17:08:05 +02:00
Nevin Chen
81b83c31ca Bug 1365868 - Add basic context menu: Open in Firefox. r=maliu
MozReview-Commit-ID: BxjFKKNcCiQ

--HG--
extra : rebase_source : fb28b1366219a56e695c7faad56d931cd330fcd7
2017-09-07 15:52:16 +08:00
Jing-wei Wu
60874e7055 Bug 1396324 - [robocop] Configure bookmarks panel as default panel before loading URLs. r=JanH
We found sometimes Robocop operates wrong UI components when it deals with a complex layout.
Since default panel shows Activity Stream which contains complex UI components, we configure
bookmarks panel as default panel to keep the layout as simple as possible.

MozReview-Commit-ID: 12xhVOdlIRK

--HG--
extra : rebase_source : fcb1a42e8e0ccdb06fd17bcb14880ed4a650efc7
2017-09-08 16:02:37 +08:00
Sebastian Hengst
9a6b5140c4 merge mozilla-central to autoland. r=merge a=merge 2017-09-08 11:03:59 +02:00
Sebastian Hengst
e52b8eb6e4 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: E6LQYNHgmiv
2017-09-08 10:53:26 +02:00
Mike Hommey
ca43d9e078 Bug 1398033 - Free dirty pages on memory pressure. r=njn
Free dirty pages appear as "page-cache" in about:memory reports, but
when minimizing memory, and more generally, on memory pressure, they're
currently not force-free()ed on desktop, while they are on mobile.
There doesn't seem to be much reason not to do it on desktop as well,
and it should help reduce the noise in "explicit" allocations measurements
on CI, too.

--HG--
extra : rebase_source : e477532dda5e72eb8797b5bcdc9060ca46106275
2017-09-08 14:50:42 +09:00
Nevin Chen
4a44c9d515 Bug 1372040 - Temporary showing large icons for AdaptiveIconDrawable. r=maliu
I don't want to call BitmapUtils.getBitmapFromDrawable() here for AdaptiveIconDrawable cause there might be performance impact if I create bitmap in main thread.
I'll use bug 1397174 to follow up this issue.

MozReview-Commit-ID: 64FE2MOk5g0

--HG--
extra : rebase_source : 041e0a5f9d7b4245650f5a229603818b11631b4e
2017-09-06 12:09:31 +08:00
Nevin Chen
171beb013a Bug 1397184 - Add MMA doc to index. r=liuche
MozReview-Commit-ID: FyO2E35p4rF

--HG--
extra : rebase_source : f781009ac9821d6a877af34df5da8b7f62e5ca58
2017-09-06 16:48:12 +08:00
Wes Kocher
2ec453d1bb Backed out 2 changesets (bug 1379833) for android lint failures a=backout
Backed out changeset 8bbf531110dd (bug 1379833)
Backed out changeset c06bc2f7acd3 (bug 1379833)

MozReview-Commit-ID: 5iCJ3qsMC1Q
2017-09-07 16:25:50 -07:00
Andrew Swan
c489cd113c Bug 1379833 Part 2: Display permissions dialog during extension install on Android r=sebastian,walkingice
MozReview-Commit-ID: 721i0B0lC4n

--HG--
extra : rebase_source : 2aadb34cc8f901181a1d894f2d823420b602487e
extra : intermediate-source : facd660f3c054d2d082bed635df5af312ec9773f
extra : source : 95aaed050f22ef61d3bedbb5b47d043d10624eeb
2017-08-15 08:35:11 -07:00
Jan Henning
fb89cc19ed Bug 1396604 followup - Remove reference to former FeedAlarmReceiver to fix lint failure. r=JanH
MozReview-Commit-ID: 5ObaKAeVYdS

--HG--
extra : rebase_source : 2dbefb997dac524a6349057f95f3d74493d90ace
2017-09-07 20:16:08 +02:00
Michael Comella
bdaa1c017c Bug 1394641: Update suggestedsites bgcolor for new icons. r=sebastian
These `bgcolor`s are the background colors of the new icons added in bug
1388379. I was originally intending to remove the bgcolor attribute in this
bug, which is why I didn't change the colors in the previous bug.

I decided not to remove the bgcolor attribute to avoid churn: we'd have to
maintain multiple permitted schemas for the region.properties (one where
bgcolor is required and one where it is not), update the documentation to
clarify the changes before and after Firefox 57, communicate the new format to
several partners, etc. It seemed easier to continue to require bgcolor and, if
there is transparency in the icon, we use bgcolor, otherwise we don't. This is
already the way distributions work: some icons have transparency, some don't!

In practice, the updated bgcolors on the suggested sites doesn't make a
difference: there is no transparency in the new icons so these bgcolors are
never shown.

MozReview-Commit-ID: GovUjM7VKyG

--HG--
extra : rebase_source : 11b4a710c1d81e701568c7d83ab6155cf4bc1229
2017-09-06 15:46:22 -07:00
Michael Comella
c47fd6b64c Bug 1394641: AS FaviconView shares styles; add distribution comments. r=sebastian
MozReview-Commit-ID: 7d2aXNDTxZs

--HG--
extra : rebase_source : 66b5480fd4fe52d6a61eb2976917c216d920d08b
2017-09-05 16:16:53 -07:00
Jan Henning
0fcabce1fe Bug 1396604 followup - Remove unused drawable resources. r=JanH
MozReview-Commit-ID: 1gxY4DHoGZV

--HG--
extra : rebase_source : 0dc935b69d99a56c33681c1b0ef90085832a20ae
2017-09-07 19:51:54 +02:00
Kilik Kuo
dddc8978fe Bug 1396268 - Seek operation should not be performed after GeckoHlsPlayer.release is called! r=JamesCheng
MozReview-Commit-ID: 15lXw9hgKdh

--HG--
extra : rebase_source : 0567ca5e9aba9fb8df0191be2eaed717ce0e19f8
2017-09-07 17:00:32 +08:00
Sebastian Hengst
6b5abf8cab merge mozilla-central to autoland. r=merge 2017-09-07 12:40:32 +02:00
Sebastian Hengst
8eb249afcc merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JSRVc5yW6Kx
2017-09-07 12:39:12 +02:00
Wes Kocher
a14d71906d Merge m-c to inbound, a=merge
MozReview-Commit-ID: BJ4WkYrJ9g6
2017-09-06 17:24:48 -07:00
Sebastian Kaspari
aecdc4c5ab Bug 1396604 - Remove content notifications code. r=JanH,nechen
MozReview-Commit-ID: 5H45Vjnzt5Z

--HG--
extra : rebase_source : dbbcf4a4e402ad3550461bc61d1770961082b839
2017-09-04 16:51:07 +02:00
Sebastian Hengst
9d15132cd1 merge mozilla-central to autoland. r=merge a=merge 2017-09-06 11:28:07 +02:00
Sebastian Hengst
9c8a09d458 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: KLssMPhSQ0O
2017-09-06 11:26:13 +02:00
Jing-wei Wu
e76993632e Bug 1394378 - Wrap drawable to support tinting across different API levels. r=nechen
According to the comment of `DrawableCompat.wrap(Drawable)`[1], a drawable should be wrapped
to support tinting across the different API levels.

[1] https://android.googlesource.com/platform/frameworks/support/+/android-6.0.1_r67/v4/java/android/support/v4/graphics/drawable/DrawableCompat.java#329

MozReview-Commit-ID: JJ4alkFF1og

--HG--
extra : rebase_source : 075164b921ee9b7a2ab0261251688dc4e3950b29
2017-09-06 10:15:14 +08:00
Sebastian Hengst
b278f15c7f merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-09-06 00:00:04 +02:00