Closed Bug 1577003 Opened 5 years ago Closed 5 years ago

Avoid `ViewStructure` in `GeckoSession` autofill methods

Categories

(GeckoView :: General, enhancement, P1)

Unspecified
All
enhancement

Tracking

(firefox69 wontfix, firefox70 wontfix, firefox71 fixed)

RESOLVED FIXED
mozilla71
Tracking Status
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- fixed

People

(Reporter: snorp, Assigned: snorp)

References

Details

(Whiteboard: [geckoview:m1910])

Attachments

(5 files)

Fenix would like to add in-app autofill using the same methods we have for implementing Android Autofill. They would additionally like that to work on devices with API >= 21. The ViewStructure class is only in 23+, so we need to have our own version of that for SessionTextInput and TextInputDelegate interfaces. The GeckoView class would of course still need to use ViewStructure for Android Autofill, so this new thing needs to easily convert to a ViewStructure for that case.

We need this to make GeckoSession autofill API available to API levels 21-25. Fenix should act as an autofill service.

Priority: -- → P2
Whiteboard: [geckoview:fenix:m8]

Emily suggests login autofill be a top priority for October ([geckoview:m1910]).

Whiteboard: [geckoview:fenix:m8] → [geckoview:m1910]
Whiteboard: [geckoview:m1910]
Whiteboard: [geckoview:m1910]

This also moves autofill() and provideAutofillVirtualStructure()
into GeckoSession.

This is an alternative to GeckoSession.provideAutofillVirtualStructure()
that does not rely on the ViewStructure class. This is necessary to
support autofill functionality on older devices or without involving
the Android autofill service.

This patch also moves the existing autofill tests into
AutofillDelegateTest.kt and converts them to use this new API
instead of the ViewStructure one. This allows us to test on devices
lower than SDK 26 (which includes automation). In addition to the API
changes, some tests also needed some greening up.

This also adds GeckoView.setAutofillEnabled(), which is enabled by
default. Apps can disable this if they don't want to use the Android
autofill service. This will allow them to set their own
AutofillDelegate on the GeckoSession and provide their own
autofill implementation.

James is working on autofill in October.

Assignee: nobody → snorp
Priority: P2 → P1
Pushed by jwillcox@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6967ce1ef236
Move autofill stuff from TextInputDelegate into AutofillDelegate r=geckoview-reviewers,agi,esawin
https://hg.mozilla.org/integration/autoland/rev/8be3fae90812
Add `GeckoSession.getAutofillElements()` r=geckoview-reviewers,esawin,agi
https://hg.mozilla.org/integration/autoland/rev/58284841398d
Handle Android autofill service in GeckoView class r=geckoview-reviewers,esawin
https://hg.mozilla.org/integration/autoland/rev/9964d7bfa619
Make naming consistent in GeckoView autofill bits r=geckoview-reviewers,agi,esawin
https://hg.mozilla.org/integration/autoland/rev/204658865fb7
Update CHANGELOG.md and API description r=geckoview-reviewers,esawin
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: