Commit Graph
131 Commits
Author SHA1 Message Date
Jing-wei Wu 0b6c1960fb Bug 1400858 - Introduce class CheckableFadedSingleColorTextView for supporting 'Checkable' status. r=nechen
MozReview-Commit-ID: ILGByeZdyV8
2017-09-20 17:09:34 +08:00
Jing-wei Wu 2d655a8843 Bug 1400164 - Part 1: Provide a getter method for tint colors of themed widgets. r=nechen
MozReview-Commit-ID: 2YWv9hjhAVr
2017-09-18 11:07:39 +08: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
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
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 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
Jan Henning 5b9f1bfc77 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
2017-09-01 19:49:23 +02:00
Jing-wei Wu ef1ed7936f Bug 1393477 - Resize favicon shown in doorhanger. r=nechen
MozReview-Commit-ID: I8vFxePDOeF
2017-08-31 16:29:13 +08:00
Chenxia Liu 3ccb314d91 Bug 1386735 - Add additional preferences to Top Sites settings. r=mcomella
MozReview-Commit-ID: ADwLLbO41RN
2017-08-30 20:01:48 -07:00
Julian_Chu 04a4ba718e Bug 1366672 - part2: Add new custom widgets r=jwu,sebastian
* DrawableWrapper - a class similiar to DrawableWrapper in Android v23.
* ShiftDrawable - provide shif-animation for its child drawable
* AnimatedProgressBar - ProgressBar.setProgress(int, boolean) involved
    since API v24. This is an implementation for animation.

MozReview-Commit-ID: HjLAXXQdZKO
2017-08-05 13:53:44 +08:00
Julian_Chu 9dfac648d6 Bug 1366672 - part1: add ThemedProgressBar r=jwu,sebastian
We are going to involve new implementation for page loading indicator by
ProgressBar. Add ThemedProgressBar for Private Mode.

MozReview-Commit-ID: 4Bj9mJtlHPM
2017-08-05 13:30:29 +08:00
Jim Chen d8ec29a02f Bug 1388724 - 2. Add universal DoorHanger API; r=droeh
Add a DoorHanger API that doesn't rely on browser.js/NativeWindow, so we
can use doorhangers for custom tabs and PWA. The API falls back to the
old NativeWindow implementation when dealing with the brower.js window.

MozReview-Commit-ID: 6GksKbLaNAp
2017-08-18 14:27:30 -04:00
Wes Kocher 093c1eb310 Backed out 6 changesets (bug 1366672) for android linting failures a=backout
Backed out changeset df6eadeb55a9 (bug 1366672)
Backed out changeset e655bcd49af8 (bug 1366672)
Backed out changeset dd2474c2eaf9 (bug 1366672)
Backed out changeset 80a2c096cfa9 (bug 1366672)
Backed out changeset 64ff8cc86fec (bug 1366672)
Backed out changeset 13affa6a9586 (bug 1366672)

MozReview-Commit-ID: 9LQiKupMoJb
2017-08-15 11:38:08 -07:00
Julian_Chu 0bf594601a Bug 1366672 - part2: Add new custom widgets r=jwu,sebastian
* DrawableWrapper - a class similiar to DrawableWrapper in Android v23.
* ShiftDrawable - provide shif-animation for its child drawable
* AnimatedProgressBar - ProgressBar.setProgress(int, boolean) involved
    since API v24. This is an implementation for animation.

MozReview-Commit-ID: HjLAXXQdZKO
2017-08-05 13:53:44 +08:00
Julian_Chu cf99e2e575 Bug 1366672 - part1: add ThemedProgressBar r=jwu,sebastian
We are going to involve new implementation for page loading indicator by
ProgressBar. Add ThemedProgressBar for Private Mode.

MozReview-Commit-ID: 4Bj9mJtlHPM
2017-08-05 13:30:29 +08:00
Michael Comella b9ca55dd22 Bug 1301718: FaviconView extends AppCompatImageView. r=liuche
This change is unrelated to this bug.

According to my IDE warning:

```
This custom view should extend android.support.v7.widget.AppCompatImageView
instead.

In order to support features such as tinting, the appcompat library will
automatically load special appcompat replacements for the builtin widgets.
However, this does not work for your custom views.

Instead of extending the android.widget classes directly, you should instead
extend one of the delegate classes in android.support.v7.widget.AppCompat.
```

Seems reasonable and I don't see any documentation telling me not to. :)

MozReview-Commit-ID: H60bYGVgTIT
2017-08-04 16:06:58 -07:00
Edouard Oger 3772920392 Bug 1351104 part 2 - Filter the clients list in Send Tab with the FxA device list. r=Grisha
MozReview-Commit-ID: KqSyWVfwva3
2017-06-07 16:24:30 -04:00
Isaac Schemm c7a79b1de1 Bug 1377765 - Apply calendar height workaround from bug 1245692 to Android 5.0.x. r=maliu 2017-07-08 08:54:00 -04:00
jwu 915f3d4f31 Bug 1366678 - Highlight substrings in search suggestion/history if they match search term. r=walkingice
MozReview-Commit-ID: KwpgBaaSYn1
2017-07-19 15:08:48 +08:00
Michael Comella 884bf339f6 Bug 1341275 - review: Add comment explaining FaviconView.getWidth non-zero values. r=mcomella
MozReview-Commit-ID: 33RXaB4gCkK
2017-07-17 11:37:45 -07:00
Michael Comella 6959592695 Bug 1341275: Add mShouldShowImage flag to FaviconView. r=sebastian
I verified this fixed the issue by:
- Attaching a debugger and checking against the STR call order (comment 3).
- Ensuring the favicons in the SearchEngineRow looked correct

MozReview-Commit-ID: GJeh3FLim36
2017-07-14 15:44:21 -07:00
Michael Comella a35b0263ee Bug 1341275: Replace color 0 with Color.TRANSPARENT. r=sebastian
MozReview-Commit-ID: 2sekMgnU7mD
2017-07-14 15:11:55 -07:00
Michael Comella d357d44080 Bug 1341275: Rm redundant check for size change in onSizeChanged. r=sebastian
onSizeChanged should only be called when the size actually changes. However,
I did notice weird behavior in the debugger where `formatImage` appeared to be
called twice from onSizeChanged, however, I was unable to reproduce this
behavior with log statements.

MozReview-Commit-ID: A5amGqTxv55
2017-07-14 14:52:34 -07:00
Michael Comella e56b7af163 Bug 1341275: Rm redundant mActualHeight/Width variables. r=sebastian
These are already present in View.getHeight/Width and:
1) Having duplicated values can lead to bugs
2) Having them around makes it harder to see what's important in this code.

MozReview-Commit-ID: 7IvipoJXmF7
2017-07-14 14:50:47 -07:00
Michael Comella a7da641250 Bug 1341275: Remove unused constants in FaviconView. r=sebastian
MozReview-Commit-ID: tztRGR56mJ
2017-07-14 14:37:56 -07:00
jwu 27206de26e Bug 1366704 - Part 1: Implement ThemedListView for Photon visual refresh. r=sebastian,walkingice
MozReview-Commit-ID: EdPrQ1oE37l
2017-06-30 09:32:26 -07:00
Nevin Chen 98cd1c2977 Bug 1378688 - Make Splash Screen faster by making it's background transparent. r=maliu
MozReview-Commit-ID: 3b7tRGdUCVm
2017-07-11 17:06:42 +08:00
Jing-wei Wu ed7bbd0df3 Bug 1366679 - Part 1: Support configuring FaviconView backgroud corner radius in xml. r=nechen,walkingice
MozReview-Commit-ID: 5qH9Bu1ORCa
2017-06-27 10:38:00 -07:00
Nevin Chen 291229b9a6 Bug 1366674 - Add Splash Screen. r=maliu
MozReview-Commit-ID: EjRS6w8IOX3
2017-06-13 17:57:35 +08:00
Carsten "Tomcat" Book 85d12c6f4d Backed out changeset ccc2926a42d6 (bug 1366674) for breaking android builds 2017-06-23 13:19:12 +02:00
Nevin Chen 245a842208 Bug 1366674 - Add Splash Screen. r=maliu
MozReview-Commit-ID: EjRS6w8IOX3
2017-06-13 17:57:35 +08:00
Wes Kocher 54f3b36e4d Backed out changeset 7c6658c33dc6 (bug 1366674) for android build bustage a=backout CLOSED TREE
MozReview-Commit-ID: FqxK0upxKx3
2017-06-22 12:12:23 -07:00
Nevin Chen 3638af8e73 Bug 1366674 - Add Splash Screen. r=maliu
MozReview-Commit-ID: EjRS6w8IOX3
2017-06-13 17:57:35 +08:00
Andrzej Hunt 6662312dff Bug 1366352 - Post: check anchor is set before trying to show GeckoPopupMenu r=nechen
This means we'll at least see a sensible exception, instead of an NPE when
no anchor is set. That makes it easier to debug cases where no anchor was
set (see e.g. the main commit from this bug).

MozReview-Commit-ID: CzsZaHvnZ6y
2017-05-19 12:17:25 -07:00
Jan Henning 44b5f21494 Bug 1253647 - Part 1 - Don't show page URL title on add-on restart doorhanger. r=sebastian
When a non-restartless add-on is (un)installed or updated, we show a doorhanger prompting the user to restart. Currently, the doorhanger's title is using the default logic for choosing its title, that is using the base domain of the tab the doorhanger is being displayed on.

By chance, when the doorhanger is triggered from about:addons there is no domain to display, so the doorhanger is just displaying the restart notification. If however an add-on is automatically updated while the user is browsing, then the restart prompt will show the domain of the currently open tab in conjunction with the restart message. This can be confusing for the user, as it looks like it was in fact the current page that triggered the restart prompt.

Therefore, we change this behaviour and just show a generic "Add-ons" as title for this case.

MozReview-Commit-ID: 3pMwSiLul99
2017-05-10 22:24:14 +02:00
Jan Henning d5008b2ade Bug 1253647 - Part 0 - Clean up imports. r=sebastian
MozReview-Commit-ID: F96sw4Xhn93
2017-05-10 22:03:58 +02:00
Jing-wei Wu a2fbd55649 Bug 1232439 - Part 4: Adjust bookmark list UI layout. r=ahunt
MozReview-Commit-ID: 5s74hg5daC5
2017-04-06 11:44:20 +08:00
Julian_Chu 5eebd6f885 Bug 1352993 - Part 2, Add presenter class which response text-selection r=sebastian
To create new interface ActionModePresenter, a presenter could to
operate action-mode.

For pre-marshmallow Android version, we use ActionBar to provide UI
action for text-selection. Therefore BrowserApp will implement this
presenter for text-selection.

MozReview-Commit-ID: GdLB3ke2pYe
2017-04-18 18:12:43 +08:00
Tom Klein 014bdb5638 Bug 1337933 - Make the tabs grid layout decorations work with RTL. r=maliu
This patch affects all grided tabs panel layouts: tablets, phones in landscape
mode, and phones in portrait mode with the "Compact tabs" setting on.

MozReview-Commit-ID: 5cqVJA57ARu
2017-04-06 19:52:10 -05:00
Jing-wei Wu 54aa2b76f3 Bug 1339884 - Adjust DateTimePicker's upper and lower bound. r=Grisha
MozReview-Commit-ID: GuefY4Sp4wF
2017-03-22 11:41:07 +08:00
Andrzej Hunt 5b7058bf0e Bug 1320775 - Pre: move favicon colour fading to color generator r=sebastian
In order to allow for a background which merges into a favicon, we
need to allow for solid (non faded) colours. It is simplest to do this
by letting the colour generator (i.e. either the colour extractor,
or the favicon generator) fade the dominant colour as it wishes.
That also means the colour generator can in future choose to
not fade the colour if appropriate.

MozReview-Commit-ID: LsI8PlZsaGn
2017-02-08 10:12:24 -08:00
jdarcangelo 7748456a28 Bug 1335200 - [FlyWeb] Crash on Android when calling publishServer(), r=sebastian 2017-02-01 14:52:40 -05:00
Jim Chen 6efe2dda8c Bug 1333589 - 2. Convert SiteIdentityPopup events to bundle events; r=sebastian
Convert the events used in SiteIdentityPopup to bundle events. UI thread
events are used because the listeners perform operations on the UI
thread.
2017-01-25 18:57:31 -05:00
Jim Chen de48158161 Bug 1333589 - 1. Use GeckoBundle for DoorHanger.OnButtonClickListener; r=sebastian
Convert the onButtonClick method to provide GeckoBundle as the response.
2017-01-25 18:57:31 -05:00
Nevin Chen bb36244cc3 Bug 1331431 - Use baseline and FontMetrics instead of textview's center and text size to get the real text height. r=sebastian
MozReview-Commit-ID: 4HJKZP0F0ow
2017-01-18 17:59:23 +08:00
maliu fa8fdfc688 Bug 1332258 - Reset text fading gradient to null when text direction changed, r=sebastian
MozReview-Commit-ID: EaUUO8aegzj
2017-01-19 15:09:14 +08:00
maliu 1b6d6b286d Bug 1321633 - Apply gradient based on text direction with first strong strategy, r=ahunt
MozReview-Commit-ID: 5GMlUcp290f
2016-12-29 17:24:32 +08:00
Jim Chen 6cadb97fc7 Bug 1325153 - Convert DoorHangerPopup events to bundle events; r=sebastian
Convert "Doorhanger:Add" and "Doorhanger:Remove" to bundle events. UI
events are used because the listener performs UI operations. As part of
the refactoring, DoorHangerConfig was refactored to use GeckoBundle, and
due to that change, a lot of other doorhanger-related classes also had
to be refactored to use GeckoBundle.
2016-12-28 17:49:28 -05:00
Wes Kocher e553a20230 Merge m-c to autoland, a=merge 2016-12-20 11:48:21 -08:00
Wes Kocher e5826ac971 Merge inbound to central, a=merge
MozReview-Commit-ID: Cr9L1dhIzP2
2016-12-20 11:41:57 -08:00