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; }