diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 4660dba95f9..394febc5455 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -3685,8 +3685,11 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext, // XXX need a lookup function here; plus look ahead using the // text-runs if ((firstChar == '\'') || (firstChar == '\"')) { - wordLen = 2; - contentLen = 2; + if (contentLen > 1) + { + wordLen = 2; + contentLen = 2; + } } else { wordLen = 1; diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 4660dba95f9..394febc5455 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -3685,8 +3685,11 @@ nsTextFrame::MeasureText(nsIPresContext* aPresContext, // XXX need a lookup function here; plus look ahead using the // text-runs if ((firstChar == '\'') || (firstChar == '\"')) { - wordLen = 2; - contentLen = 2; + if (contentLen > 1) + { + wordLen = 2; + contentLen = 2; + } } else { wordLen = 1;