re-enable browser_urlbarStopSearchOnSelection.js for Quantumbar

RESOLVED FIXED in Firefox 68

Status

()

task
P2
normal
RESOLVED FIXED
3 months ago
19 days ago

People

(Reporter: dao, Assigned: adw)

Tracking

(Blocks 1 bug)

Trunk
Firefox 68
Points:
2
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

3 months ago
No description provided.
Points: --- → 2
Priority: P3 → P2
Reporter

Updated

2 months ago
Type: enhancement → task
Assignee

Updated

2 months ago
Assignee: nobody → adw
Status: NEW → ASSIGNED
Iteration: --- → 68.4 - Apr 29 - May 12
Assignee

Comment 1

2 months ago

The event buffering in quantumbar seems to be different enough from awesomebar that porting this isn't quite as simple as I first thought.

Assignee

Comment 2

2 months ago

This test uncovered a couple of problems:

(1) UrlbarController.handleKeyNavigation relies on event.defaultPrevented to tell whether the one-offs handled the key event. That's a problem when combined with deferring the down arrow key.

handleKeyNavigation is called twice in that case. The first time, the event is deferred (so executeAction = false), and handleKeyNavigation calls event.preventDefault. The second time, the event is being replayed, but defaultPrevented is true from the previous call regardless of whether the one-offs actually handled the event.

So handleKeyNavigation always returns early because it thinks the one-offs always handled the event, so it never properly replays down arrow keys.

(2) UrlbarProviderUnifiedComplete's query promise is never resolved when the query is canceled. That's a problem in general of course but I tripped over it in this test because I need to check results after the query is canceled, and the test ended up hanging since UrlbarTestUtils waits for the query to finish in order to get its results.

It's not a problem in UnifiedComplete itself per se because of course awesomebar uses UnifiedComplete too, and it doesn't have this problem. The difference is that nsAutoCompleteController::StopSearch calls input->OnSearchComplete() (via PostSearchCleanup): https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/toolkit/components/autocomplete/nsAutoCompleteController.cpp#1433

Quantumbar's UnifiedComplete provider is missing that behavior, so this patch adds it by resolving its query promise when the query is canceled.

Reporter

Updated

2 months ago
No longer depends on: 1535656

Comment 7

2 months ago
Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9242458b79d5
Quantumbar: Re-enable browser_urlbarStopSearchOnSelection.js and fix a couple of related problems. r=mak
Regressions: 1548236

Comment 9

2 months ago
Backout by aciure@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/99548c52b81f
Backed out changeset 9242458b79d5 for high frequency browser/browser_urlbarStopSearchOnSelection.js failures CLOSED TREE

Comment 11

2 months ago
Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a7ad04ab4ba4
Quantumbar: Re-enable browser_urlbarStopSearchOnSelection.js and fix a couple of related problems. r=mak

Comment 12

2 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.