Ignore:
Timestamp:
Jul 19, 2006, 10:32:15 AM (19 years ago)
Author:
andersca
Message:

JavaScriptCore:

2006-07-19 Anders Carlsson <[email protected]>

Reviewed by Darin.

<rdar://problem/4620655> REGRESSION(10.4.7-10.5): preview button for a blogger.com post doesn't work


  • kjs/nodes2string.cpp: (StringNode::streamTo): Return the escaped string.


(RegExpNode::streamTo):
Use the correct syntax.


  • kjs/function.cpp: (KJS::escapeStringForPrettyPrinting):
  • kjs/function.h: Add escape function which escapes a string for pretty-printing so it can be parsed again.


  • wtf/unicode/icu/UnicodeIcu.h: (WTF::Unicode::isPrintableChar): New function.

LayoutTests:

2006-07-19 Anders Carlsson <[email protected]>

Reviewed by Darin.

<rdar://problem/4620655> REGRESSION(10.4.7-10.5): preview button for a blogger.com post doesn't work


  • fast/js/pretty-print-expected.txt: Added.
  • fast/js/pretty-print.html: Added.
  • fast/js/resources/pretty-print.js: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes2string.cpp

    r14502 r15526  
    2323#include "config.h"
    2424#include "nodes.h"
     25#include "function.h"
    2526
    2627namespace KJS {
     
    117118void StringNode::streamTo(SourceStream &s) const
    118119{
    119   s << '"' << value << '"';
    120 }
    121 
    122 void RegExpNode::streamTo(SourceStream &s) const { s <<  pattern; }
     120  s << '"' << escapeStringForPrettyPrinting(value) << '"';
     121}
     122
     123void RegExpNode::streamTo(SourceStream &s) const
     124{
     125    s << "/" <<  pattern << "/" << flags;
     126}
    123127
    124128void ThisNode::streamTo(SourceStream &s) const { s << "this"; }
Note: See TracChangeset for help on using the changeset viewer.