From 3840155e3df05c63da631673cbf5dcb47aabdfd1 Mon Sep 17 00:00:00 2001 From: "stridey%gmail.com" Date: Tue, 26 Sep 2006 22:12:59 +0000 Subject: [PATCH] Camino only: Bug 346111 - [10.4] javascript:alert() typed in location bar doesn't close if loaded from autocomplete drop-down. Patch by smorgan . r=cl sr=smfr --- camino/src/browser/AutoCompleteDataSource.h | 2 +- camino/src/browser/AutoCompleteTextField.mm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/camino/src/browser/AutoCompleteDataSource.h b/camino/src/browser/AutoCompleteDataSource.h index 1baf653b026d..747c7c95d36c 100644 --- a/camino/src/browser/AutoCompleteDataSource.h +++ b/camino/src/browser/AutoCompleteDataSource.h @@ -53,7 +53,7 @@ class nsIAutoCompleteResults; - (id) init; - (int) rowCount; -- (id) resultString:(int)aRow column:(NSString *)aColumn; +- (id) resultForRow:(int)aRow columnIdentifier:(NSString *)aColumnIdentifier; - (void) setErrorMessage: (NSString*) error; - (NSString*) errorMessage; diff --git a/camino/src/browser/AutoCompleteTextField.mm b/camino/src/browser/AutoCompleteTextField.mm index 49e027d2a1f8..9752b1cb51be 100644 --- a/camino/src/browser/AutoCompleteTextField.mm +++ b/camino/src/browser/AutoCompleteTextField.mm @@ -801,7 +801,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener) // user to see what they have typed and what change the autocomplete // makes while allowing them to continue typing w/out having to // reset the insertion point. - NSString *result = [mDataSource resultString:aRow column:@"col1"]; + NSString *result = [mDataSource resultForRow:aRow columnIdentifier:@"col1"]; // figure out where to start the match, depending on whether the user typed the protocol part int protocolLength = 0; @@ -825,7 +825,7 @@ NS_IMPL_ISUPPORTS1(AutoCompleteListener, nsIAutoCompleteListener) - (void) enterResult:(int)aRow { if (aRow >= 0 && [mDataSource rowCount] > 0) { - [self setStringUndoably:[mDataSource resultString:[mTableView selectedRow] column:@"col1"] fromLocation:0]; + [self setStringUndoably:[mDataSource resultForRow:[mTableView selectedRow] columnIdentifier:@"col1"] fromLocation:0]; [self closePopup]; } else if (mOpenTimer) { // if there was a search timer going when we hit enter, cancel it