Closed Bug 429498 Opened 17 years ago Closed 17 years ago

Location bar does not search consistently (matches 1-after a CamelCase)

Categories

(Firefox :: Address Bar, defect, P2)

defect

Tracking

()

VERIFIED FIXED
Firefox 3

People

(Reporter: adelfino, Assigned: Mardak)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041606 Minefield/3.0pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008041606 Minefield/3.0pre Location bar does not search consistently. It's kind of weird, so I'll just write the steps to reproduce this. I'm requesting blocking since this is the main feature to ship with Firefox 3, so it should be as clean as possible. Reproducible: Always Steps to Reproduce: 1. Bookmark Bugzilla. 2. Type ugz. 3. Type zil. Actual Results: Step 2 shows Bugzilla as an auto-completion suggest. Step 3 does not. Expected Results: Both, step 2 and 3, should show Bugzilla as a suggest.
Flags: blocking-firefox3?
Version: unspecified → Trunk
If you want to "zil" to match "bugZILla", turn off this pref: browser.urlbar.matchOnWordBoundary
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
Flags: blocking-firefox3?
Oh, about it matching on "ugz", it's because of the conservative nature of word boundary matching to be able to match on CamelCase.
(In reply to comment #2) > Oh, about it matching on "ugz", it's because of the conservative nature of word > boundary matching to be able to match on CamelCase. > Could you please explain again? Since Bugzilla has no mixed case, I see no reason for differentiate between ugz, and zil.
I had a change in heart ;)
Status: RESOLVED → UNCONFIRMED
Depends on: 393678
Flags: blocking-firefox3?
Resolution: WORKSFORME → ---
Summary: Location bar does not search consistently → Location bar does not search consistently (matches 1-after a CamelCase)
Attached patch v1 (obsolete) (deleted) — Splinter Review
..and thought of a 1-line solution that passes existing testcases and the new one of course. :)
Assignee: nobody → edilee
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #316241 - Flags: review?(dietrich)
I've actually run into this in other use cases, but wasn't smart enough to determine that it was mixed case causing it. Even I'd feel confident r+'ing this patch, it's that simple :)
Flags: blocking-firefox3? → blocking-firefox3+
Turns out I totally misinterpreted what this patch does based on my own desire to have matching on word boundaries act as a priority, not a pruning. Regardless, the inconsistency should be fixed.
Blocks: 429531
Whiteboard: [has patch][needs review dietrich]
(In reply to comment #0) > Expected Results: > Both, step 2 and 3, should show Bugzilla as a suggest. Just to be clear, the patch doesn't do this. The patch makes it so *both* "ugz" and "ila" *don't* show up as results because right now "word boundary matching" is treating "B" as a word boundary when it could do better and know that B is a special word boundary that shouldn't let the next character match on /1-after/ it.
FYI: An edge case which will get slightly edgier is www.rottentomatoes.com (with an all uppercase title) where IIUC "otten" won't match but "tten" will. Edward: What's wrong with considering the character's context in the word boundary check itself? E.g. the current character is at a word boundary when at least one of the following conditions is true (1) the current character is the first in the string (2) the current character is non-alphabetic (3) the previous character is non-alphabetic (4) the current character is upper case and the previous one isn't
Attached patch v1.1 (deleted) — Splinter Review
Same as v1 but updated some comments.
Attachment #316241 - Attachment is obsolete: true
Attachment #316352 - Flags: review?(dietrich)
Attachment #316241 - Flags: review?(dietrich)
Comment on attachment 316352 [details] [diff] [review] v1.1 looks fine, r=me.
Attachment #316352 - Flags: review?(dietrich) → review+
Comment on attachment 316352 [details] [diff] [review] v1.1 a1.9? for 1 line fix to make word boundary matching more consistent for CamelCase stuff with testcase
Attachment #316352 - Flags: approval1.9?
Comment on attachment 316352 [details] [diff] [review] v1.1 a=mconnor on behalf of 1.9 drivers
Attachment #316352 - Flags: approval1.9? → approval1.9+
Checking in toolkit/components/places/src/nsNavHistoryAutoComplete.cpp; /cvsroot/mozilla/toolkit/components/places/src/nsNavHistoryAutoComplete.cpp,v <-- nsNavHistoryAutoComplete.cpp new revision: 1.57; previous revision: 1.56 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.4; previous revision: 1.3 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago17 years ago
Flags: in-testsuite+
Priority: -- → P2
Resolution: --- → FIXED
Whiteboard: [has patch][needs review dietrich]
Target Milestone: --- → Firefox 3
Verified FIXED using the testcase in comment 0 with: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9pre) Gecko/2008042404 Minefield/3.0pre Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9pre) Gecko/2008042407 Minefield/3.0pre -and- Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008042404 Minefield/3.0pre
Status: RESOLVED → VERIFIED
Depends on: 549283
No longer depends on: 549283
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: