Bug 429498 - Location bar does not search consistently (matches 1-after a CamelCase). r=dietrich, b-ff3=beltzner, a1.9=mconnor

This commit is contained in:
edward.lee@engineering.uiuc.edu 2008-04-20 19:47:41 -07:00
parent 1e25c61f61
commit cc3b96e78b
2 changed files with 6 additions and 1 deletions

View File

@ -203,7 +203,7 @@ FindOnBoundary(const nsAString &aToken, const nsAString &aTarget)
// we're not currently on a word boundary, eat up as many non-word boundary
// characters as possible -- don't kill characters if we're currently on a
// word boundary so that we can match tokens that start on a word boundary.
if (!IsWordBoundary(*targetStart++))
if (!IsWordBoundary(ToLowerCase(*targetStart++)))
while (targetStart != targetEnd && !IsWordBoundary(*targetStart))
targetStart++;

View File

@ -37,6 +37,9 @@
/**
* Test bug 393678 to make sure matches against the url, title, tags are only
* made on word boundaries instead of in the middle of words.
*
* Make sure we don't try matching one after a CamelCase because the upper-case
* isn't really a word boundary. (bug 429498)
*/
let katakana = ["\u30a8", "\u30c9"]; // E, Do
@ -114,4 +117,6 @@ let gTests = [
["12: Extra negative assert that we don't match in the middle",
"ch", []],
["13: Don't match one character after a camel-case word boundary (bug 429498)",
"atch", []],
];