re-enable browser_urlbarStopSearchOnSelection.js for Quantumbar
Categories
(Firefox :: Address Bar, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: dao, Assigned: adw)
References
Details
Attachments
(1 file)
Updated•6 years ago
|
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years 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•6 years 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.
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
Finally got a green try run, so I'll land this now. https://treeherder.mozilla.org/#/jobs?repo=try&revision=7d66bceaaca1cd5de45a7fca7d53e70b41d25864
Comment 8•6 years ago
|
||
Backed out changeset 9242458b79d5 (bug 1539804) for high frequency browser/browser_urlbarStopSearchOnSelection.js failures
push that caused the backout: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel%2Crunnable&revision=9242458b79d5ae6e9d48c9a2a591680d79c13211
backout: https://hg.mozilla.org/integration/autoland/rev/99548c52b81f7b1ff00f0fef2eb713911ab4e830
Assignee | ||
Comment 10•6 years ago
|
||
Verify run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=76f081fe9acd3f5faf37b5787fb353022e429704
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Description
•