From f2d2288f5f3aaebd7e2eca348bb6164a14048694 Mon Sep 17 00:00:00 2001 From: "pollmann%netscape.com" Date: Thu, 30 Mar 2000 00:19:13 +0000 Subject: [PATCH] Bug 33699: Allow whitespace in frameset rows and cols spec '*' r=nisheeth --- layout/generic/nsFrameSetFrame.cpp | 3 ++- layout/html/document/src/nsFrameSetFrame.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/generic/nsFrameSetFrame.cpp b/layout/generic/nsFrameSetFrame.cpp index 6add83b8dea1..eff2a65ec4a6 100644 --- a/layout/generic/nsFrameSetFrame.cpp +++ b/layout/generic/nsFrameSetFrame.cpp @@ -739,10 +739,11 @@ nsHTMLFramesetFrame::ParseRowColSpec(nsString& aSpec, // Translate value to an integer nsString token(""); aSpec.Mid(token, start, numberEnd - start); + token.StripChars(" \n\r\t"); // Trim whitespace from spec (Bug 33699) // Treat * as 1* if ((eFramesetUnit_Relative == aSpecs[i].mUnit) && - (numberEnd == start)) { + (0 == token.Length())) { aSpecs[i].mValue = 1; } diff --git a/layout/html/document/src/nsFrameSetFrame.cpp b/layout/html/document/src/nsFrameSetFrame.cpp index 6add83b8dea1..eff2a65ec4a6 100644 --- a/layout/html/document/src/nsFrameSetFrame.cpp +++ b/layout/html/document/src/nsFrameSetFrame.cpp @@ -739,10 +739,11 @@ nsHTMLFramesetFrame::ParseRowColSpec(nsString& aSpec, // Translate value to an integer nsString token(""); aSpec.Mid(token, start, numberEnd - start); + token.StripChars(" \n\r\t"); // Trim whitespace from spec (Bug 33699) // Treat * as 1* if ((eFramesetUnit_Relative == aSpecs[i].mUnit) && - (numberEnd == start)) { + (0 == token.Length())) { aSpecs[i].mValue = 1; }