From a79df559c516f77dcc37d032df8510ffe5fc5c2a Mon Sep 17 00:00:00 2001 From: "ftang%netscape.com" Date: Tue, 12 Mar 2002 22:39:52 +0000 Subject: [PATCH] fix bug 130071. r=nhotta sr=hyatt, a=roc+moz make the Asian localization display access key correctly if the last char is a ":" --- layout/xul/base/src/nsTextBoxFrame.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/layout/xul/base/src/nsTextBoxFrame.cpp b/layout/xul/base/src/nsTextBoxFrame.cpp index ae8a6d0ebb7..62f57fd739e 100644 --- a/layout/xul/base/src/nsTextBoxFrame.cpp +++ b/layout/xul/base/src/nsTextBoxFrame.cpp @@ -717,10 +717,16 @@ nsTextBoxFrame::UpdateAccessTitle() ToUpperCase(tmpstring); tmpstring.Append(NS_LITERAL_STRING(")")); PRInt32 offset = mTitle.RFind("..."); - if (offset != kNotFound) + if (offset != kNotFound) { mTitle.Insert(tmpstring,NS_STATIC_CAST(PRUint32, offset)); - else - mTitle += tmpstring; + } else { + PRUint32 l = mTitle.Length(); + if((l > 0) && (PRUnichar(':')==mTitle[l-1])) { + mTitle.Insert(tmpstring,l-1); + } else { + mTitle += tmpstring; + } + } } } }