Changeset 30763 in webkit
- Timestamp:
- Mar 4, 2008 2:05:52 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r30762 r30763 1 2008-03-04 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Update results for fixed class names. 6 7 * fast/dom/Window/window-properties-expected.txt: 8 * fast/dom/xmlhttprequest-get-expected.txt: 9 * http/tests/xmlhttprequest/event-target-expected.txt: 10 1 11 2008-03-04 Dan Bernstein <mitz@apple.com> 2 12 -
trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt
r30735 r30763 33 33 window.Attr.prototype.removeEventListener [function] 34 34 window.Attr.prototype.replaceChild [function] 35 window.Audio [object Object]35 window.Audio [object AudioConstructor] 36 36 window.CDATASection [object CDATASectionConstructor] 37 37 window.CDATASection.prototype [object CDATASectionPrototype] … … 737 737 window.HTMLVideoElement [object HTMLVideoElementConstructor] 738 738 window.HTMLVideoElement.prototype [printed above as window.Element.prototype] 739 window.Image [object Object]739 window.Image [object ImageConstructor] 740 740 window.KeyboardEvent [object KeyboardEventConstructor] 741 741 window.KeyboardEvent.prototype [printed above as window.Event.prototype] … … 851 851 window.Notation [object NotationConstructor] 852 852 window.Notation.prototype [printed above as window.Node.prototype] 853 window.Option [object O bject]853 window.Option [object OptionConstructor] 854 854 window.OverflowEvent [object OverflowEventConstructor] 855 855 window.OverflowEvent.BOTH [number] … … 1137 1137 window.WheelEvent.prototype [printed above as window.Event.prototype] 1138 1138 window.XMLDocument [printed above as window.Document] 1139 window.XMLHttpRequest [object Object]1140 window.XMLHttpRequest.prototype [object JSXMLHttpRequestPrototype]1139 window.XMLHttpRequest [object XMLHttpRequestConstructor] 1140 window.XMLHttpRequest.prototype [object XMLHttpRequestPrototype] 1141 1141 window.XMLHttpRequest.prototype.abort [function] 1142 1142 window.XMLHttpRequest.prototype.addEventListener [function] … … 1191 1191 window.XPathResult.prototype.iterateNext [function] 1192 1192 window.XPathResult.prototype.snapshotItem [function] 1193 window.XSLTProcessor [object Object]1193 window.XSLTProcessor [object XSLTProcessorConsructor] 1194 1194 window.XSLTProcessor.prototype [object XSLTProcessorPrototype] 1195 1195 window.XSLTProcessor.prototype.clearParameters [function] -
trunk/LayoutTests/fast/dom/xmlhttprequest-get-expected.txt
r29819 r30763 47 47 cancelable : 'false' 48 48 clipboardData : 'undefined' 49 currentTarget : '[object JSXMLHttpRequest]'49 currentTarget : '[object XMLHttpRequest]' 50 50 eventPhase : '0' 51 51 initEvent : 'function initEvent() { … … 56 56 }' 57 57 returnValue : 'true' 58 srcElement : '[object JSXMLHttpRequest]'58 srcElement : '[object XMLHttpRequest]' 59 59 stopPropagation : 'function stopPropagation() { 60 60 [native code] 61 61 }' 62 target : '[object JSXMLHttpRequest]'62 target : '[object XMLHttpRequest]' 63 63 type : 'load' 64 64 -
trunk/LayoutTests/http/tests/xmlhttprequest/event-target-expected.txt
r21687 r30763 1 1 Tests for bug 11053 - XMLHttpRequest should be an EventTarget. 2 2 3 fooListener: this = [object JSXMLHttpRequest]4 onload: this = [object JSXMLHttpRequest]5 eventListener: this = [object JSXMLHttpRequest]6 eventListener2: this = [object JSXMLHttpRequest]7 eventListener3: this = [object JSXMLHttpRequest]8 onload: this = [object JSXMLHttpRequest]9 eventListener: this = [object JSXMLHttpRequest]10 eventListener2: this = [object JSXMLHttpRequest]3 fooListener: this = [object XMLHttpRequest] 4 onload: this = [object XMLHttpRequest] 5 eventListener: this = [object XMLHttpRequest] 6 eventListener2: this = [object XMLHttpRequest] 7 eventListener3: this = [object XMLHttpRequest] 8 onload: this = [object XMLHttpRequest] 9 eventListener: this = [object XMLHttpRequest] 10 eventListener2: this = [object XMLHttpRequest] -
trunk/WebCore/ChangeLog
r30762 r30763 1 2008-03-04 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Add ClassInfo to custom constructors so that they toString properly 6 7 - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp, 8 and XSLTProcessorConstructorImp and prefix all the classes with JS. 9 10 * bindings/js/JSAudioConstructor.cpp: 11 (WebCore::): Added ClassInfo definition. 12 (WebCore::JSAudioConstructor::JSAudioConstructor): 13 (WebCore::JSAudioConstructor::construct): Cleanup. 14 * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document. 15 (WebCore::JSAudioConstructor::classInfo): Added. 16 17 * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype 18 to JSHTMLInputElementBasePrototype as seen if toString'ed. 19 (WebCore::): 20 21 * bindings/js/JSHTMLOptionElementConstructor.cpp: 22 (WebCore::): Added ClassInfo definition. 23 * bindings/js/JSHTMLOptionElementConstructor.h: 24 (WebCore::JSHTMLOptionElementConstructor::classInfo): Added. 25 26 * bindings/js/JSImageConstructor.cpp: 27 (WebCore::): Added ClassInfo definition. 28 (WebCore::JSImageConstructor::implementsConstruct): Moved here from header. 29 * bindings/js/JSImageConstructor.h: 30 (WebCore::JSImageConstructor::classInfo): Added. 31 32 * bindings/js/JSXMLHttpRequest.cpp: 33 (WebCore::): Rename XMLHttpRequestPrototype to JSXMLHttpRequestPrototype 34 as seen if toString'ed. 35 (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor): 36 (WebCore::JSXMLHttpRequestConstructor::implementsConstruct): 37 (WebCore::JSXMLHttpRequestConstructor::construct): 38 * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to 39 JSXMLHttpRequestConstructor and doc to m_document and 40 (WebCore::JSXMLHttpRequestConstructor::classInfo): Added. 41 42 * bindings/js/JSXSLTProcessor.cpp: 43 (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and 44 XSLTProcessorConstructorImp to JSXSLTProcessorConstructor. 45 (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor): 46 (WebCore::JSXSLTProcessorConstructor::implementsConstruct): 47 (WebCore::JSXSLTProcessorConstructor::construct): 48 * bindings/js/JSXSLTProcessor.h: 49 (WebCore::JSXSLTProcessorConstructor::classInfo): Added. 50 51 * bindings/js/kjs_window.cpp: 52 (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names. 53 1 54 2008-03-04 Dan Bernstein <mitz@apple.com> 2 55 -
trunk/WebCore/bindings/js/JSAudioConstructor.cpp
r30040 r30763 1 1 /* 2 * Copyright (C) 2007 Apple Inc. All rights reserved.2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 38 38 namespace WebCore { 39 39 40 JSAudioConstructor::JSAudioConstructor(ExecState* exec, Document* d) 40 const ClassInfo JSAudioConstructor::info = { "AudioConstructor", 0, 0 }; 41 42 JSAudioConstructor::JSAudioConstructor(ExecState* exec, Document* document) 41 43 : DOMObject(exec->lexicalGlobalObject()->objectPrototype()) 42 , m_doc (d)44 , m_document(document) 43 45 { 44 46 putDirect(exec->propertyNames().length, jsNumber(1), ReadOnly|DontDelete|DontEnum); … … 52 54 JSObject* JSAudioConstructor::construct(ExecState* exec, const List& args) 53 55 { 54 intexception = 0;55 RefPtr<Element> el (m_doc->createElement("audio", exception));56 ExceptionCode exception = 0; 57 RefPtr<Element> element = m_document->createElement("audio", exception); 56 58 HTMLAudioElement* audio = 0; 57 if (el && !exception) { 58 audio = static_cast<HTMLAudioElement*>(el.get()); 59 int sz = args.size(); 60 if (sz > 0) { 59 if (element && !exception) { 60 audio = static_cast<HTMLAudioElement*>(element.get()); 61 if (args.size() > 0) { 61 62 audio->setSrc(args[0]->toString(exec)); 62 63 audio->scheduleLoad(); … … 68 69 } 69 70 70 } 71 #endif 71 } // namespace WebCore 72 73 #endif // ENABLE(VIDEO) -
trunk/WebCore/bindings/js/JSAudioConstructor.h
r30243 r30763 37 37 public: 38 38 JSAudioConstructor(KJS::ExecState*, Document*); 39 39 40 virtual bool implementsConstruct() const; 40 virtual KJS::JSObject *construct(KJS::ExecState*, const KJS::List& args); 41 virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List&); 42 43 virtual const KJS::ClassInfo* classInfo() const { return &info; } 44 static const KJS::ClassInfo info; 45 41 46 private: 42 RefPtr<Document> m_doc ;47 RefPtr<Document> m_document; 43 48 }; 44 49 45 } 50 } // namespace WebCore 46 51 47 #endif 48 #endif 52 #endif // ENABLE(VIDEO) 53 #endif // JSAudioConstructor_h -
trunk/WebCore/bindings/js/JSHTMLInputElementBase.cpp
r30534 r30763 41 41 */ 42 42 43 KJS_IMPLEMENT_PROTOTYPE(" JSHTMLInputElementBase", JSHTMLInputElementBasePrototype)43 KJS_IMPLEMENT_PROTOTYPE("HTMLInputElementBase", JSHTMLInputElementBasePrototype) 44 44 45 45 JSValue* jsHTMLInputElementBaseFunctionSetSelectionRange(ExecState* exec, JSObject* thisObj, const List& args) … … 50 50 } 51 51 52 const ClassInfo JSHTMLInputElementBase::info = { " JSHTMLInputElementBase", &JSHTMLElement::info, &JSHTMLInputElementBaseTable };52 const ClassInfo JSHTMLInputElementBase::info = { "HTMLInputElementBase", &JSHTMLElement::info, &JSHTMLInputElementBaseTable }; 53 53 54 54 JSHTMLInputElementBase::JSHTMLInputElementBase(KJS::JSObject* prototype, PassRefPtr<HTMLInputElement> e) -
trunk/WebCore/bindings/js/JSHTMLOptionElementConstructor.cpp
r30243 r30763 29 29 30 30 namespace WebCore { 31 32 const ClassInfo JSHTMLOptionElementConstructor::info = { "OptionConstructor", 0, 0 }; 31 33 32 34 JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor(ExecState* exec, Document* document) -
trunk/WebCore/bindings/js/JSHTMLOptionElementConstructor.h
r30243 r30763 29 29 public: 30 30 JSHTMLOptionElementConstructor(KJS::ExecState*, Document*); 31 31 32 virtual bool implementsConstruct() const; 32 virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List& args); 33 virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List&); 34 35 virtual const KJS::ClassInfo* classInfo() const { return &info; } 36 static const KJS::ClassInfo info; 37 33 38 private: 34 39 RefPtr<Document> m_document; 35 40 }; 36 41 37 } 42 } // namespace WebCore 38 43 39 #endif 44 #endif // JSHTMLOptionElementConstructor_h -
trunk/WebCore/bindings/js/JSImageConstructor.cpp
r30756 r30763 29 29 namespace WebCore { 30 30 31 const ClassInfo JSImageConstructor::info = { "ImageConstructor", 0, 0 }; 32 31 33 JSImageConstructor::JSImageConstructor(ExecState* exec, Document* document) 32 34 : DOMObject(exec->lexicalGlobalObject()->objectPrototype()) 33 35 , m_document(document) 34 36 { 37 } 38 39 bool JSImageConstructor::implementsConstruct() const 40 { 41 return true; 35 42 } 36 43 -
trunk/WebCore/bindings/js/JSImageConstructor.h
r30756 r30763 31 31 JSImageConstructor(KJS::ExecState*, Document*); 32 32 33 virtual bool implementsConstruct() const { return true; }33 virtual bool implementsConstruct() const; 34 34 virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List&); 35 36 virtual const KJS::ClassInfo* classInfo() const { return &info; } 37 static const KJS::ClassInfo info; 35 38 36 39 private: -
trunk/WebCore/bindings/js/JSXMLHttpRequest.cpp
r30731 r30763 1 1 /* 2 * Copyright (C) 2004, 2007 Apple Inc. All rights reserved.2 * Copyright (C) 2004, 2007, 2008 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@nypop.com> 4 4 * … … 57 57 */ 58 58 KJS_DEFINE_PROTOTYPE(JSXMLHttpRequestPrototype) 59 KJS_IMPLEMENT_PROTOTYPE("JSXMLHttpRequest", JSXMLHttpRequestPrototype) 60 61 JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp(ExecState* exec, Document* d) 59 KJS_IMPLEMENT_PROTOTYPE("XMLHttpRequest", JSXMLHttpRequestPrototype) 60 61 const ClassInfo JSXMLHttpRequestConstructor::info = { "XMLHttpRequestConstructor", 0, 0 }; 62 63 JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor(ExecState* exec, Document* document) 62 64 : DOMObject(exec->lexicalGlobalObject()->objectPrototype()) 63 , doc(d)65 , m_document(document) 64 66 { 65 67 putDirect(exec->propertyNames().prototype, JSXMLHttpRequestPrototype::self(exec), None); 66 68 } 67 69 68 bool JSXMLHttpRequestConstructor Imp::implementsConstruct() const70 bool JSXMLHttpRequestConstructor::implementsConstruct() const 69 71 { 70 72 return true; 71 73 } 72 74 73 JSObject* JSXMLHttpRequestConstructor Imp::construct(ExecState* exec, const List&)74 { 75 return new JSXMLHttpRequest(JSXMLHttpRequestPrototype::self(exec), doc.get());76 } 77 78 const ClassInfo JSXMLHttpRequest::info = { " JSXMLHttpRequest", 0, &JSXMLHttpRequestTable };75 JSObject* JSXMLHttpRequestConstructor::construct(ExecState* exec, const List&) 76 { 77 return new JSXMLHttpRequest(JSXMLHttpRequestPrototype::self(exec), m_document.get()); 78 } 79 80 const ClassInfo JSXMLHttpRequest::info = { "XMLHttpRequest", 0, &JSXMLHttpRequestTable }; 79 81 80 82 /* Source for JSXMLHttpRequestTable. -
trunk/WebCore/bindings/js/JSXMLHttpRequest.h
r30534 r30763 28 28 class Document; 29 29 30 class JSXMLHttpRequestConstructor Imp: public DOMObject {30 class JSXMLHttpRequestConstructor : public DOMObject { 31 31 public: 32 JSXMLHttpRequestConstructor Imp(KJS::ExecState*, Document*);32 JSXMLHttpRequestConstructor(KJS::ExecState*, Document*); 33 33 34 34 virtual bool implementsConstruct() const; 35 35 virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List&); 36 36 37 virtual const KJS::ClassInfo* classInfo() const { return &info; } 38 static const KJS::ClassInfo info; 39 37 40 private: 38 RefPtr<Document> doc;41 RefPtr<Document> m_document; 39 42 }; 40 43 -
trunk/WebCore/bindings/js/JSXSLTProcessor.cpp
r30753 r30763 45 45 46 46 /* 47 @begin XSLTProcessorPrototypeTable 747 @begin JSXSLTProcessorPrototypeTable 7 48 48 importStylesheet jsXSLTProcessorPrototypeFunctionImportStylesheet DontDelete|Function 1 49 49 transformToFragment jsXSLTProcessorPrototypeFunctionTransformToFragment DontDelete|Function 2 … … 57 57 */ 58 58 59 KJS_DEFINE_PROTOTYPE( XSLTProcessorPrototype)60 KJS_IMPLEMENT_PROTOTYPE("XSLTProcessor", XSLTProcessorPrototype)59 KJS_DEFINE_PROTOTYPE(JSXSLTProcessorPrototype) 60 KJS_IMPLEMENT_PROTOTYPE("XSLTProcessor", JSXSLTProcessorPrototype) 61 61 62 62 JSXSLTProcessor::JSXSLTProcessor(JSObject* prototype) … … 187 187 } 188 188 189 XSLTProcessorConstructorImp::XSLTProcessorConstructorImp(ExecState* exec) 189 const ClassInfo JSXSLTProcessorConstructor::info = { "XSLTProcessorConsructor", 0, 0 }; 190 191 JSXSLTProcessorConstructor::JSXSLTProcessorConstructor(ExecState* exec) 190 192 : DOMObject(exec->lexicalGlobalObject()->objectPrototype()) 191 193 { 192 putDirect(exec->propertyNames().prototype, XSLTProcessorPrototype::self(exec), None);193 } 194 195 bool XSLTProcessorConstructorImp::implementsConstruct() const194 putDirect(exec->propertyNames().prototype, JSXSLTProcessorPrototype::self(exec), None); 195 } 196 197 bool JSXSLTProcessorConstructor::implementsConstruct() const 196 198 { 197 199 return true; 198 200 } 199 201 200 JSObject* XSLTProcessorConstructorImp::construct(ExecState* exec, const List& args)201 { 202 return new JSXSLTProcessor( XSLTProcessorPrototype::self(exec));203 } 204 205 } // namespace KJS202 JSObject* JSXSLTProcessorConstructor::construct(ExecState* exec, const List& args) 203 { 204 return new JSXSLTProcessor(JSXSLTProcessorPrototype::self(exec)); 205 } 206 207 } // namespace WebCore 206 208 207 209 #endif // ENABLE(XSLT) -
trunk/WebCore/bindings/js/JSXSLTProcessor.h
r30243 r30763 53 53 }; 54 54 55 class XSLTProcessorConstructorImp: public DOMObject {55 class JSXSLTProcessorConstructor : public DOMObject { 56 56 public: 57 XSLTProcessorConstructorImp(KJS::ExecState*);57 JSXSLTProcessorConstructor(KJS::ExecState*); 58 58 59 59 virtual bool implementsConstruct() const; 60 60 virtual KJS::JSObject* construct(KJS::ExecState*, const KJS::List&); 61 62 virtual const KJS::ClassInfo* classInfo() const { return &info; } 63 static const KJS::ClassInfo info; 61 64 }; 62 65 -
trunk/WebCore/bindings/js/kjs_window.cpp
r30756 r30763 480 480 if (!allowsAccessFrom(exec)) 481 481 return jsUndefined(); 482 return new JSXMLHttpRequestConstructor Imp(exec, impl()->frame()->document());482 return new JSXMLHttpRequestConstructor(exec, impl()->frame()->document()); 483 483 case Audio: 484 484 #if ENABLE(VIDEO) … … 491 491 return jsUndefined(); 492 492 #endif 493 case XSLTProcessor_: 493 494 #if ENABLE(XSLT) 494 case XSLTProcessor_:495 495 if (!allowsAccessFrom(exec)) 496 496 return jsUndefined(); 497 return new XSLTProcessorConstructorImp(exec);497 return new JSXSLTProcessorConstructor(exec); 498 498 #else 499 case XSLTProcessor_:500 499 return jsUndefined(); 501 500 #endif -
trunk/WebKitTools/ChangeLog
r30707 r30763 1 2008-03-04 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 * Scripts/do-webcore-rename: Update renaming plan. 6 1 7 2008-03-02 Brent Fulgham <bfulgham@gmail.com> 2 8 -
trunk/WebKitTools/Scripts/do-webcore-rename
r30562 r30763 159 159 "ImageTokenizer" => "ImageDocumentBuilder", 160 160 "InternalFunctionImp" => "InternalFunction", 161 "JS XMLHttpRequestConstructorImp" => "JSXMLHttpRequestConstructor",161 "JSHTMLOptionElementConstructor" => "JSOptionConstructor", 162 162 "KURL" => "URL", 163 163 "KURLCFNet" => "URLCF", … … 244 244 "Tokenizer_h" => "DocumentBuilder_h", 245 245 "XMLTokenizer" => "XMLDocumentBuilder", 246 "XSLTProcessorConstructorImp" => "JSXSLTProcessorConstructor",247 "XSLTProcessorPrototype" => "JSXSLTProcessorPrototype",248 246 "animationController" => "animation", 249 247 "branchfirstbyte" => "branchFirstByte",
Note: See TracChangeset
for help on using the changeset viewer.