Changeset 63273 in webkit for trunk/JavaScriptCore/parser/Lexer.h


Ignore:
Timestamp:
Jul 13, 2010, 6:02:12 PM (15 years ago)
Author:
[email protected]
Message:

2010-07-13 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

ES5 requires BOMs to be treated as whitespace
https://bugs.webkit.org/show_bug.cgi?id=42218

Add BOM character to the Lexer's definition of whitespace,
and remove the logic that dealt with stripping BOMs and
caching the cleaned string.

  • parser/Lexer.h: (JSC::Lexer::isWhiteSpace):
  • parser/SourceProvider.h: (JSC::UStringSourceProvider::create): (JSC::UStringSourceProvider::UStringSourceProvider):
  • wtf/text/StringImpl.h:

2010-07-13 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

ES5 requires BOMs to be treated as whitespace
https://bugs.webkit.org/show_bug.cgi?id=42218

Update the fast/js/removing-Cf-characters to reflect
new behaviour. Update a whole group of sputnik results
that we now pass.

  • fast/js/removing-Cf-characters-expected.txt:
  • fast/js/script-tests/removing-Cf-characters.js:
  • fast/js/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.1_T2-expected.txt:
  • fast/js/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.4_T2-expected.txt:
  • fast/js/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.1_T2-expected.txt:
  • fast/js/sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A2.4_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_218/S7.1_A2.1_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_218/S7.1_A2.2_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_320/S7.1_A2.1_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_320/S7.1_A2.2_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_410/S7.1_A2.1_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_410/S7.1_A2.2_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_500/S7.1_A2.1_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_500/S7.1_A2.2_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_510/S7.1_A2.1_T2-expected.txt:
  • fast/js/sputnik/Unicode/Unicode_510/S7.1_A2.2_T2-expected.txt:

2010-07-13 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

ES5 requires BOMs to be treated as whitespace
https://bugs.webkit.org/show_bug.cgi?id=42218

Remove BOM handling logic from WebCore Script objects.

  • bindings/js/StringSourceProvider.h: (WebCore::StringSourceProvider::StringSourceProvider):
  • loader/CachedScript.cpp: (WebCore::CachedScript::CachedScript): (WebCore::CachedScript::script):
  • loader/CachedScript.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/Lexer.h

    r63024 r63273  
    127127    inline bool Lexer::isWhiteSpace(int ch)
    128128    {
    129         return isASCII(ch) ? (ch == ' ' || ch == '\t' || ch == 0xB || ch == 0xC) : WTF::Unicode::isSeparatorSpace(ch);
     129        return isASCII(ch) ? (ch == ' ' || ch == '\t' || ch == 0xB || ch == 0xC) : (WTF::Unicode::isSeparatorSpace(ch) || ch == 0xFEFF);
    130130    }
    131131
Note: See TracChangeset for help on using the changeset viewer.