Ignore:
Timestamp:
Jun 28, 2008, 4:30:55 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-06-28 Sam Weinig <[email protected]>

Rubber-stamped by Darin Adler.

Rename string_object.h/cpp to StringObject.h/cpp and split out StringObjectThatMasqueradesAsUndefined,
StringConstructor and StringPrototype.

  • DerivedSources.make:
  • GNUmakefile.am:
  • JavaScriptCore.pri:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • JavaScriptCoreSources.bkl:
  • kjs/AllInOneFile.cpp:
  • kjs/JSGlobalObject.cpp:
  • kjs/StringConstructor.cpp: Copied from JavaScriptCore/kjs/string_object.cpp.
  • kjs/StringConstructor.h: Copied from JavaScriptCore/kjs/string_object.h.
  • kjs/StringObject.cpp: Copied from JavaScriptCore/kjs/string_object.cpp.
  • kjs/StringObject.h: Copied from JavaScriptCore/kjs/string_object.h.
  • kjs/StringObjectThatMasqueradesAsUndefined.h: Copied from JavaScriptCore/kjs/string_object.h.
  • kjs/StringPrototype.cpp: Copied from JavaScriptCore/kjs/string_object.cpp.
  • kjs/StringPrototype.h: Copied from JavaScriptCore/kjs/string_object.h.
  • kjs/internal.cpp:
  • kjs/string_object.cpp: Removed.
  • kjs/string_object.h: Removed.

WebCore:

2008-06-28 Sam Weinig <[email protected]>

Rubber-stamped by Darin Adler.

Update includes after remaming string_object.h to StringObject.h and
splitting out StringObjectThatMasqueradesAsUndefined, StringConstructor
and StringPrototype.

  • ForwardingHeaders/kjs/StringObject.h: Copied from WebCore/ForwardingHeaders/kjs/string_object.h.
  • ForwardingHeaders/kjs/StringObjectThatMasqueradesAsUndefined.h: Added.
  • ForwardingHeaders/kjs/StringPrototype.h: Added.
  • ForwardingHeaders/kjs/string_object.h: Removed.
  • bindings/js/JSCSSStyleDeclarationCustom.cpp:
File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/StringConstructor.h

    r34860 r34861  
    1 // -*- c-basic-offset: 2 -*-
    21/*
    32 *  Copyright (C) 1999-2000 Harri Porten ([email protected])
     
    2019 */
    2120
    22 #ifndef STRING_OBJECT_H_
    23 #define STRING_OBJECT_H_
     21#ifndef StringConstructor_h
     22#define StringConstructor_h
    2423
    25 #include "JSWrapperObject.h"
    26 #include "JSString.h"
    27 #include "lookup.h"
     24#include "JSFunction.h"
    2825
    2926namespace KJS {
    3027
    3128  class FunctionPrototype;
    32 
    33   class StringObject : public JSWrapperObject {
    34   public:
    35     StringObject(ExecState*, JSObject* prototype);
    36     StringObject(ExecState*, JSObject* prototype, const UString&);
    37 
    38     static StringObject* create(ExecState*, JSString*);
    39 
    40     virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
    41     virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&);
    42 
    43     virtual void put(ExecState* exec, const Identifier& propertyName, JSValue*);
    44     virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
    45     virtual void getPropertyNames(ExecState*, PropertyNameArray&);
    46 
    47     virtual const ClassInfo* classInfo() const { return &info; }
    48     static const ClassInfo info;
    49 
    50     JSString* internalValue() const { return static_cast<JSString*>(JSWrapperObject::internalValue());}
    51 
    52   protected:
    53     StringObject(JSObject* prototype, JSString*);
    54 
    55   private:
    56     virtual UString toString(ExecState*) const;
    57     virtual UString toThisString(ExecState*) const;
    58     virtual JSString* toThisJSString(ExecState*);
    59   };
    60 
    61   // WebCore uses this to make style.filter undetectable
    62   class StringObjectThatMasqueradesAsUndefined : public StringObject {
    63   public:
    64       StringObjectThatMasqueradesAsUndefined(ExecState* exec, JSObject* proto, const UString& string)
    65           : StringObject(exec, proto, string) { }
    66       virtual bool masqueradeAsUndefined() const { return true; }
    67       virtual bool toBoolean(ExecState*) const { return false; }
    68   };
    69 
    70   /**
    71    * @internal
    72    *
    73    * The initial value of String.prototype (and thus all objects created
    74    * with the String constructor
    75    */
    76   class StringPrototype : public StringObject {
    77   public:
    78     StringPrototype(ExecState *exec,
    79                        ObjectPrototype *objProto);
    80     virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
    81     virtual const ClassInfo *classInfo() const { return &info; }
    82     static const ClassInfo info;
    83   };
     29  class StringPrototype;
    8430
    8531  /**
     
    9743} // namespace KJS
    9844
    99 #endif
     45#endif // StringConstructor_h
Note: See TracChangeset for help on using the changeset viewer.