Closed Bug 515451 Opened 12 years ago Closed 12 years ago
make places autocomplete empty search behavior customizable
Right now places autocomplete restricts empty searches to typed history items. Fennec would like unvisited bookmarks to appear in empty searches, so I'd like to make that customizable with a pref.
I decided to have the behavior be fully customizable rather than just additive to the default behavior, which allows more flexibility and is slightly simpler.
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #399545 - Flags: review?(edilee)
So we ignore the default behavior/user preference (Privacy -> Location bar suggestions) when the user clicks the dropdown? The only badness that can occur is if the user selects "Bookmarks" and clicking the dropdown will now show history. (For the other cases, "History & Bookmarks" is actually "0" and "History" is 1 (?), so just using empty behavior will be correct because it's "33" (32 | 1) and covers both those cases. "None" just turns off the location bar entirely.)
Comment on attachment 399545 [details] [diff] [review] patch i'd just rename this._emptyDefaultBehavior to this._emptySearchDefaultBehavior since the former is unclear without looking at the definition.
Attachment #399545 - Flags: review?(edilee) → review+
Comment on attachment 399554 [details] [diff] [review] have empty behavior inherit default behavior fine for me.
Attachment #399554 - Flags: review?(mak77) → review+
Comment on attachment 399554 [details] [diff] [review] have empty behavior inherit default behavior r=Mardak Add tests to test_empty_search: http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/tests/autocomplete/test_empty_search.js You can use the pattern from test_special_search to change the prefs and search. http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/tests/autocomplete/test_special_search.js#166
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Comment on attachment 399577 [details] [diff] [review] with test Want this for Fennec
Attachment #399577 - Flags: approval1.9.2?
Is there any change here by using a different number for this pref? browser.urlbar.default.behavior 1: history 2: bookmarked 4: match tag 8: match title 16: match URL 32: match typed so you want 1+32 = 33
I don't understand your comment. The patch uses 33 as a default. That matches the previous behavior.
Yes, changing browser.urlbar.default.behavior to 33 will limit normal awesomebar searches to typed history items, if that's what your asking.
You need to log in before you can comment on or make changes to this bug.