Changeset 50087 in webkit
- Timestamp:
- Oct 26, 2009 1:04:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r50083 r50087 1 2009-10-26 Sam Weinig <sam@webkit.org> 2 3 Rubber-stamped by Darin Adler. 4 5 Rollout r50041-50043. The HTML5 spec changed to make HTMLOptionsCollection 6 inherit from HTMLCollection. 7 8 * fast/dom/wrapper-classes-expected.txt: 9 1 10 2009-10-26 Rahul Kuchhal <kuchhal@chromium.org> 2 11 -
trunk/LayoutTests/fast/dom/wrapper-classes-expected.txt
r50041 r50087 142 142 PASS jsWrapperClass(document.constructor) is 'HTMLDocumentConstructor' 143 143 PASS jsWrapperClass(document.createElement('select').options) is 'HTMLOptionsCollection' 144 PASS jsWrapperClass(document.createElement('select').options.__proto__) is 'HTMLOptionsCollectionPrototype' 145 PASS jsWrapperClass(document.createElement('select').options.constructor) is 'HTMLOptionsCollectionConstructor' 144 FAIL jsWrapperClass(document.createElement('select').options.__proto__) should be HTMLOptionsCollectionPrototype. Was HTMLCollectionPrototype. 145 FAIL jsWrapperClass(document.createElement('select').options.constructor) should be HTMLOptionsCollectionConstructor. Was Function. 146 146 147 147 HTML Elements -
trunk/WebCore/ChangeLog
r50085 r50087 1 2009-10-26 Sam Weinig <sam@webkit.org> 2 3 Rubber-stamped by Darin Adler. 4 5 Rollout r50041-50043. The HTML5 spec changed to make HTMLOptionsCollection 6 inherit from HTMLCollection. 7 8 * GNUmakefile.am: 9 * WebCore.gypi: 10 * WebCore.pro: 11 * WebCore.vcproj/WebCore.vcproj: 12 * WebCore.xcodeproj/project.pbxproj: 13 * bindings/js/JSHTMLAllCollectionCustom.cpp: 14 (WebCore::getNamedItems): 15 (WebCore::callHTMLAllCollection): 16 (WebCore::JSHTMLAllCollection::nameGetter): 17 (WebCore::JSHTMLAllCollection::item): 18 (WebCore::JSHTMLAllCollection::namedItem): 19 * bindings/js/JSHTMLCollectionCustom.cpp: 20 (WebCore::getNamedItems): 21 (WebCore::callHTMLCollection): 22 (WebCore::JSHTMLCollection::nameGetter): 23 (WebCore::JSHTMLCollection::item): 24 (WebCore::JSHTMLCollection::namedItem): 25 (WebCore::toJS): 26 * bindings/js/JSHTMLCollectionFunctions.h: Removed. 27 * bindings/js/JSHTMLDocumentCustom.cpp: 28 * bindings/js/JSHTMLOptionsCollectionCustom.cpp: 29 (WebCore::JSHTMLOptionsCollection::length): 30 (WebCore::JSHTMLOptionsCollection::indexSetter): 31 * bindings/objc/DOMHTML.mm: 32 (kitClass): 33 * bindings/objc/DOMUtility.mm: 34 (JSC::createDOMWrapper): 35 * bindings/scripts/CodeGeneratorJS.pm: 36 * html/HTMLCollection.idl: 37 * html/HTMLOptionsCollection.idl: 38 1 39 2009-10-26 Brent Fulgham <bfulgham@webkit.org> 2 40 -
trunk/WebCore/GNUmakefile.am
r50075 r50087 377 377 WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp \ 378 378 WebCore/bindings/js/JSHTMLCollectionCustom.cpp \ 379 WebCore/bindings/js/JSHTMLCollectionFunctions.h \380 379 WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp \ 381 380 WebCore/bindings/js/JSHTMLDocumentCustom.cpp \ -
trunk/WebCore/WebCore.gypi
r50082 r50087 499 499 'bindings/js/JSHTMLCanvasElementCustom.cpp', 500 500 'bindings/js/JSHTMLCollectionCustom.cpp', 501 'bindings/js/JSHTMLCollectionFunctions.h',502 501 'bindings/js/JSHTMLDataGridElementCustom.cpp', 503 502 'bindings/js/JSHTMLDocumentCustom.cpp', -
trunk/WebCore/WebCore.pro
r50041 r50087 710 710 bindings/js/JSHTMLAllCollectionCustom.cpp \ 711 711 bindings/js/JSHTMLCollectionCustom.cpp \ 712 bindings/js/JSHTMLCollectionFunctions.h \713 712 bindings/js/JSHTMLDataGridElementCustom.cpp \ 714 713 bindings/js/JSHTMLDocumentCustom.cpp \ -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r50085 r50087 34015 34015 </File> 34016 34016 <File 34017 RelativePath="..\bindings\js\JSHTMLCollectionFunctions.h"34018 >34019 </File>34020 <File34021 34017 RelativePath="..\bindings\js\JSHTMLDataGridElementCustom.cpp" 34022 34018 > -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r50041 r50087 4329 4329 BC97E413109154FA0010D361 /* JSHTMLAllCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = BC97E411109154FA0010D361 /* JSHTMLAllCollection.h */; }; 4330 4330 BC97E42C10915B060010D361 /* JSHTMLAllCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */; }; 4331 BC97E53F10926C870010D361 /* JSHTMLCollectionFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = BC97E53E10926C870010D361 /* JSHTMLCollectionFunctions.h */; };4332 4331 BC98543D0CD3D98B00069BC1 /* JSConsole.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC98543B0CD3D98B00069BC1 /* JSConsole.cpp */; }; 4333 4332 BC98543E0CD3D98C00069BC1 /* JSConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = BC98543C0CD3D98B00069BC1 /* JSConsole.h */; }; … … 9463 9462 BC97E411109154FA0010D361 /* JSHTMLAllCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLAllCollection.h; sourceTree = "<group>"; }; 9464 9463 BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAllCollectionCustom.cpp; sourceTree = "<group>"; }; 9465 BC97E53E10926C870010D361 /* JSHTMLCollectionFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLCollectionFunctions.h; sourceTree = "<group>"; };9466 9464 BC98543B0CD3D98B00069BC1 /* JSConsole.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSConsole.cpp; sourceTree = "<group>"; }; 9467 9465 BC98543C0CD3D98B00069BC1 /* JSConsole.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSConsole.h; sourceTree = "<group>"; }; … … 14273 14271 3314ACE910892086000F0E56 /* JSExceptionBase.cpp */, 14274 14272 3314ACEA10892086000F0E56 /* JSExceptionBase.h */, 14275 BC97E53E10926C870010D361 /* JSHTMLCollectionFunctions.h */,14276 14273 C09158840DB4209200E55AF4 /* JSInspectedObjectWrapper.cpp */, 14277 14274 C09158850DB4209200E55AF4 /* JSInspectedObjectWrapper.h */, … … 18072 18069 BC97E23A109144950010D361 /* HTMLAllCollection.h in Headers */, 18073 18070 BC97E413109154FA0010D361 /* JSHTMLAllCollection.h in Headers */, 18074 BC97E53F10926C870010D361 /* JSHTMLCollectionFunctions.h in Headers */,18075 18071 ); 18076 18072 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp
r50041 r50087 31 31 #include "JSDOMBinding.h" 32 32 #include "JSHTMLAllCollection.h" 33 #include "JSHTMLCollectionFunctions.h"34 33 #include "JSNode.h" 35 34 #include "JSNodeList.h" 36 35 #include "Node.h" 36 #include "StaticNodeList.h" 37 #include <wtf/Vector.h> 37 38 38 39 using namespace JSC; … … 40 41 namespace WebCore { 41 42 43 static JSValue getNamedItems(ExecState* exec, JSHTMLAllCollection* collection, const Identifier& propertyName) 44 { 45 Vector<RefPtr<Node> > namedItems; 46 collection->impl()->namedItems(propertyName, namedItems); 47 48 if (namedItems.isEmpty()) 49 return jsUndefined(); 50 if (namedItems.size() == 1) 51 return toJS(exec, collection->globalObject(), namedItems[0].get()); 52 53 // FIXME: HTML5 specifies that this should be a DynamicNodeList. 54 // FIXME: HTML5 specifies that non-HTMLOptionsCollection collections should return 55 // the first matching item instead of a NodeList. 56 return toJS(exec, collection->globalObject(), StaticNodeList::adopt(namedItems).get()); 57 } 58 59 // HTMLCollections are strange objects, they support both get and call, 60 // so that document.forms.item(0) and document.forms(0) both work. 42 61 static JSValue JSC_HOST_CALL callHTMLAllCollection(ExecState* exec, JSObject* function, JSValue, const ArgList& args) 43 62 { 44 return callHTMLCollectionGeneric<HTMLAllCollection, JSHTMLAllCollection>(exec, function, args); 63 if (args.size() < 1) 64 return jsUndefined(); 65 66 // Do not use thisObj here. It can be the JSHTMLDocument, in the document.forms(i) case. 67 JSHTMLAllCollection* jsCollection = static_cast<JSHTMLAllCollection*>(function); 68 HTMLAllCollection* collection = static_cast<HTMLAllCollection*>(jsCollection->impl()); 69 70 // Also, do we need the TypeError test here ? 71 72 if (args.size() == 1) { 73 // Support for document.all(<index>) etc. 74 bool ok; 75 UString string = args.at(0).toString(exec); 76 unsigned index = string.toUInt32(&ok, false); 77 if (ok) 78 return toJS(exec, jsCollection->globalObject(), collection->item(index)); 79 80 // Support for document.images('<name>') etc. 81 return getNamedItems(exec, jsCollection, Identifier(exec, string)); 82 } 83 84 // The second arg, if set, is the index of the item we want 85 bool ok; 86 UString string = args.at(0).toString(exec); 87 unsigned index = args.at(1).toString(exec).toUInt32(&ok, false); 88 if (ok) { 89 String pstr = string; 90 Node* node = collection->namedItem(pstr); 91 while (node) { 92 if (!index) 93 return toJS(exec, jsCollection->globalObject(), node); 94 node = collection->nextNamedItem(pstr); 95 --index; 96 } 97 } 98 99 return jsUndefined(); 45 100 } 46 101 … … 61 116 { 62 117 JSHTMLAllCollection* thisObj = static_cast<JSHTMLAllCollection*>(asObject(slot.slotBase())); 63 return get CollectionNamedItems<JSHTMLAllCollection>(exec, thisObj, propertyName);118 return getNamedItems(exec, thisObj, propertyName); 64 119 } 65 120 66 121 JSValue JSHTMLAllCollection::item(ExecState* exec, const ArgList& args) 67 122 { 68 return getCollectionItems<JSHTMLAllCollection>(exec, this, args.at(0)); 123 bool ok; 124 uint32_t index = args.at(0).toString(exec).toUInt32(&ok, false); 125 if (ok) 126 return toJS(exec, globalObject(), impl()->item(index)); 127 return getNamedItems(exec, this, Identifier(exec, args.at(0).toString(exec))); 69 128 } 70 129 71 130 JSValue JSHTMLAllCollection::namedItem(ExecState* exec, const ArgList& args) 72 131 { 73 return get CollectionNamedItems<JSHTMLAllCollection>(exec, this, Identifier(exec, args.at(0).toString(exec)));132 return getNamedItems(exec, this, Identifier(exec, args.at(0).toString(exec))); 74 133 } 75 134 -
trunk/WebCore/bindings/js/JSHTMLCollectionCustom.cpp
r50041 r50087 22 22 23 23 #include "AtomicString.h" 24 #include "HTMLAllCollection.h"25 24 #include "HTMLCollection.h" 26 25 #include "HTMLOptionsCollection.h" 26 #include "HTMLAllCollection.h" 27 27 #include "JSDOMBinding.h" 28 28 #include "JSHTMLAllCollection.h" 29 #include "JSHTMLCollectionFunctions.h"30 29 #include "JSHTMLOptionsCollection.h" 31 30 #include "JSNode.h" … … 39 38 namespace WebCore { 40 39 40 static JSValue getNamedItems(ExecState* exec, JSHTMLCollection* collection, const Identifier& propertyName) 41 { 42 Vector<RefPtr<Node> > namedItems; 43 collection->impl()->namedItems(propertyName, namedItems); 44 45 if (namedItems.isEmpty()) 46 return jsUndefined(); 47 if (namedItems.size() == 1) 48 return toJS(exec, collection->globalObject(), namedItems[0].get()); 49 50 // FIXME: HTML5 specifies that this should be a DynamicNodeList. 51 // FIXME: HTML5 specifies that non-HTMLOptionsCollection collections should return 52 // the first matching item instead of a NodeList. 53 return toJS(exec, collection->globalObject(), StaticNodeList::adopt(namedItems).get()); 54 } 55 56 // HTMLCollections are strange objects, they support both get and call, 57 // so that document.forms.item(0) and document.forms(0) both work. 41 58 static JSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec, JSObject* function, JSValue, const ArgList& args) 42 59 { 43 return callHTMLCollectionGeneric<HTMLCollection, JSHTMLCollection>(exec, function, args); 60 if (args.size() < 1) 61 return jsUndefined(); 62 63 // Do not use thisObj here. It can be the JSHTMLDocument, in the document.forms(i) case. 64 JSHTMLCollection* jsCollection = static_cast<JSHTMLCollection*>(function); 65 HTMLCollection* collection = jsCollection->impl(); 66 67 // Also, do we need the TypeError test here ? 68 69 if (args.size() == 1) { 70 // Support for document.all(<index>) etc. 71 bool ok; 72 UString string = args.at(0).toString(exec); 73 unsigned index = string.toUInt32(&ok, false); 74 if (ok) 75 return toJS(exec, jsCollection->globalObject(), collection->item(index)); 76 77 // Support for document.images('<name>') etc. 78 return getNamedItems(exec, jsCollection, Identifier(exec, string)); 79 } 80 81 // The second arg, if set, is the index of the item we want 82 bool ok; 83 UString string = args.at(0).toString(exec); 84 unsigned index = args.at(1).toString(exec).toUInt32(&ok, false); 85 if (ok) { 86 String pstr = string; 87 Node* node = collection->namedItem(pstr); 88 while (node) { 89 if (!index) 90 return toJS(exec, jsCollection->globalObject(), node); 91 node = collection->nextNamedItem(pstr); 92 --index; 93 } 94 } 95 96 return jsUndefined(); 44 97 } 45 98 … … 60 113 { 61 114 JSHTMLCollection* thisObj = static_cast<JSHTMLCollection*>(asObject(slot.slotBase())); 62 return get CollectionNamedItems<JSHTMLCollection>(exec, thisObj, propertyName);115 return getNamedItems(exec, thisObj, propertyName); 63 116 } 64 117 65 118 JSValue JSHTMLCollection::item(ExecState* exec, const ArgList& args) 66 119 { 67 return getCollectionItems<JSHTMLCollection>(exec, this, args.at(0)); 120 bool ok; 121 uint32_t index = args.at(0).toString(exec).toUInt32(&ok, false); 122 if (ok) 123 return toJS(exec, globalObject(), impl()->item(index)); 124 return getNamedItems(exec, this, Identifier(exec, args.at(0).toString(exec))); 68 125 } 69 126 70 127 JSValue JSHTMLCollection::namedItem(ExecState* exec, const ArgList& args) 71 128 { 72 return getCollectionNamedItems<JSHTMLCollection>(exec, this, Identifier(exec, args.at(0).toString(exec))); 129 return getNamedItems(exec, this, Identifier(exec, args.at(0).toString(exec))); 130 } 131 132 JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, HTMLCollection* collection) 133 { 134 if (!collection) 135 return jsNull(); 136 137 DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(), collection); 138 139 if (wrapper) 140 return wrapper; 141 142 switch (collection->type()) { 143 case SelectOptions: 144 wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLOptionsCollection, collection); 145 break; 146 case DocAll: 147 wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLAllCollection, collection); 148 break; 149 default: 150 wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLCollection, collection); 151 break; 152 } 153 154 return wrapper; 73 155 } 74 156 -
trunk/WebCore/bindings/js/JSHTMLDocumentCustom.cpp
r50041 r50087 39 39 #include "JSDOMWindowCustom.h" 40 40 #include "JSDOMWindowShell.h" 41 #include "JSHTMLAllCollection.h"42 41 #include "JSHTMLCollection.h" 43 42 #include "SegmentedString.h" -
trunk/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
r50041 r50087 26 26 #include "HTMLOptionsCollection.h" 27 27 #include "HTMLSelectElement.h" 28 #include "JSHTMLCollection.h"29 #include "JSHTMLCollectionFunctions.h"30 28 #include "JSHTMLOptionElement.h" 31 29 #include "JSHTMLSelectElement.h" 32 30 #include "JSHTMLSelectElementCustom.h" 31 33 32 #include <wtf/MathExtras.h> 34 33 … … 37 36 namespace WebCore { 38 37 39 static JSValue JSC_HOST_CALL callHTMLCollection(ExecState* exec, JSObject* function, JSValue, const ArgList& args) 40 { 41 return callHTMLCollectionGeneric<HTMLOptionsCollection, JSHTMLOptionsCollection>(exec, function, args); 42 } 43 44 CallType JSHTMLOptionsCollection::getCallData(CallData& callData) 45 { 46 callData.native.function = callHTMLCollection; 47 return CallTypeHost; 48 } 49 50 bool JSHTMLOptionsCollection::canGetItemsForName(ExecState*, HTMLOptionsCollection* collection, const Identifier& propertyName) 51 { 52 Vector<RefPtr<Node> > namedItems; 53 collection->namedItems(propertyName, namedItems); 54 return !namedItems.isEmpty(); 55 } 56 57 JSValue JSHTMLOptionsCollection::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot) 58 { 59 JSHTMLOptionsCollection* thisObj = static_cast<JSHTMLOptionsCollection*>(asObject(slot.slotBase())); 60 return getCollectionNamedItems<JSHTMLOptionsCollection>(exec, thisObj, propertyName); 61 } 62 63 void JSHTMLOptionsCollection::indexSetter(ExecState* exec, unsigned index, JSValue value) 38 JSValue JSHTMLOptionsCollection::length(ExecState* exec) const 64 39 { 65 40 HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl()); 66 HTMLSelectElement* base = static_cast<HTMLSelectElement*>(imp->base()); 67 selectIndexSetter(base, exec, index, value); 68 } 69 70 JSValue JSHTMLOptionsCollection::item(ExecState* exec, const ArgList& args) 71 { 72 return getCollectionItems<JSHTMLOptionsCollection>(exec, this, args.at(0)); 73 } 74 75 JSValue JSHTMLOptionsCollection::namedItem(ExecState* exec, const ArgList& args) 76 { 77 return getCollectionNamedItems<JSHTMLOptionsCollection>(exec, this, Identifier(exec, args.at(0).toString(exec))); 41 return jsNumber(exec, imp->length()); 78 42 } 79 43 … … 95 59 imp->setLength(newLength, ec); 96 60 setDOMException(exec, ec); 61 } 62 63 void JSHTMLOptionsCollection::indexSetter(ExecState* exec, unsigned index, JSValue value) 64 { 65 HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl()); 66 HTMLSelectElement* base = static_cast<HTMLSelectElement*>(imp->base()); 67 selectIndexSetter(base, exec, index, value); 97 68 } 98 69 … … 125 96 } 126 97 127 } // namespace WebCore98 } -
trunk/WebCore/bindings/objc/DOMHTML.mm
r50041 r50087 29 29 #import "DOMDocumentFragmentInternal.h" 30 30 #import "DOMExtensions.h" 31 #import "DOMHTMLCollectionInternal.h" 31 32 #import "DOMHTMLDocumentInternal.h" 32 33 #import "DOMHTMLInputElementInternal.h" … … 37 38 #import "DocumentFragment.h" 38 39 #import "FrameView.h" 40 #import "HTMLCollection.h" 39 41 #import "HTMLDocument.h" 40 42 #import "HTMLInputElement.h" … … 180 182 181 183 @end 184 185 Class kitClass(WebCore::HTMLCollection* collection) 186 { 187 if (collection->type() == WebCore::SelectOptions) 188 return [DOMHTMLOptionsCollection class]; 189 return [DOMHTMLCollection class]; 190 } -
trunk/WebCore/bindings/objc/DOMUtility.mm
r50041 r50087 35 35 #import "DOMEventInternal.h" 36 36 #import "DOMHTMLCollectionInternal.h" 37 #import "DOMHTMLOptionsCollectionInternal.h"38 37 #import "DOMImplementationFront.h" 39 38 #import "DOMInternal.h" … … 107 106 WRAP(Counter) 108 107 WRAP(Event) 109 WRAP(HTMLCollection)110 108 WRAP(HTMLOptionsCollection) 111 109 WRAP(MediaList) … … 120 118 WRAP(StyleSheetList) 121 119 WRAP(TreeWalker) 122 WRAP(DOMWindowShell)123 120 #if ENABLE(XPATH) 124 121 WRAP(XPathExpression) … … 126 123 #endif 127 124 125 // This must be after the HTMLOptionsCollection check, because it's a subclass in the JavaScript 126 // binding, but not a subclass in the ObjC binding. 127 WRAP(HTMLCollection) 128 128 129 #undef WRAP 130 131 if (object->inherits(&WebCore::JSDOMWindowShell::s_info)) 132 return kit(static_cast<WebCore::JSDOMWindowShell*>(object)->impl()); 129 133 130 134 if (object->inherits(&WebCore::JSDOMImplementation::s_info)) -
trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm
r50041 r50087 1709 1709 } 1710 1710 push(@implContent, "}\n"); 1711 if ($interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection" or $interfaceName eq "HTMLOptionsCollection") {1711 if ($interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") { 1712 1712 $implIncludes{"JSNode.h"} = 1; 1713 1713 $implIncludes{"Node.h"} = 1; … … 1720 1720 push(@implContent, " return jsNumber(exec, static_cast<$implClassName*>(impl())->item(index));\n"); 1721 1721 push(@implContent, "}\n"); 1722 if ($interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection" or $interfaceName eq "HTMLOptionsCollection") {1722 if ($interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") { 1723 1723 $implIncludes{"JSNode.h"} = 1; 1724 1724 $implIncludes{"Node.h"} = 1; -
trunk/WebCore/html/HTMLCollection.idl
r50041 r50087 26 26 HasNameGetter, 27 27 CustomCall, 28 CustomToJS, 29 Polymorphic, 28 30 InterfaceUUID=b0d215ff-6f9c-4d1f-86c3-f200a65a5134, 29 31 ImplementationUUID=8e81b17f-7f74-4121-8f2f-a339a7e66447 -
trunk/WebCore/html/HTMLOptionsCollection.idl
r50041 r50087 1 1 /* 2 * Copyright (C) 2006, 2007 , 2009Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 4 4 * … … 21 21 module html { 22 22 23 // FIXME: The W3C spec says that HTMLOptionsCollection should not have a parent class. 23 24 interface [ 24 GenerateConstructor, 25 HasIndexGetter, 25 GenerateNativeConverter, 26 26 HasCustomIndexSetter, 27 HasNameGetter,28 CustomCall,29 27 InterfaceUUID=a03aaeac-e47d-4bb3-acb4-f1897ae74237, 30 28 ImplementationUUID=99c11fde-6f9f-44a4-a041-49a894c52e70 31 ] HTMLOptionsCollection { 32 attribute [CustomSetter] unsigned long length 29 ] HTMLOptionsCollection : HTMLCollection { 30 attribute long selectedIndex; 31 attribute [Custom] unsigned long length 33 32 setter raises (DOMException); 34 [Custom] Node item(in unsigned long index);35 [Custom] Node namedItem(in DOMString name);36 33 37 34 [Custom] void add(in HTMLOptionElement option, in [Optional] unsigned long index) 38 35 raises (DOMException); 39 36 [Custom] void remove(in unsigned long index); 40 41 // Extension42 attribute long selectedIndex;43 37 }; 44 38 -
trunk/WebKit/win/ChangeLog
r50045 r50087 1 2009-10-26 Sam Weinig <sam@webkit.org> 2 3 Rubber-stamped by Darin Adler. 4 5 Rollout r50041-50043. The HTML5 spec changed to make HTMLOptionsCollection 6 inherit from HTMLCollection. 7 8 * DOMCreateInstance.cpp: 9 1 10 2009-10-25 Dan Bernstein <mitz@apple.com> 2 11 -
trunk/WebKit/win/DOMCreateInstance.cpp
r50043 r50087 46 46 #include "GEN_DOMHTMLDocument.h" 47 47 #include "GEN_DOMHTMLCollection.h" 48 #include "GEN_DOMHTMLOptionsCollection.h"49 48 #include "GEN_DOMDocumentType.h" 50 49 #include "GEN_DOMDocumentFragment.h" … … 92 91 #include <WebCore/HTMLElement.h> 93 92 #include <WebCore/HTMLCollection.h> 94 #include <WebCore/HTMLOptionsCollection.h>95 93 #include <WebCore/DocumentType.h> 96 94 #include <WebCore/DocumentFragment.h> … … 358 356 359 357 CREATE_ONLY_SELF(HTMLCollection) 360 CREATE_ONLY_SELF(HTMLOptionsCollection)
Note: See TracChangeset
for help on using the changeset viewer.