WebCore:
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2008 22:05:52 +0000 (22:05 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2008 22:05:52 +0000 (22:05 +0000)
        Reviewed by Darin Adler.

        Add ClassInfo to custom constructors so that they toString properly

        - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp,
          and XSLTProcessorConstructorImp and prefix all the classes with JS.

        * bindings/js/JSAudioConstructor.cpp:
        (WebCore::): Added ClassInfo definition.
        (WebCore::JSAudioConstructor::JSAudioConstructor):
        (WebCore::JSAudioConstructor::construct): Cleanup.
        * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document.
        (WebCore::JSAudioConstructor::classInfo): Added.

        * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype
        to JSHTMLInputElementBasePrototype as seen if toString'ed.
        (WebCore::):

        * bindings/js/JSHTMLOptionElementConstructor.cpp:
        (WebCore::): Added ClassInfo definition.
        * bindings/js/JSHTMLOptionElementConstructor.h:
        (WebCore::JSHTMLOptionElementConstructor::classInfo): Added.

        * bindings/js/JSImageConstructor.cpp:
        (WebCore::): Added ClassInfo definition.
        (WebCore::JSImageConstructor::implementsConstruct): Moved here from header.
        * bindings/js/JSImageConstructor.h:
        (WebCore::JSImageConstructor::classInfo): Added.

        * bindings/js/JSXMLHttpRequest.cpp:
        (WebCore::): Rename XMLHttpRequestPrototype  to JSXMLHttpRequestPrototype
        as seen if toString'ed.
        (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
        (WebCore::JSXMLHttpRequestConstructor::implementsConstruct):
        (WebCore::JSXMLHttpRequestConstructor::construct):
        * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to
        JSXMLHttpRequestConstructor and doc to m_document and
        (WebCore::JSXMLHttpRequestConstructor::classInfo): Added.

        * bindings/js/JSXSLTProcessor.cpp:
        (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and
        XSLTProcessorConstructorImp to JSXSLTProcessorConstructor.
        (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
        (WebCore::JSXSLTProcessorConstructor::implementsConstruct):
        (WebCore::JSXSLTProcessorConstructor::construct):
        * bindings/js/JSXSLTProcessor.h:
        (WebCore::JSXSLTProcessorConstructor::classInfo): Added.

        * bindings/js/kjs_window.cpp:
        (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names.

WebKitTools:

        Reviewed by Darin Adler.

        * Scripts/do-webcore-rename: Update renaming plan.

LayoutTests:

        Reviewed by Darin Adler.

        Update results for fixed class names.

        * fast/dom/Window/window-properties-expected.txt:
        * fast/dom/xmlhttprequest-get-expected.txt:
        * http/tests/xmlhttprequest/event-target-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30763 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/window-properties-expected.txt
LayoutTests/fast/dom/xmlhttprequest-get-expected.txt
LayoutTests/http/tests/xmlhttprequest/event-target-expected.txt
WebCore/ChangeLog
WebCore/bindings/js/JSAudioConstructor.cpp
WebCore/bindings/js/JSAudioConstructor.h
WebCore/bindings/js/JSHTMLInputElementBase.cpp
WebCore/bindings/js/JSHTMLOptionElementConstructor.cpp
WebCore/bindings/js/JSHTMLOptionElementConstructor.h
WebCore/bindings/js/JSImageConstructor.cpp
WebCore/bindings/js/JSImageConstructor.h
WebCore/bindings/js/JSXMLHttpRequest.cpp
WebCore/bindings/js/JSXMLHttpRequest.h
WebCore/bindings/js/JSXSLTProcessor.cpp
WebCore/bindings/js/JSXSLTProcessor.h
WebCore/bindings/js/kjs_window.cpp
WebKitTools/ChangeLog
WebKitTools/Scripts/do-webcore-rename

index ab39e586d642e81535920b5c831947c2dcb2de45..f306fe3898a6bab7258fa44275a38f58d8267f26 100644 (file)
@@ -1,3 +1,13 @@
+2008-03-04  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Update results for fixed class names.
+
+        * fast/dom/Window/window-properties-expected.txt:
+        * fast/dom/xmlhttprequest-get-expected.txt:
+        * http/tests/xmlhttprequest/event-target-expected.txt:
+
 2008-03-04  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Oliver Hunt and Geoffrey Garen.
index cfbb6c4c4a4c1216ff67c1f764d90d4632351b5e..35959c8ba6e3cad9e7751e7f0c8bf8f27aa3f8f6 100644 (file)
@@ -32,7 +32,7 @@ window.Attr.prototype.normalize [function]
 window.Attr.prototype.removeChild [function]
 window.Attr.prototype.removeEventListener [function]
 window.Attr.prototype.replaceChild [function]
-window.Audio [object Object]
+window.Audio [object AudioConstructor]
 window.CDATASection [object CDATASectionConstructor]
 window.CDATASection.prototype [object CDATASectionPrototype]
 window.CDATASection.prototype.ATTRIBUTE_NODE [number]
@@ -736,7 +736,7 @@ window.HTMLUListElement [object HTMLUListElementConstructor]
 window.HTMLUListElement.prototype [printed above as window.Element.prototype]
 window.HTMLVideoElement [object HTMLVideoElementConstructor]
 window.HTMLVideoElement.prototype [printed above as window.Element.prototype]
-window.Image [object Object]
+window.Image [object ImageConstructor]
 window.KeyboardEvent [object KeyboardEventConstructor]
 window.KeyboardEvent.prototype [printed above as window.Event.prototype]
 window.MediaError [object MediaErrorConstructor]
@@ -850,7 +850,7 @@ window.NodeList.prototype [object NodeListPrototype]
 window.NodeList.prototype.item [function]
 window.Notation [object NotationConstructor]
 window.Notation.prototype [printed above as window.Node.prototype]
-window.Option [object Object]
+window.Option [object OptionConstructor]
 window.OverflowEvent [object OverflowEventConstructor]
 window.OverflowEvent.BOTH [number]
 window.OverflowEvent.HORIZONTAL [number]
@@ -1136,8 +1136,8 @@ window.URIError [function]
 window.WheelEvent [object WheelEventConstructor]
 window.WheelEvent.prototype [printed above as window.Event.prototype]
 window.XMLDocument [printed above as window.Document]
-window.XMLHttpRequest [object Object]
-window.XMLHttpRequest.prototype [object JSXMLHttpRequestPrototype]
+window.XMLHttpRequest [object XMLHttpRequestConstructor]
+window.XMLHttpRequest.prototype [object XMLHttpRequestPrototype]
 window.XMLHttpRequest.prototype.abort [function]
 window.XMLHttpRequest.prototype.addEventListener [function]
 window.XMLHttpRequest.prototype.dispatchEvent [function]
@@ -1190,7 +1190,7 @@ window.XPathResult.prototype.UNORDERED_NODE_ITERATOR_TYPE [number]
 window.XPathResult.prototype.UNORDERED_NODE_SNAPSHOT_TYPE [number]
 window.XPathResult.prototype.iterateNext [function]
 window.XPathResult.prototype.snapshotItem [function]
-window.XSLTProcessor [object Object]
+window.XSLTProcessor [object XSLTProcessorConsructor]
 window.XSLTProcessor.prototype [object XSLTProcessorPrototype]
 window.XSLTProcessor.prototype.clearParameters [function]
 window.XSLTProcessor.prototype.getParameter [function]
index 6cbb570a4c9c11055087d49f76308e4c80a2f5b8..ea27b4028b495da4ffe45c7f15655e81ecd5ac19 100644 (file)
@@ -46,7 +46,7 @@ bubbles : 'false'
 cancelBubble : 'false'
 cancelable : 'false'
 clipboardData : 'undefined'
-currentTarget : '[object JSXMLHttpRequest]'
+currentTarget : '[object XMLHttpRequest]'
 eventPhase : '0'
 initEvent : 'function initEvent() {
     [native code]
@@ -55,10 +55,10 @@ preventDefault : 'function preventDefault() {
     [native code]
 }'
 returnValue : 'true'
-srcElement : '[object JSXMLHttpRequest]'
+srcElement : '[object XMLHttpRequest]'
 stopPropagation : 'function stopPropagation() {
     [native code]
 }'
-target : '[object JSXMLHttpRequest]'
+target : '[object XMLHttpRequest]'
 type : 'load'
 
index 311a1bfc833361e1aa97c7287077801c627885c7..8b93f7bf7ce5f4132ef0f44c8c5a9a99f58961af 100644 (file)
@@ -1,10 +1,10 @@
 Tests for bug 11053 - XMLHttpRequest should be an EventTarget.
 
-fooListener: this = [object JSXMLHttpRequest]
-onload: this = [object JSXMLHttpRequest]
-eventListener: this = [object JSXMLHttpRequest]
-eventListener2: this = [object JSXMLHttpRequest]
-eventListener3: this = [object JSXMLHttpRequest]
-onload: this = [object JSXMLHttpRequest]
-eventListener: this = [object JSXMLHttpRequest]
-eventListener2: this = [object JSXMLHttpRequest]
+fooListener: this = [object XMLHttpRequest]
+onload: this = [object XMLHttpRequest]
+eventListener: this = [object XMLHttpRequest]
+eventListener2: this = [object XMLHttpRequest]
+eventListener3: this = [object XMLHttpRequest]
+onload: this = [object XMLHttpRequest]
+eventListener: this = [object XMLHttpRequest]
+eventListener2: this = [object XMLHttpRequest]
index 621e3b14974c5f82caf28c8f3138e3a1eb186b56..07e9182f70028e42aa222a29d25ed084d79e91de 100644 (file)
@@ -1,3 +1,56 @@
+2008-03-04  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Darin Adler.
+
+        Add ClassInfo to custom constructors so that they toString properly
+
+        - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp,
+          and XSLTProcessorConstructorImp and prefix all the classes with JS. 
+
+        * bindings/js/JSAudioConstructor.cpp:
+        (WebCore::): Added ClassInfo definition.
+        (WebCore::JSAudioConstructor::JSAudioConstructor):
+        (WebCore::JSAudioConstructor::construct): Cleanup.
+        * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document.
+        (WebCore::JSAudioConstructor::classInfo): Added.
+
+        * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype 
+        to JSHTMLInputElementBasePrototype as seen if toString'ed.
+        (WebCore::):
+
+        * bindings/js/JSHTMLOptionElementConstructor.cpp:
+        (WebCore::): Added ClassInfo definition.
+        * bindings/js/JSHTMLOptionElementConstructor.h:
+        (WebCore::JSHTMLOptionElementConstructor::classInfo): Added.
+
+        * bindings/js/JSImageConstructor.cpp:
+        (WebCore::): Added ClassInfo definition.
+        (WebCore::JSImageConstructor::implementsConstruct): Moved here from header.
+        * bindings/js/JSImageConstructor.h:
+        (WebCore::JSImageConstructor::classInfo): Added.
+
+        * bindings/js/JSXMLHttpRequest.cpp:
+        (WebCore::): Rename XMLHttpRequestPrototype  to JSXMLHttpRequestPrototype 
+        as seen if toString'ed.
+        (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
+        (WebCore::JSXMLHttpRequestConstructor::implementsConstruct):
+        (WebCore::JSXMLHttpRequestConstructor::construct):
+        * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to
+        JSXMLHttpRequestConstructor and doc to m_document and 
+        (WebCore::JSXMLHttpRequestConstructor::classInfo): Added.
+
+        * bindings/js/JSXSLTProcessor.cpp:
+        (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and 
+        XSLTProcessorConstructorImp to JSXSLTProcessorConstructor.
+        (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
+        (WebCore::JSXSLTProcessorConstructor::implementsConstruct):
+        (WebCore::JSXSLTProcessorConstructor::construct):
+        * bindings/js/JSXSLTProcessor.h:
+        (WebCore::JSXSLTProcessorConstructor::classInfo): Added.
+
+        * bindings/js/kjs_window.cpp:
+        (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names.
+
 2008-03-04  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Oliver Hunt and Geoffrey Garen.
index 1efb0d8d6c52425b90dcb302379bb9f51c1c0771..c7c27795c3709101c59d59dd5db1cb10fd600a77 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Apple Inc.  All rights reserved.
+ * Copyright (C) 2007, 2008 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -37,9 +37,11 @@ using namespace KJS;
 
 namespace WebCore {
 
-JSAudioConstructor::JSAudioConstructor(ExecState* exec, Document* d)
+const ClassInfo JSAudioConstructor::info = { "AudioConstructor", 0, 0 };
+
+JSAudioConstructor::JSAudioConstructor(ExecState* exec, Document* document)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
-    , m_doc(d)
+    , m_document(document)
 {
     putDirect(exec->propertyNames().length, jsNumber(1), ReadOnly|DontDelete|DontEnum);
 }
@@ -51,13 +53,12 @@ bool JSAudioConstructor::implementsConstruct() const
 
 JSObject* JSAudioConstructor::construct(ExecState* exec, const List& args)
 {
-    int exception = 0;
-    RefPtr<Element> el(m_doc->createElement("audio", exception));
+    ExceptionCode exception = 0;
+    RefPtr<Element> element = m_document->createElement("audio", exception);
     HTMLAudioElement* audio = 0;
-    if (el && !exception) {
-        audio = static_cast<HTMLAudioElement*>(el.get());
-        int sz = args.size();
-        if (sz > 0) {
+    if (element && !exception) {
+        audio = static_cast<HTMLAudioElement*>(element.get());
+        if (args.size() > 0) {
             audio->setSrc(args[0]->toString(exec));
             audio->scheduleLoad();
         }
@@ -67,5 +68,6 @@ JSObject* JSAudioConstructor::construct(ExecState* exec, const List& args)
     return static_cast<JSObject*>(toJS(exec, audio));
 }
 
-}
-#endif
+} // namespace WebCore
+
+#endif // ENABLE(VIDEO)
index 3bfd8572c7b94c224eb85827ee2bd67d2598ff1a..7486601324de7a3c0a02d1818d19653ddfb3abea 100644 (file)
@@ -36,13 +36,18 @@ namespace WebCore {
     class JSAudioConstructor : public DOMObject {
     public:
         JSAudioConstructor(KJS::ExecState*, Document*);
+
         virtual bool implementsConstruct() const;
-        virtual KJS::JSObject *construct(KJS::ExecState*, const KJS::List& args);
+        virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List&);
+
+        virtual const KJS::ClassInfo* classInfo() const { return &info; }
+        static const KJS::ClassInfo info;
+
     private:
-        RefPtr<Document> m_doc;
+        RefPtr<Document> m_document;
     };
 
-}
+} // namespace WebCore
 
-#endif
-#endif
+#endif // ENABLE(VIDEO)
+#endif // JSAudioConstructor_h
index f4b54b3771f42e1237c6f8069bb7ea1bc23a6ed0..8fb59978651635d84970e04c5c28ce7f0f5746fc 100644 (file)
@@ -40,7 +40,7 @@ namespace WebCore {
 @end
 */
 
-KJS_IMPLEMENT_PROTOTYPE("JSHTMLInputElementBase", JSHTMLInputElementBasePrototype)
+KJS_IMPLEMENT_PROTOTYPE("HTMLInputElementBase", JSHTMLInputElementBasePrototype)
 
 JSValue* jsHTMLInputElementBaseFunctionSetSelectionRange(ExecState* exec, JSObject* thisObj, const List& args)
 {
@@ -49,7 +49,7 @@ JSValue* jsHTMLInputElementBaseFunctionSetSelectionRange(ExecState* exec, JSObje
     return jsUndefined();
 }
 
-const ClassInfo JSHTMLInputElementBase::info = { "JSHTMLInputElementBase", &JSHTMLElement::info, &JSHTMLInputElementBaseTable };
+const ClassInfo JSHTMLInputElementBase::info = { "HTMLInputElementBase", &JSHTMLElement::info, &JSHTMLInputElementBaseTable };
 
 JSHTMLInputElementBase::JSHTMLInputElementBase(KJS::JSObject* prototype, PassRefPtr<HTMLInputElement> e)
     : JSHTMLElement(prototype, e.get())
index 551854afb0e5800598823b1e9f4aa5d0283fc27d..c236a8e27ec14e89fcf70f856139e057c4b6622d 100644 (file)
@@ -29,6 +29,8 @@ using namespace KJS;
 
 namespace WebCore {
 
+const ClassInfo JSHTMLOptionElementConstructor::info = { "OptionConstructor", 0, 0 };
+
 JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor(ExecState* exec, Document* document)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
     , m_document(document)
index 47a95c7329eaf37a8c40a722aaf510cae99ec626..a3e9e627a7de3a0bd0e6d79178cbfbb932f9a7d2 100644 (file)
@@ -28,12 +28,17 @@ namespace WebCore {
     class JSHTMLOptionElementConstructor : public DOMObject {
     public:
         JSHTMLOptionElementConstructor(KJS::ExecState*, Document*);
+
         virtual bool implementsConstruct() const;
-        virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List& args);
+        virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List&);
+
+        virtual const KJS::ClassInfo* classInfo() const { return &info; }
+        static const KJS::ClassInfo info;
+
     private:
         RefPtr<Document> m_document;
     };
 
-}
+} // namespace WebCore
 
-#endif
+#endif // JSHTMLOptionElementConstructor_h
index 9062476ab5a2f6a3eed8ed05b1b7521199715788..3bd2cdec62633244b7f5fa60d0cf56e1156349bf 100644 (file)
@@ -28,12 +28,19 @@ using namespace KJS;
 
 namespace WebCore {
 
+const ClassInfo JSImageConstructor::info = { "ImageConstructor", 0, 0 };
+
 JSImageConstructor::JSImageConstructor(ExecState* exec, Document* document)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
     , m_document(document)
 {
 }
 
+bool JSImageConstructor::implementsConstruct() const
+{
+    return true;
+}
+
 JSObject* JSImageConstructor::construct(ExecState* exec, const List& args)
 {
     bool widthSet = false;
index d8f491b5568ff3db6ba19aa7c6fede22bd42e996..7c1e89ec351856081da382afa643428d04605bb6 100644 (file)
@@ -30,9 +30,12 @@ namespace WebCore {
     public:
         JSImageConstructor(KJS::ExecState*, Document*);
 
-        virtual bool implementsConstruct() const { return true; }
+        virtual bool implementsConstruct() const;
         virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List&);
 
+        virtual const KJS::ClassInfo* classInfo() const { return &info; }
+        static const KJS::ClassInfo info;
+
     private:
         RefPtr<Document> m_document;
     };
index c99d4164c4f548fe979847679c402604327cf7dd..d644cece218f43e4ab3790c82b745231c16a2214 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2004, 2007 Apple Inc. All rights reserved.
+ *  Copyright (C) 2004, 2007, 2008 Apple Inc. All rights reserved.
  *  Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@nypop.com>
  *
  *  This library is free software; you can redistribute it and/or
@@ -56,26 +56,28 @@ namespace WebCore {
 @end
 */
 KJS_DEFINE_PROTOTYPE(JSXMLHttpRequestPrototype)
-KJS_IMPLEMENT_PROTOTYPE("JSXMLHttpRequest", JSXMLHttpRequestPrototype)
+KJS_IMPLEMENT_PROTOTYPE("XMLHttpRequest", JSXMLHttpRequestPrototype)
 
-JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp(ExecState* exec, Document* d)
+const ClassInfo JSXMLHttpRequestConstructor::info = { "XMLHttpRequestConstructor", 0, 0 };
+
+JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor(ExecState* exec, Document* document)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
-    , doc(d)
+    , m_document(document)
 {
     putDirect(exec->propertyNames().prototype, JSXMLHttpRequestPrototype::self(exec), None);
 }
 
-bool JSXMLHttpRequestConstructorImp::implementsConstruct() const
+bool JSXMLHttpRequestConstructor::implementsConstruct() const
 {
     return true;
 }
 
-JSObject* JSXMLHttpRequestConstructorImp::construct(ExecState* exec, const List&)
+JSObject* JSXMLHttpRequestConstructor::construct(ExecState* exec, const List&)
 {
-    return new JSXMLHttpRequest(JSXMLHttpRequestPrototype::self(exec), doc.get());
+    return new JSXMLHttpRequest(JSXMLHttpRequestPrototype::self(exec), m_document.get());
 }
 
-const ClassInfo JSXMLHttpRequest::info = { "JSXMLHttpRequest", 0, &JSXMLHttpRequestTable };
+const ClassInfo JSXMLHttpRequest::info = { "XMLHttpRequest", 0, &JSXMLHttpRequestTable };
 
 /* Source for JSXMLHttpRequestTable.
 @begin JSXMLHttpRequestTable 7
index 6567a6b52f85d6d70bde060f616b10e9354ccd92..7adec8dab5bb38e45c3dd7d11e7013cdb57eb02f 100644 (file)
@@ -27,15 +27,18 @@ namespace WebCore {
 class XMLHttpRequest;
 class Document;
 
-class JSXMLHttpRequestConstructorImp : public DOMObject {
+class JSXMLHttpRequestConstructor : public DOMObject {
 public:
-    JSXMLHttpRequestConstructorImp(KJS::ExecState*, Document*);
+    JSXMLHttpRequestConstructor(KJS::ExecState*, Document*);
 
     virtual bool implementsConstruct() const;
     virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List&);
 
+    virtual const KJS::ClassInfo* classInfo() const { return &info; }
+    static const KJS::ClassInfo info;
+
 private:
-    RefPtr<Document> doc;
+    RefPtr<Document> m_document;
 };
 
 class JSXMLHttpRequest : public DOMObject {
index 9aa38a2087f9783ec962f06b16a7fd86bd395c5d..41b456b2ec32e81c3ad950eda15c8987ba95458e 100644 (file)
@@ -44,7 +44,7 @@ namespace WebCore {
 const ClassInfo JSXSLTProcessor::info = { "XSLTProcessor", 0, 0 };
 
 /*
-@begin XSLTProcessorPrototypeTable 7
+@begin JSXSLTProcessorPrototypeTable 7
   importStylesheet      jsXSLTProcessorPrototypeFunctionImportStylesheet     DontDelete|Function 1
   transformToFragment   jsXSLTProcessorPrototypeFunctionTransformToFragment  DontDelete|Function 2
   transformToDocument   jsXSLTProcessorPrototypeFunctionTransformToDocument  DontDelete|Function 2
@@ -56,8 +56,8 @@ const ClassInfo JSXSLTProcessor::info = { "XSLTProcessor", 0, 0 };
 @end
 */
 
-KJS_DEFINE_PROTOTYPE(XSLTProcessorPrototype)
-KJS_IMPLEMENT_PROTOTYPE("XSLTProcessor", XSLTProcessorPrototype)
+KJS_DEFINE_PROTOTYPE(JSXSLTProcessorPrototype)
+KJS_IMPLEMENT_PROTOTYPE("XSLTProcessor", JSXSLTProcessorPrototype)
 
 JSXSLTProcessor::JSXSLTProcessor(JSObject* prototype)
     : DOMObject(prototype)
@@ -186,22 +186,24 @@ JSValue* jsXSLTProcessorPrototypeFunctionReset(ExecState* exec, JSObject* thisOb
     return jsUndefined();
 }
 
-XSLTProcessorConstructorImp::XSLTProcessorConstructorImp(ExecState* exec)
+const ClassInfo JSXSLTProcessorConstructor::info = { "XSLTProcessorConsructor", 0, 0 };
+
+JSXSLTProcessorConstructor::JSXSLTProcessorConstructor(ExecState* exec)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
 {
-    putDirect(exec->propertyNames().prototype, XSLTProcessorPrototype::self(exec), None);
+    putDirect(exec->propertyNames().prototype, JSXSLTProcessorPrototype::self(exec), None);
 }
 
-bool XSLTProcessorConstructorImp::implementsConstruct() const
+bool JSXSLTProcessorConstructor::implementsConstruct() const
 {
     return true;
 }
 
-JSObject* XSLTProcessorConstructorImp::construct(ExecState* exec, const List& args)
+JSObject* JSXSLTProcessorConstructor::construct(ExecState* exec, const List& args)
 {
-    return new JSXSLTProcessor(XSLTProcessorPrototype::self(exec));
+    return new JSXSLTProcessor(JSXSLTProcessorPrototype::self(exec));
 }
 
-} // namespace KJS
+} // namespace WebCore
 
 #endif // ENABLE(XSLT)
index 26ba6b396ca86d73d2d8f4afecad4b2fa5bce52b..2d7dd5305d8609c606094a06056dea34ea2bd45f 100644 (file)
@@ -52,12 +52,15 @@ private:
     RefPtr<XSLTProcessor> m_impl;
 };
 
-class XSLTProcessorConstructorImp : public DOMObject {
+class JSXSLTProcessorConstructor : public DOMObject {
 public:
-    XSLTProcessorConstructorImp(KJS::ExecState*);
+    JSXSLTProcessorConstructor(KJS::ExecState*);
 
     virtual bool implementsConstruct() const;
     virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List&);
+
+    virtual const KJS::ClassInfo* classInfo() const { return &info; }
+    static const KJS::ClassInfo info;
 };
 
 KJS::JSValue* jsXSLTProcessorPrototypeFunctionImportStylesheet(KJS::ExecState*, KJS::JSObject*, const KJS::List&);
index 2a674fcdb0eac5fe5fe4278f58049d4b9c6a6c92..ecaab9b7ec6778f8f7dc947eb659a1cbac292346 100644 (file)
@@ -479,7 +479,7 @@ JSValue *JSDOMWindowBase::getValueProperty(ExecState *exec, int token) const
     case XMLHttpRequest:
       if (!allowsAccessFrom(exec))
         return jsUndefined();
-      return new JSXMLHttpRequestConstructorImp(exec, impl()->frame()->document());
+      return new JSXMLHttpRequestConstructor(exec, impl()->frame()->document());
     case Audio:
 #if ENABLE(VIDEO)
       if (!allowsAccessFrom(exec))
@@ -490,13 +490,12 @@ JSValue *JSDOMWindowBase::getValueProperty(ExecState *exec, int token) const
 #else
       return jsUndefined();
 #endif
-#if ENABLE(XSLT)
     case XSLTProcessor_:
+#if ENABLE(XSLT)
       if (!allowsAccessFrom(exec))
         return jsUndefined();
-      return new XSLTProcessorConstructorImp(exec);
+      return new JSXSLTProcessorConstructor(exec);
 #else
-    case XSLTProcessor_:
       return jsUndefined();
 #endif
    }
index 45bc2c219e0dad267ce60293f36bd31375610b98..ad07fe29eb7d382e4d708759ec2c7b77ca304c1c 100644 (file)
@@ -1,3 +1,9 @@
+2008-03-04  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Darin Adler.
+
+        * Scripts/do-webcore-rename: Update renaming plan.
+
 2008-03-02  Brent Fulgham  <bfulgham@gmail.com>
 
         Reviewed by Alp Toker.
index 36f894ae8ab37eb99577407ac3bb3ab789fbf52f..0d4502a1890d9e5c46bf688c715efdc6cf8f9d03 100755 (executable)
@@ -158,7 +158,7 @@ my %renames = (
     "ImageConstructorImp" => "JSImageConstructor",
     "ImageTokenizer" => "ImageDocumentBuilder",
     "InternalFunctionImp" => "InternalFunction",
-    "JSXMLHttpRequestConstructorImp" => "JSXMLHttpRequestConstructor",
+    "JSHTMLOptionElementConstructor" => "JSOptionConstructor",
     "KURL" => "URL",
     "KURLCFNet" => "URLCF",
     "KURLMac" => "URLMac",
@@ -243,8 +243,6 @@ my %renames = (
     "Tokenizer" => "DocumentBuilder",
     "Tokenizer_h" => "DocumentBuilder_h",
     "XMLTokenizer" => "XMLDocumentBuilder",
-    "XSLTProcessorConstructorImp" => "JSXSLTProcessorConstructor",
-    "XSLTProcessorPrototype" => "JSXSLTProcessorPrototype",
     "animationController" => "animation",
     "branchfirstbyte" => "branchFirstByte",
     "branchreqbyte" => "branchReqByte",