From 8b8bf0c055b2cca703806ced475864ec9635d1e4 Mon Sep 17 00:00:00 2001 From: "valeski%netscape.com" Date: Sun, 9 Aug 1998 21:23:54 +0000 Subject: [PATCH] removed the http:// assumption code from here to nsWebShell.cpp --- webshell/tests/viewer/nsBrowserWindow.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/webshell/tests/viewer/nsBrowserWindow.cpp b/webshell/tests/viewer/nsBrowserWindow.cpp index 439ab1ae333..f9bdfa93e64 100644 --- a/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/webshell/tests/viewer/nsBrowserWindow.cpp @@ -261,23 +261,7 @@ HandleLocationEvent(nsGUIEvent *aEvent) case NS_KEY_UP: if (NS_VK_RETURN == ((nsKeyEvent*)aEvent)->keyCode) { nsAutoString text; - PRInt32 colon, fSlash; - PRUnichar port; bw->mLocation->GetText(text, 1000); - - fSlash=text.Find('/'); - - // if no scheme (protocol) is found, assume http. - if ( ((colon=text.Find(':')) == -1) // no colon at all - || ( (fSlash > -1) && (colon > fSlash) ) // the only colon comes after the first slash - || ( (colon < text.Length()-1) // the first char after the first colon is a digit (i.e. a port) - && ((port=text.CharAt(colon+1)) < '9') - && (port > '0') ) - ) { - nsString httpDef("http://"); - text.Insert(httpDef, 0, 7); - } - bw->GoTo(text); } break;