Do not treat backspace as whitespace to match IE and Opera. bug 404252, r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@241953 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -58,9 +58,8 @@ static const PRUnichar sUserdefined[] = {'u', 's', 'e', 'r', 'd', 'e', 'f',
|
||||
'i', 'n', 'e', 'd', 0};
|
||||
|
||||
static const PRUnichar kAttributeTerminalChars[] = {
|
||||
PRUnichar('&'), PRUnichar('\b'), PRUnichar('\t'),
|
||||
PRUnichar('\n'), PRUnichar('\r'), PRUnichar(' '),
|
||||
PRUnichar('>'),
|
||||
PRUnichar('&'), PRUnichar('\t'), PRUnichar('\n'),
|
||||
PRUnichar('\r'), PRUnichar(' '), PRUnichar('>'),
|
||||
PRUnichar(0)
|
||||
};
|
||||
|
||||
@@ -654,7 +653,7 @@ CTextToken::ConsumeCharacterData(PRBool aIgnoreComments,
|
||||
if (CaseInsensitiveFindInReadable(theTerminalString, start, end) &&
|
||||
(end == endPos || (*end == '>' || *end == ' ' ||
|
||||
*end == '\t' || *end == '\n' ||
|
||||
*end == '\r' || *end == '\b'))) {
|
||||
*end == '\r'))) {
|
||||
gtOffset = end;
|
||||
// Note that aIgnoreComments is only not set for <script>. We don't
|
||||
// want to execute scripts that aren't in the form of: <script\s.*>
|
||||
@@ -868,7 +867,7 @@ CTextToken::ConsumeParsedCharacterData(PRBool aDiscardFirstNewline,
|
||||
if (CaseInsensitiveFindInReadable(theTerminalString, start, end)) {
|
||||
if (end != endPos && (*end == '>' || *end == ' ' ||
|
||||
*end == '\t' || *end == '\n' ||
|
||||
*end == '\r' || *end == '\b')) {
|
||||
*end == '\r')) {
|
||||
aFound = PR_TRUE;
|
||||
mTextValue.Rebind(theContent.str());
|
||||
|
||||
@@ -1762,8 +1761,8 @@ CAttributeToken::Consume(PRUnichar aChar, nsScanner& aScanner, PRInt32 aFlag)
|
||||
PRUnichar('='), PRUnichar('\n'),
|
||||
PRUnichar('\r'), PRUnichar('\t'),
|
||||
PRUnichar('>'), PRUnichar('<'),
|
||||
PRUnichar('\b'), PRUnichar('\''),
|
||||
PRUnichar('/'), PRUnichar(0) };
|
||||
PRUnichar('\''), PRUnichar('/'),
|
||||
PRUnichar(0) };
|
||||
static const nsReadEndCondition theEndCondition(theTerminalsChars);
|
||||
|
||||
nsScannerIterator start, end;
|
||||
|
||||
@@ -460,7 +460,6 @@ nsresult nsScanner::SkipWhitespace(PRInt32& aNewlinesSkipped) {
|
||||
case '\n':
|
||||
case '\r': ++aNewlinesSkipped;
|
||||
case ' ' :
|
||||
case '\b':
|
||||
case '\t':
|
||||
{
|
||||
skipped = PR_TRUE;
|
||||
@@ -565,7 +564,6 @@ nsresult nsScanner::ReadTagIdentifier(nsScannerSharedSubstring& aString) {
|
||||
case '\n':
|
||||
case '\r':
|
||||
case ' ' :
|
||||
case '\b':
|
||||
case '\t':
|
||||
case '\v':
|
||||
case '\f':
|
||||
@@ -768,7 +766,6 @@ nsresult nsScanner::ReadWhitespace(nsScannerSharedSubstring& aString,
|
||||
}
|
||||
break;
|
||||
case ' ' :
|
||||
case '\b':
|
||||
case '\t':
|
||||
theChar = (++current != end) ? *current : '\0';
|
||||
break;
|
||||
@@ -818,7 +815,6 @@ nsresult nsScanner::ReadWhitespace(nsScannerIterator& aStart,
|
||||
case '\n':
|
||||
case '\r': ++aNewlinesSkipped;
|
||||
case ' ' :
|
||||
case '\b':
|
||||
case '\t':
|
||||
{
|
||||
PRUnichar thePrevChar = theChar;
|
||||
|
||||
Reference in New Issue
Block a user