Commit 26e78cb1 authored by ap's avatar ap

Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=12268
        Give object prototypes their own names

JavaScriptCore:
        * kjs/lookup.h: Append "Prototype" to ClassName in KJS_IMPLEMENT_PROTOTYPE.

WebCore:
        * bindings/scripts/CodeGeneratorJS.pm: Append "Proto" to interface name for the prototype's ClassInfo.

        * bindings/js/JSHTMLInputElementBase.cpp:
        (WebCore::JSHTMLInputElementBasePrototypeFunction::callAsFunction):
        (WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
        * bindings/js/JSHTMLInputElementBase.h:
        * bindings/js/JSXMLHttpRequest.cpp:
        (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
        (KJS::JSXMLHttpRequest::JSXMLHttpRequest):
        (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction):
        * bindings/js/JSXMLHttpRequest.h:
        * bindings/js/JSXSLTProcessor.cpp:
        (KJS::JSXSLTProcessor::JSXSLTProcessor):
        (KJS::XSLTProcessorPrototypeFunction::callAsFunction):
        (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
        * bindings/js/kjs_css.cpp:
        (KJS::DOMCSSStyleDeclaration::DOMCSSStyleDeclaration):
        (KJS::DOMCSSStyleDeclarationPrototypeFunction::callAsFunction):
        (KJS::DOMMediaList::DOMMediaList):
        (KJS::KJS::DOMMediaListPrototypeFunction::callAsFunction):
        (KJS::DOMCSSStyleSheet::DOMCSSStyleSheet):
        (KJS::DOMCSSStyleSheetPrototypeFunction::callAsFunction):
        (KJS::DOMCSSValue::DOMCSSValue):
        (KJS::DOMCSSValuePrototypeFunction::callAsFunction):
        * bindings/js/kjs_css.h:
        * bindings/js/kjs_dom.cpp:
        (KJS::DOMNode::DOMNode):
        (KJS::DOMNodePrototypeFunction::callAsFunction):
        (KJS::DOMEventTargetNode::DOMEventTargetNode):
        (KJS::DOMEventTargetNodePrototypeFunction::callAsFunction):
        (KJS::DOMNamedNodeMap::DOMNamedNodeMap):
        (KJS::DOMNamedNodeMapPrototypeFunction::callAsFunction):
        * bindings/js/kjs_dom.h:
        * bindings/js/kjs_domnode.h:
        * bindings/js/kjs_events.cpp:
        (KJS::DOMEvent::DOMEvent):
        (KJS::DOMEventPrototypeFunction::callAsFunction):
        (KJS::Clipboard::Clipboard):
        (KJS::ClipboardPrototypeFunction::callAsFunction):
        * bindings/js/kjs_events.h:
        * bindings/js/kjs_html.cpp:
        (KJS::JSHTMLDocumentPrototypeFunction::callAsFunction):
        (KJS::):
        (KJS::JSHTMLDocument::JSHTMLDocument):
        (KJS::JSHTMLElementPrototypeFunction::callAsFunction):
        (KJS::JSHTMLElement::JSHTMLElement):
        (KJS::JSHTMLCollection::JSHTMLCollection):
        (KJS::JSHTMLCollectionPrototypeFunction::callAsFunction):
        * bindings/js/kjs_html.h:
        * bindings/js/kjs_navigator.cpp:
        * bindings/js/kjs_traversal.cpp:
        (KJS::DOMNodeFilter::DOMNodeFilter):
        (KJS::DOMNodeFilterPrototypeFunction::callAsFunction):
        * bindings/js/kjs_window.cpp:
        (KJS::Window::clear):
        Changed Proto to Prototype, and ProtoFunc to PrototypeFunction.

LayoutTests:
        * fast/dom/Window/window-properties-expected.txt:
        * fast/dom/prototype-chain-expected.txt:
        * fast/events/event-view-toString-expected.txt:
        * fast/events/mouseclick-target-and-positioning-expected.txt:
        * fast/tokenizer/external-script-document-write-expected.checksum:
        * fast/tokenizer/external-script-document-write-expected.png:
        * fast/tokenizer/external-script-document-write-expected.txt:
        Updated the results.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f6076a47
2007-01-16 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Maciej.
http://bugs.webkit.org/show_bug.cgi?id=12268
Give object prototypes their own names
* kjs/lookup.h: Append "Prototype" to ClassName in KJS_IMPLEMENT_PROTOTYPE.
2007-01-16 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
......
......@@ -296,59 +296,59 @@ namespace KJS {
* Helpers to define prototype objects (each of which simply implements
* the functions for a type of objects).
* Sorry for this not being very readable, but it actually saves much copy-n-paste.
* ParentProto is not our base class, it's the object we use as fallback.
* ParentPrototype is not our base class, it's the object we use as fallback.
* The reason for this is that there should only be ONE DOMNode.hasAttributes (e.g.),
* not one in each derived class. So we link the (unique) prototypes between them.
*
* Using those macros is very simple: define the hashtable (e.g. "DOMNodeProtoTable"), then
* KJS_DEFINE_PROTOTYPE(DOMNodeProto)
* KJS_IMPLEMENT_PROTOFUNC(DOMNodeProtoFunc)
* KJS_IMPLEMENT_PROTOTYPE("DOMNode", DOMNodeProto,DOMNodeProtoFunc)
* and use DOMNodeProto::self(exec) as prototype in the DOMNode constructor.
* If the prototype has a "parent prototype", e.g. DOMElementProto falls back on DOMNodeProto,
* then the first line will use KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE, with DOMNodeProto as the second argument.
* Using those macros is very simple: define the hashtable (e.g. "DOMNodePrototypeTable"), then
* KJS_DEFINE_PROTOTYPE(DOMNodePrototype)
* KJS_IMPLEMENT_PROTOFUNC(DOMNodePrototypeFunction)
* KJS_IMPLEMENT_PROTOTYPE("DOMNode", DOMNodePrototype, DOMNodePrototypeFunction)
* and use DOMNodePrototype::self(exec) as prototype in the DOMNode constructor.
* If the prototype has a "parent prototype", e.g. DOMElementPrototype falls back on DOMNodePrototype,
* then the first line will use KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE, with DOMNodePrototype as the second argument.
*/
// These macros assume that a prototype's only properties are functions
#define KJS_DEFINE_PROTOTYPE(ClassProto) \
class ClassProto : public KJS::JSObject { \
#define KJS_DEFINE_PROTOTYPE(ClassPrototype) \
class ClassPrototype : public KJS::JSObject { \
public: \
static KJS::JSObject* self(KJS::ExecState* exec); \
virtual const KJS::ClassInfo* classInfo() const { return &info; } \
static const KJS::ClassInfo info; \
bool getOwnPropertySlot(KJS::ExecState* , const KJS::Identifier&, KJS::PropertySlot&); \
ClassProto(KJS::ExecState* exec) \
ClassPrototype(KJS::ExecState* exec) \
: KJS::JSObject(exec->lexicalInterpreter()->builtinObjectPrototype()) { } \
\
};
#define KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE(ClassProto, ClassProtoProto) \
class ClassProto : public KJS::JSObject { \
#define KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE(ClassPrototype, ClassPrototypePrototype) \
class ClassPrototype : public KJS::JSObject { \
public: \
static KJS::JSObject* self(KJS::ExecState* exec); \
virtual const KJS::ClassInfo* classInfo() const { return &info; } \
static const KJS::ClassInfo info; \
bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&); \
ClassProto(KJS::ExecState* exec) \
: KJS::JSObject(ClassProtoProto::self(exec)) { } \
ClassPrototype(KJS::ExecState* exec) \
: KJS::JSObject(ClassPrototypePrototype::self(exec)) { } \
\
};
#define KJS_IMPLEMENT_PROTOTYPE(ClassName, ClassProto, ClassFunc) \
const ClassInfo ClassProto::info = { ClassName, 0, &ClassProto##Table, 0 }; \
JSObject* ClassProto::self(ExecState* exec) \
#define KJS_IMPLEMENT_PROTOTYPE(ClassName, ClassPrototype, ClassFunction) \
const ClassInfo ClassPrototype::info = { ClassName"Prototype", 0, &ClassPrototype##Table, 0 }; \
JSObject* ClassPrototype::self(ExecState* exec) \
{ \
return KJS::cacheGlobalObject<ClassProto>(exec, "[[" ClassName ".prototype]]"); \
return KJS::cacheGlobalObject<ClassPrototype>(exec, "[[" ClassName ".prototype]]"); \
} \
bool ClassProto::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) \
bool ClassPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) \
{ \
return getStaticFunctionSlot<ClassFunc, JSObject>(exec, &ClassProto##Table, this, propertyName, slot); \
return getStaticFunctionSlot<ClassFunction, JSObject>(exec, &ClassPrototype##Table, this, propertyName, slot); \
}
#define KJS_IMPLEMENT_PROTOFUNC(ClassFunc) \
class ClassFunc : public InternalFunctionImp { \
#define KJS_IMPLEMENT_PROTOTYPE_FUNCTION(ClassFunction) \
class ClassFunction : public InternalFunctionImp { \
public: \
ClassFunc(ExecState* exec, int i, int len, const Identifier& name) \
ClassFunction(ExecState* exec, int i, int len, const Identifier& name) \
: InternalFunctionImp(static_cast<FunctionPrototype*>(exec->lexicalInterpreter()->builtinFunctionPrototype()), name) \
, id(i) \
{ \
......
2007-01-16 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Maciej.
http://bugs.webkit.org/show_bug.cgi?id=12268
Give object prototypes their own names
* fast/dom/Window/window-properties-expected.txt:
* fast/dom/prototype-chain-expected.txt:
* fast/events/event-view-toString-expected.txt:
* fast/events/mouseclick-target-and-positioning-expected.txt:
* fast/tokenizer/external-script-document-write-expected.checksum:
* fast/tokenizer/external-script-document-write-expected.png:
* fast/tokenizer/external-script-document-write-expected.txt:
Updated the results.
2007-01-17 Eric Seidel <eric@webkit.org>
Reviewed by rwlbuis.
......@@ -37,7 +37,7 @@ window.CSSRule.MEDIA_RULE [number]
window.CSSRule.PAGE_RULE [number]
window.CSSRule.STYLE_RULE [number]
window.CSSRule.UNKNOWN_RULE [number]
window.CSSRule.prototype [object CSSRule]
window.CSSRule.prototype [object CSSRulePrototype]
window.CSSRule.prototype.CHARSET_RULE [number]
window.CSSRule.prototype.FONT_FACE_RULE [number]
window.CSSRule.prototype.IMPORT_RULE [number]
......@@ -46,7 +46,7 @@ window.CSSRule.prototype.PAGE_RULE [number]
window.CSSRule.prototype.STYLE_RULE [number]
window.CSSRule.prototype.UNKNOWN_RULE [number]
window.CSSStyleDeclaration [object CSSStyleDeclarationConstructor]
window.CSSStyleDeclaration.prototype [object CSSStyleDeclaration]
window.CSSStyleDeclaration.prototype [object CSSStyleDeclarationPrototype]
window.CSSStyleDeclaration.prototype.getPropertyCSSValue [function]
window.CSSStyleDeclaration.prototype.getPropertyPriority [function]
window.CSSStyleDeclaration.prototype.getPropertyShorthand [function]
......@@ -60,18 +60,18 @@ window.CSSValue.CSS_CUSTOM [number]
window.CSSValue.CSS_INHERIT [number]
window.CSSValue.CSS_PRIMITIVE_VALUE [number]
window.CSSValue.CSS_VALUE_LIST [number]
window.CSSValue.prototype [object CSSValue]
window.CSSValue.prototype [object CSSValuePrototype]
window.CSSValue.prototype.CSS_CUSTOM [number]
window.CSSValue.prototype.CSS_INHERIT [number]
window.CSSValue.prototype.CSS_PRIMITIVE_VALUE [number]
window.CSSValue.prototype.CSS_VALUE_LIST [number]
window.DOMException [object DOMExceptionConstructor]
window.DOMParser [object DOMParserConstructor]
window.DOMParser.prototype [object DOMParser]
window.DOMParser.prototype [object DOMParserPrototype]
window.DOMParser.prototype.parseFromString [function]
window.Document [printed above as window.XMLDocument]
window.DocumentFragment [object DocumentFragmentConstructor]
window.DocumentFragment.prototype [object DocumentFragment]
window.DocumentFragment.prototype [object DocumentFragmentPrototype]
window.DocumentFragment.prototype.ATTRIBUTE_NODE [number]
window.DocumentFragment.prototype.CDATA_SECTION_NODE [number]
window.DocumentFragment.prototype.COMMENT_NODE [number]
......@@ -102,7 +102,7 @@ window.DocumentFragment.prototype.removeChild [function]
window.DocumentFragment.prototype.removeEventListener [function]
window.DocumentFragment.prototype.replaceChild [function]
window.Element [object ElementConstructor]
window.Element.prototype [object Element]
window.Element.prototype [object ElementPrototype]
window.Element.prototype.ATTRIBUTE_NODE [number]
window.Element.prototype.CDATA_SECTION_NODE [number]
window.Element.prototype.COMMENT_NODE [number]
......@@ -176,7 +176,7 @@ window.Event.MOUSEOUT [number]
window.Event.MOUSEOVER [number]
window.Event.MOUSEUP [number]
window.Event.SELECT [number]
window.Event.prototype [object Event]
window.Event.prototype [object EventPrototype]
window.Event.prototype.AT_TARGET [number]
window.Event.prototype.BLUR [number]
window.Event.prototype.BUBBLING_PHASE [number]
......@@ -203,7 +203,7 @@ window.GCController [object RuntimeObject]
window.HTMLDocument [object HTMLDocumentConstructor]
window.HTMLDocument.prototype [printed above as window.XMLDocument.prototype]
window.HTMLElement [object HTMLElementConstructor]
window.HTMLElement.prototype [object HTMLElement]
window.HTMLElement.prototype [object HTMLElementPrototype]
window.HTMLElement.prototype.ATTRIBUTE_NODE [number]
window.HTMLElement.prototype.CDATA_SECTION_NODE [number]
window.HTMLElement.prototype.COMMENT_NODE [number]
......@@ -261,7 +261,7 @@ window.MutationEvent [object MutationEventConstructor]
window.MutationEvent.ADDITION [number]
window.MutationEvent.MODIFICATION [number]
window.MutationEvent.REMOVAL [number]
window.MutationEvent.prototype [object MutationEvent]
window.MutationEvent.prototype [object MutationEventPrototype]
window.MutationEvent.prototype.ADDITION [number]
window.MutationEvent.prototype.AT_TARGET [number]
window.MutationEvent.prototype.BLUR [number]
......@@ -301,7 +301,7 @@ window.Node.ENTITY_REFERENCE_NODE [number]
window.Node.NOTATION_NODE [number]
window.Node.PROCESSING_INSTRUCTION_NODE [number]
window.Node.TEXT_NODE [number]
window.Node.prototype [object Node]
window.Node.prototype [object NodePrototype]
window.Node.prototype.ATTRIBUTE_NODE [number]
window.Node.prototype.CDATA_SECTION_NODE [number]
window.Node.prototype.COMMENT_NODE [number]
......@@ -345,7 +345,7 @@ window.NodeFilter.SHOW_ENTITY_REFERENCE [number]
window.NodeFilter.SHOW_NOTATION [number]
window.NodeFilter.SHOW_PROCESSING_INSTRUCTION [number]
window.NodeFilter.SHOW_TEXT [number]
window.NodeFilter.prototype [object NodeFilter]
window.NodeFilter.prototype [object NodeFilterPrototype]
window.NodeFilter.prototype.FILTER_ACCEPT [number]
window.NodeFilter.prototype.FILTER_REJECT [number]
window.NodeFilter.prototype.FILTER_SKIP [number]
......@@ -372,7 +372,7 @@ window.Range.NODE_BEFORE_AND_AFTER [number]
window.Range.NODE_INSIDE [number]
window.Range.START_TO_END [number]
window.Range.START_TO_START [number]
window.Range.prototype [object Range]
window.Range.prototype [object RangePrototype]
window.Range.prototype.END_TO_END [number]
window.Range.prototype.END_TO_START [number]
window.Range.prototype.NODE_AFTER [number]
......@@ -408,7 +408,7 @@ window.RangeError [function]
window.RangeException [object RangeExceptionConstructor]
window.RangeException.BAD_BOUNDARYPOINTS_ERR [number]
window.RangeException.INVALID_NODE_TYPE_ERR [number]
window.RangeException.prototype [object RangeException]
window.RangeException.prototype [object RangeExceptionPrototype]
window.RangeException.prototype.BAD_BOUNDARYPOINTS_ERR [number]
window.RangeException.prototype.INVALID_NODE_TYPE_ERR [number]
window.ReferenceError [function]
......@@ -416,7 +416,7 @@ window.SyntaxError [function]
window.TypeError [function]
window.URIError [function]
window.XMLDocument [object DocumentConstructor]
window.XMLDocument.prototype [object Document]
window.XMLDocument.prototype [object DocumentPrototype]
window.XMLDocument.prototype.ATTRIBUTE_NODE [number]
window.XMLDocument.prototype.CDATA_SECTION_NODE [number]
window.XMLDocument.prototype.COMMENT_NODE [number]
......@@ -477,7 +477,7 @@ window.XMLDocument.prototype.removeChild [function]
window.XMLDocument.prototype.removeEventListener [function]
window.XMLDocument.prototype.replaceChild [function]
window.XMLHttpRequest [object Object]
window.XMLHttpRequest.prototype [object JSXMLHttpRequest]
window.XMLHttpRequest.prototype [object JSXMLHttpRequestPrototype]
window.XMLHttpRequest.prototype.abort [function]
window.XMLHttpRequest.prototype.addEventListener [function]
window.XMLHttpRequest.prototype.dispatchEvent [function]
......@@ -489,10 +489,10 @@ window.XMLHttpRequest.prototype.removeEventListener [function]
window.XMLHttpRequest.prototype.send [function]
window.XMLHttpRequest.prototype.setRequestHeader [function]
window.XMLSerializer [object XMLSerializerConstructor]
window.XMLSerializer.prototype [object XMLSerializer]
window.XMLSerializer.prototype [object XMLSerializerPrototype]
window.XMLSerializer.prototype.serializeToString [function]
window.XPathEvaluator [object XPathEvaluatorConstructor]
window.XPathEvaluator.prototype [object XPathEvaluator]
window.XPathEvaluator.prototype [object XPathEvaluatorPrototype]
window.XPathEvaluator.prototype.createExpression [function]
window.XPathEvaluator.prototype.createNSResolver [function]
window.XPathEvaluator.prototype.evaluate [function]
......@@ -507,7 +507,7 @@ window.XPathResult.ORDERED_NODE_SNAPSHOT_TYPE [number]
window.XPathResult.STRING_TYPE [number]
window.XPathResult.UNORDERED_NODE_ITERATOR_TYPE [number]
window.XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE [number]
window.XPathResult.prototype [object XPathResult]
window.XPathResult.prototype [object XPathResultPrototype]
window.XPathResult.prototype.ANY_TYPE [number]
window.XPathResult.prototype.ANY_UNORDERED_NODE_TYPE [number]
window.XPathResult.prototype.BOOLEAN_TYPE [number]
......@@ -521,7 +521,7 @@ window.XPathResult.prototype.UNORDERED_NODE_SNAPSHOT_TYPE [number]
window.XPathResult.prototype.iterateNext [function]
window.XPathResult.prototype.snapshotItem [function]
window.XSLTProcessor [object Object]
window.XSLTProcessor.prototype [object XSLTProcessor]
window.XSLTProcessor.prototype [object XSLTProcessorPrototype]
window.XSLTProcessor.prototype.clearParameters [function]
window.XSLTProcessor.prototype.getParameter [function]
window.XSLTProcessor.prototype.importStylesheet [function]
......
......@@ -6,68 +6,68 @@ NOTE: This test will start failing if you change the layout of a related prototy
[object Object]
[object DOMNode]
[object DOMNodePrototype]
[object Node]
[object NodePrototype]
[object DOMEventTargetNode]
[object DOMEventTargetNodePrototype]
[object Document]
[object DocumentPrototype]
[object HTMLDocument]
[object DOMHTMLDocumentPrototype]
[object HTMLDocument]
[object HTMLDocumentPrototype]
----- [object HTMLDivElement] (8 prototypes) -----
[object Object]
[object DOMNode]
[object DOMNodePrototype]
[object Node]
[object NodePrototype]
[object DOMEventTargetNode]
[object DOMEventTargetNodePrototype]
[object Element]
[object ElementPrototype]
[object HTMLElement]
[object HTMLElementPrototype]
[object HTMLElement]
[object DOMHTMLElementPrototype]
[object HTMLDivElement]
[object HTMLDivElementPrototype]
----- [object UIEvent] (4 prototypes) -----
[object Object]
[object DOMEvent]
[object DOMEventPrototype]
[object Event]
[object EventPrototype]
[object UIEvent]
[object UIEventPrototype]
----- [object MouseEvent] (5 prototypes) -----
[object Object]
[object DOMEvent]
[object DOMEventPrototype]
[object Event]
[object EventPrototype]
[object UIEvent]
[object UIEventPrototype]
[object MouseEvent]
[object MouseEventPrototype]
----- [object KeyboardEvent] (5 prototypes) -----
[object Object]
[object DOMEvent]
[object DOMEventPrototype]
[object Event]
[object EventPrototype]
[object UIEvent]
[object UIEventPrototype]
[object KeyboardEvent]
[object KeyboardEventPrototype]
......@@ -2,6 +2,6 @@ Test for toString on event.view. This test simulates a click when run via DumpRe
event.view :
document: [object HTMLDocument]
proto: [object DOMWindow]
proto: [object DOMWindowPrototype]
Success getting [object DOMWindow]
......@@ -2,7 +2,7 @@ This page tests whether a click event propogates with the correct target and pos
click inside the red box:
[]
PASS: event target should be [object HTMLElement] and is
PASS: event target should be [object DOMHTMLElement] and is
PASS: event.pageX should be 175 and is
PASS: event.pageY should be 105 and is
PASS: event.clientX should be 175 and is
......
7e57f97082d3ae6aba1a3443a8cca169
\ No newline at end of file
973e3dbf9c605aa15147e53738934408
\ No newline at end of file
......@@ -4,5 +4,5 @@ layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderInline {SPAN} at (0,0) size 0x0
RenderText {#text} at (0,0) size 295x18
text run at (0,0) width 295: "This should be a span: [object HTMLElement]"
RenderText {#text} at (0,0) size 333x18
text run at (0,0) width 333: "This should be a span: [object DOMHTMLElement]"
2007-01-16 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Maciej.
http://bugs.webkit.org/show_bug.cgi?id=12268
Give object prototypes their own names
* bindings/js/kjs_html.cpp: Changed the names of KJS:HTMLElement and KJS::HTMLElement to
not match the names of their WebCore counterparts. The "DOM" prefix I gave them doesn't
seem to carry much sense, but matches some other kjs_html object names.
* bindings/scripts/CodeGeneratorJS.pm: Append "Proto" to interface name for the prototype's ClassInfo.
* bindings/js/JSHTMLInputElementBase.cpp:
(WebCore::JSHTMLInputElementBasePrototypeFunction::callAsFunction):
(WebCore::JSHTMLInputElementBase::JSHTMLInputElementBase):
* bindings/js/JSHTMLInputElementBase.h:
* bindings/js/JSXMLHttpRequest.cpp:
(KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
(KJS::JSXMLHttpRequest::JSXMLHttpRequest):
(KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction):
* bindings/js/JSXMLHttpRequest.h:
* bindings/js/JSXSLTProcessor.cpp:
(KJS::JSXSLTProcessor::JSXSLTProcessor):
(KJS::XSLTProcessorPrototypeFunction::callAsFunction):
(KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
* bindings/js/kjs_css.cpp:
(KJS::DOMCSSStyleDeclaration::DOMCSSStyleDeclaration):
(KJS::DOMCSSStyleDeclarationPrototypeFunction::callAsFunction):
(KJS::DOMMediaList::DOMMediaList):
(KJS::KJS::DOMMediaListPrototypeFunction::callAsFunction):
(KJS::DOMCSSStyleSheet::DOMCSSStyleSheet):
(KJS::DOMCSSStyleSheetPrototypeFunction::callAsFunction):
(KJS::DOMCSSValue::DOMCSSValue):
(KJS::DOMCSSValuePrototypeFunction::callAsFunction):
* bindings/js/kjs_css.h:
* bindings/js/kjs_dom.cpp:
(KJS::DOMNode::DOMNode):
(KJS::DOMNodePrototypeFunction::callAsFunction):
(KJS::DOMEventTargetNode::DOMEventTargetNode):
(KJS::DOMEventTargetNodePrototypeFunction::callAsFunction):
(KJS::DOMNamedNodeMap::DOMNamedNodeMap):
(KJS::DOMNamedNodeMapPrototypeFunction::callAsFunction):
* bindings/js/kjs_dom.h:
* bindings/js/kjs_domnode.h:
* bindings/js/kjs_events.cpp:
(KJS::DOMEvent::DOMEvent):
(KJS::DOMEventPrototypeFunction::callAsFunction):
(KJS::Clipboard::Clipboard):
(KJS::ClipboardPrototypeFunction::callAsFunction):
* bindings/js/kjs_events.h:
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLDocumentPrototypeFunction::callAsFunction):
(KJS::):
(KJS::JSHTMLDocument::JSHTMLDocument):
(KJS::JSHTMLElementPrototypeFunction::callAsFunction):
(KJS::JSHTMLElement::JSHTMLElement):
(KJS::JSHTMLCollection::JSHTMLCollection):
(KJS::JSHTMLCollectionPrototypeFunction::callAsFunction):
* bindings/js/kjs_html.h:
* bindings/js/kjs_navigator.cpp:
* bindings/js/kjs_traversal.cpp:
(KJS::DOMNodeFilter::DOMNodeFilter):
(KJS::DOMNodeFilterPrototypeFunction::callAsFunction):
* bindings/js/kjs_window.cpp:
(KJS::Window::clear):
Changed Proto to Prototype, and ProtoFunc to PrototypeFunction.
2007-01-17 Lars Knoll <lars@trolltech.com>
Reviewed by Zack and Darin
......
......@@ -33,17 +33,17 @@ namespace WebCore {
selectionStart WebCore::JSHTMLInputElementBase::SelectionStart DontDelete
selectionEnd WebCore::JSHTMLInputElementBase::SelectionEnd DontDelete
@end
@begin JSHTMLInputElementBaseProtoTable 0
@begin JSHTMLInputElementBasePrototypeTable 0
@end
@begin JSHTMLInputElementBaseFunctionTable 1
setSelectionRange WebCore::JSHTMLInputElementBase::SetSelectionRange DontDelete|Function 2
@end
*/
KJS_IMPLEMENT_PROTOFUNC(JSHTMLInputElementBaseProtoFunc)
KJS_IMPLEMENT_PROTOTYPE("JSHTMLInputElementBase", JSHTMLInputElementBaseProto, JSHTMLInputElementBaseProtoFunc)
KJS_IMPLEMENT_PROTOTYPE_FUNCTION(JSHTMLInputElementBasePrototypeFunction)
KJS_IMPLEMENT_PROTOTYPE("JSHTMLInputElementBase", JSHTMLInputElementBasePrototype, JSHTMLInputElementBasePrototypeFunction)
JSValue* JSHTMLInputElementBaseProtoFunc::callAsFunction(ExecState*, JSObject*, const List&)
JSValue* JSHTMLInputElementBasePrototypeFunction::callAsFunction(ExecState*, JSObject*, const List&)
{
return 0;
}
......@@ -80,8 +80,8 @@ const ClassInfo JSHTMLInputElementBase::info = { "JSHTMLInputElementBase", &KJS:
JSHTMLInputElementBase::JSHTMLInputElementBase(ExecState* exec, PassRefPtr<HTMLInputElement> e)
: KJS::JSHTMLElement(exec, e.get())
{
// We don't really need a prototype, just use our parent class's proto
setPrototype(KJS::JSHTMLElementProto::self(exec));
// We don't really need a prototype, just use our parent class's prototype
setPrototype(KJS::JSHTMLElementPrototype::self(exec));
}
bool JSHTMLInputElementBase::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
......
......@@ -27,7 +27,7 @@ namespace WebCore {
class HTMLInputElement;
KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE(JSHTMLInputElementBaseProto, KJS::JSHTMLElementProto)
KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE(JSHTMLInputElementBasePrototype, KJS::JSHTMLElementPrototype)
class JSHTMLInputElementBase : public KJS::JSHTMLElement {
public:
......
......@@ -36,8 +36,8 @@ namespace KJS {
////////////////////// JSXMLHttpRequest Object ////////////////////////
/* Source for JSXMLHttpRequestProtoTable.
@begin JSXMLHttpRequestProtoTable 7
/* Source for JSXMLHttpRequestPrototypeTable.
@begin JSXMLHttpRequestPrototypeTable 7
abort JSXMLHttpRequest::Abort DontDelete|Function 0
getAllResponseHeaders JSXMLHttpRequest::GetAllResponseHeaders DontDelete|Function 0
getResponseHeader JSXMLHttpRequest::GetResponseHeader DontDelete|Function 1
......@@ -52,15 +52,15 @@ namespace KJS {
dispatchEvent JSXMLHttpRequest::DispatchEvent DontDelete|Function 1
@end
*/
KJS_DEFINE_PROTOTYPE(JSXMLHttpRequestProto)
KJS_IMPLEMENT_PROTOFUNC(JSXMLHttpRequestProtoFunc)
KJS_IMPLEMENT_PROTOTYPE("JSXMLHttpRequest", JSXMLHttpRequestProto, JSXMLHttpRequestProtoFunc)
KJS_DEFINE_PROTOTYPE(JSXMLHttpRequestPrototype)
KJS_IMPLEMENT_PROTOTYPE_FUNCTION(JSXMLHttpRequestPrototypeFunction)
KJS_IMPLEMENT_PROTOTYPE("JSXMLHttpRequest", JSXMLHttpRequestPrototype, JSXMLHttpRequestPrototypeFunction)
JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp(ExecState* exec, Document* d)
: doc(d)
{
setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
putDirect(prototypePropertyName, JSXMLHttpRequestProto::self(exec), None);
putDirect(prototypePropertyName, JSXMLHttpRequestPrototype::self(exec), None);
}
bool JSXMLHttpRequestConstructorImp::implementsConstruct() const
......@@ -175,7 +175,7 @@ void JSXMLHttpRequest::mark()
JSXMLHttpRequest::JSXMLHttpRequest(ExecState* exec, Document* d)
: m_impl(new XMLHttpRequest(d))
{
setPrototype(JSXMLHttpRequestProto::self(exec));
setPrototype(JSXMLHttpRequestPrototype::self(exec));
ScriptInterpreter::putDOMObject(m_impl.get(), this);
}
......@@ -187,7 +187,7 @@ JSXMLHttpRequest::~JSXMLHttpRequest()
ScriptInterpreter::forgetDOMObject(m_impl.get());
}
JSValue* JSXMLHttpRequestProtoFunc::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
JSValue* JSXMLHttpRequestPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
if (!thisObj->inherits(&JSXMLHttpRequest::info))
return throwError(exec, TypeError);
......
......@@ -60,7 +60,7 @@ public:
virtual void mark();
private:
friend class JSXMLHttpRequestProtoFunc;
friend class JSXMLHttpRequestPrototypeFunction;
RefPtr<WebCore::XMLHttpRequest> m_impl;
};
......
......@@ -43,7 +43,7 @@ namespace KJS {
const ClassInfo JSXSLTProcessor::info = { "XSLTProcessor", 0, 0, 0 };
/*
@begin XSLTProcessorProtoTable 7
@begin XSLTProcessorPrototypeTable 7
importStylesheet JSXSLTProcessor::ImportStylesheet DontDelete|Function 1
transformToFragment JSXSLTProcessor::TransformToFragment DontDelete|Function 2
transformToDocument JSXSLTProcessor::TransformToDocument DontDelete|Function 2
......@@ -55,13 +55,13 @@ const ClassInfo JSXSLTProcessor::info = { "XSLTProcessor", 0, 0, 0 };
@end
*/
KJS_DEFINE_PROTOTYPE(XSLTProcessorProto)
KJS_IMPLEMENT_PROTOFUNC(XSLTProcessorProtoFunc)
KJS_IMPLEMENT_PROTOTYPE("XSLTProcessor", XSLTProcessorProto, XSLTProcessorProtoFunc)
KJS_DEFINE_PROTOTYPE(XSLTProcessorPrototype)
KJS_IMPLEMENT_PROTOTYPE_FUNCTION(XSLTProcessorPrototypeFunction)
KJS_IMPLEMENT_PROTOTYPE("XSLTProcessor", XSLTProcessorPrototype, XSLTProcessorPrototypeFunction)
JSXSLTProcessor::JSXSLTProcessor(ExecState *exec) : m_impl(new XSLTProcessor())
{
setPrototype(XSLTProcessorProto::self(exec));
setPrototype(XSLTProcessorPrototype::self(exec));
}
JSXSLTProcessor::~JSXSLTProcessor()
......@@ -69,7 +69,7 @@ JSXSLTProcessor::~JSXSLTProcessor()
ScriptInterpreter::forgetDOMObject(m_impl.get());
}
JSValue *XSLTProcessorProtoFunc::callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)
JSValue *XSLTProcessorPrototypeFunction::callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)
{
if (!thisObj->inherits(&KJS::JSXSLTProcessor::info))
return throwError(exec, TypeError);
......@@ -154,7 +154,7 @@ JSValue *XSLTProcessorProtoFunc::callAsFunction(ExecState *exec, JSObject *thisO
XSLTProcessorConstructorImp::XSLTProcessorConstructorImp(ExecState *exec)
{
setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
putDirect(prototypePropertyName, XSLTProcessorProto::self(exec), None);
putDirect(prototypePropertyName, XSLTProcessorPrototype::self(exec), None);
}
}
......
......@@ -101,7 +101,7 @@ static bool isCSSPropertyName(const Identifier &JSPropertyName)
}
/*
@begin DOMCSSStyleDeclarationProtoTable 7
@begin DOMCSSStyleDeclarationPrototypeTable 7
getPropertyValue DOMCSSStyleDeclaration::GetPropertyValue DontDelete|Function 1
getPropertyCSSValue DOMCSSStyleDeclaration::GetPropertyCSSValue DontDelete|Function 1
removeProperty DOMCSSStyleDeclaration::RemoveProperty DontDelete|Function 1
......@@ -117,15 +117,15 @@ static bool isCSSPropertyName(const Identifier &JSPropertyName)
parentRule DOMCSSStyleDeclaration::ParentRule DontDelete|ReadOnly
@end
*/
KJS_IMPLEMENT_PROTOFUNC(DOMCSSStyleDeclarationProtoFunc)
KJS_IMPLEMENT_PROTOTYPE("DOMCSSStyleDeclaration", DOMCSSStyleDeclarationProto, DOMCSSStyleDeclarationProtoFunc)
KJS_IMPLEMENT_PROTOTYPE_FUNCTION(DOMCSSStyleDeclarationPrototypeFunction)
KJS_IMPLEMENT_PROTOTYPE("DOMCSSStyleDeclaration", DOMCSSStyleDeclarationPrototype, DOMCSSStyleDeclarationPrototypeFunction)
const ClassInfo DOMCSSStyleDeclaration::info = { "CSSStyleDeclaration", 0, &DOMCSSStyleDeclarationTable, 0 };
DOMCSSStyleDeclaration::DOMCSSStyleDeclaration(ExecState* exec, CSSStyleDeclaration *s)
: m_impl(s)
{
setPrototype(DOMCSSStyleDeclarationProto::self(exec));
setPrototype(DOMCSSStyleDeclarationProto