Closed Bug 1636583 Opened 4 years ago Closed 4 years ago

Allow forcing a visit by appending a slash to uri-like search strings

Categories

(Firefox :: Address Bar, enhancement, P3)

enhancement
Points:
3

Tracking

()

VERIFIED FIXED
Firefox 78
Iteration:
78.2 - May 18 - May 31
Tracking Status
firefox78 --- verified

People

(Reporter: mak, Assigned: mak)

References

(Blocks 1 open bug)

Details

(Keywords: parity-chrome)

Attachments

(3 files)

This is something that Chrome does, and there's no reason we should not do the same, since there's unlikely a use-case to search for a string ending with /

Severity: -- → S3
Points: --- → 2

Verdi confirmed we always want to visit when the search string ends wiwht a slash, I think we should make this change in URIFixup for coherency.

The behavior is a bit more complex though, it looks like these are handled as uris:

  1. asd/
  2. asd.asd/
  3. asd/ asd/
  4. asd.asd/ asd/

But these are not

  1. asd /
  2. asd.com /
  3. asd.asd /
  4. asd/ asd

Thus the string must end with a slash, but there must be no space in the prePath part (before the first slash). This still makes sense.

Assignee: nobody → mak
Status: NEW → ASSIGNED
Summary: Always visit strings ending with a slash → Allow forcing a visit by appending a slash to uri-like search strings
Iteration: --- → 78.1 - May 4 - May 17
Iteration: 78.1 - May 4 - May 17 → 78.2 - May 18 - May 31

This allows to pick a result without necessarily having a view element.

This changes the urlbar to always generate a result and then confirm it through
pickResult. This way we obtain a consistent behavior independently from whether
the view has a result or an action like Paste&Go happened.
Before this we used to go through getShortcutOrURIAndPostData, that implements
only a part of the urlbar logic, often causing different behavior depending on
the view state, and thus requiring constant maintenance to sync it up.
In a follow-up bug we will evaluate the complete removal of
getShortcutOrURIAndPostData in favor of direct calls to
UrlbarUtils.getHeuristicResultFor().

This also moves up a bit closer to always pass a final url to the docshell, and
stop trying to do complex URIFixup calls in it. For now we still rely
on its fix-ups for browser.fixup.dns_first_for_single_words, where we pass a
url, and if it's invalid it will instead search. See UrlbarUtils.RESULT_TYPE.URL
handling in pickResult().

Depends on D75910

Blocks: 1180329
No longer blocks: qb-results-papercuts
Blocks: 1640132
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/9fd142817919 Split pickResult out of pickElement. r=adw https://hg.mozilla.org/integration/autoland/rev/660b7de89215 URIFixup should force a visit when an uri-like search string ends with a slash. r=adw https://hg.mozilla.org/integration/autoland/rev/a2e636ff03c2 Make the urlbar always go through pickResult. r=adw

heh, I clashed against another urlbar change that landed at the same time.

Flags: needinfo?(mak)
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/79ef4e692710 Split pickResult out of pickElement. r=adw https://hg.mozilla.org/integration/autoland/rev/7e46c4fe1829 URIFixup should force a visit when an uri-like search string ends with a slash. r=adw https://hg.mozilla.org/integration/autoland/rev/3883a1bffcbe Make the urlbar always go through pickResult. r=adw
Regressions: 1642969
Blocks: 1598616
Points: 2 → 3
No longer regressions: 1642969

I can confirm this enhancement works, I verified using Fx 78.0 on Windows 10 x64.

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

Attachment

General

Created:
Updated:
Size: