#125887, fix some cases where whitespace would make window.open() and openDialog() to not work.

r=jkeiser, sr=bzbarsky, a=brendan


git-svn-id: svn://10.0.0.236/trunk@125553 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hwaara%chello.se 2002-07-21 18:12:38 +00:00
parent f5446f3c7e
commit 38157b25b7

View File

@ -507,6 +507,7 @@ nsWindowWatcher::OpenWindowJS(nsIDOMWindow *aParent,
if (aFeatures) {
features.Assign(aFeatures);
featuresSpecified = PR_TRUE;
features.StripWhitespace();
}
chromeFlags = CalculateChromeFlags(features.get(), featuresSpecified, aDialog);
@ -1289,10 +1290,13 @@ nsWindowWatcher::WinHasOption(const char *aOptions, const char *aName,
char *comma, *equal;
PRInt32 found = 0;
while (PR_TRUE) {
while (nsCRT::IsAsciiSpace(*aOptions))
++aOptions;
#ifdef DEBUG
nsCAutoString options(aOptions);
NS_ASSERTION(options.FindCharInSet(" \n\r\t") == kNotFound,
"There should be no whitespace in this string!");
#endif
while (PR_TRUE) {
comma = PL_strchr(aOptions, ',');
if (comma)
*comma = '\0';