We prune results that don't match on word boundaries, so if we end up not matching anything, we show nothing. But it could be useful to show at least something if we don't have enough word-boundary results.
blocking-firefox3? as this is what beltzner wanted to grant blocking for bug 429498.
Whiteboard: [has patch][need dietrich review]
Created attachment 316333 [details] [diff] [review] v1 Simple patch, simple idea. New pref to control whether or not we match on word boundaries always, or first try word boundary then try matching anywhere. If we search through everything and want more results, continue searching but relax the condition of matching on word boundaries. Works with the "use previous results" optimization as well.
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #316333 - Flags: review?(dietrich)
(The pref value of 2 to always match on word boundaries is mostly just for testing to make sure the word boundary logic still works. ;))
Created attachment 316349 [details] screenshot of v1 Screenshot of matching on word boundaries first and then trying to match anywhere. https://build.mozilla.org/tryserver-builds/2008-04-17_17:firstname.lastname@example.org/
Attachment #316349 - Flags: ui-review?(beltzner)
Whiteboard: [has patch][need dietrich review] → [has patch][need dietrich review][need bug 429498]
Created attachment 316351 [details] [diff] [review] v1.1 Same as v1 but updated some comments.
This at most doubles the search time, bug because we have bug 422177 where we restart where the previous search left off, this isn't bad at all. We make sure we display any word boundary matches from history before trying to find non-word boundary matches. This lets us match "toronto" for "thisplacetoronto.com".
Whiteboard: [has patch][need dietrich review][need bug 429498] → [has patch][need dietrich review]
Attachment #316349 - Flags: ui-review?(beltzner) → ui-review+
This is important, marking as blocking.
Flags: blocking-firefox3? → blocking-firefox3+
With this bug fixed, it will be nice to have Cyrillic letters added to the list of non-word-boundaries as mentioned in bug 393678#c33. Thanks.
Comment on attachment 316351 [details] [diff] [review] v1.1 r=me, thanks!
Attachment #316351 - Flags: review?(dietrich) → review+
Comment on attachment 316351 [details] [diff] [review] v1.1 Changes some prefs to allow showing non-word boundary matches below word boundary matches.. with testcase too!
Attachment #316351 - Flags: approval1.9?
Whiteboard: [has patch][need dietrich review] → [has patch][has reviews][has approval]
Comment on attachment 316351 [details] [diff] [review] v1.1 a1.9=beltzner
Attachment #316351 - Flags: approval1.9? → approval1.9+
http://hg.mozilla.org/cvs-trunk-mirror/index.cgi/rev/355b8f5bdc37 http://hg.mozilla.org/mozilla-central/index.cgi/rev/355b8f5bdc37 Checking in browser/app/profile/firefox.js; /cvsroot/mozilla/browser/app/profile/firefox.js,v <-- firefox.js new revision: 1.325; previous revision: 1.324 done Checking in toolkit/components/places/src/nsNavHistory.cpp; /cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.cpp,v <-- nsNavHistory.cpp new revision: 1.297; previous revision: 1.296 done Checking in toolkit/components/places/src/nsNavHistory.h; /cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.h,v <-- nsNavHistory.h new revision: 1.157; previous revision: 1.156 done Checking in toolkit/components/places/src/nsNavHistoryAutoComplete.cpp; /cvsroot/mozilla/toolkit/components/places/src/nsNavHistoryAutoComplete.cpp,v <-- nsNavHistoryAutoComplete.cpp new revision: 1.58; previous revision: 1.57 done Checking in toolkit/components/places/tests/autocomplete/test_word_boundary_search.js; /cvsroot/mozilla/toolkit/components/places/tests/autocomplete/test_word_boundary_search.js,v <-- test_word_boundary_search.js new revision: 1.5; previous revision: 1.4 done
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Priority: -- → P2
Resolution: --- → FIXED
Whiteboard: [has patch][has reviews][has approval]
Target Milestone: --- → Firefox 3
You need to log in before you can comment on or make changes to this bug.