Closed Bug 1773796 Opened 3 years ago Closed 3 years ago

Adaptive history autofill doesn't work with search strings that start with "www"

Categories

(Firefox :: Address Bar, defect, P1)

defect
Points:
3

Tracking

()

VERIFIED FIXED
103 Branch
Tracking Status
firefox103 --- verified

People

(Reporter: adw, Assigned: daisuke)

References

Details

Attachments

(1 file)

Adaptive history autofill doesn't seem to work with search strings that start with "www". With this adaptive history record:

url = https://www.nytimes.com/section/world
input = “www.nyt”

I can't trigger autofill for it by typing "www.nyt". I think it's because fixed_url_match will never be true in that case.

Assignee: nobody → daisuke
Status: NEW → ASSIGNED

As pointed in the bug, the problem that can't find adaptive history by user's
input starts with "www." is in this query, since the fixup_url() removes not
only scheme but also "www.". In this bug case, we need to compare with string
removing scheme part only when user's input starts with "www.".
So, we introduce strip_scheme function that removes scheme only, then compare
with that's result.

In alternative idea, I thought we could use like following query.

"www." || fixup_url(h.url) COLLATE NOCASE BETWEEN :searchString
AND :searchString || X'FFFF' AS is_fixed_url_match

However, in this case, URLs that not start with "www." as well will be the
targets. As the user inputs "www." explicitly, that is, as I think that user
wants to find URL that starts "www.", did not choose this way.

Attachment #9280913 - Attachment description: Bug 1773796: Search with only removal the protocol if user's input started with www. → Bug 1773796: Corresponds to user's input that starts with www.
Flags: qe-verify+
Flags: in-testsuite+
Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3ed95f9b6501 Corresponds to user's input that starts with www. r=adw
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch

Verified fixed on the latest Fx103.0a1 build. Adaptive autofill now works correctly for strings starting with 'www.'

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: