Changeset 49998 in webkit


Ignore:
Timestamp:
Oct 23, 2009 2:12:03 PM (14 years ago)
Author:
weinig@apple.com
Message:

WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=30695
Drop .tags() support from HTMLCollection

Reviewed by Anders Carlsson.

  • Make .tags() only work for HTMLAllCollections in JS. .tags() is still available for all HTMLCollection like objects in Objective-C since that is API.
  • Auto-generate HTMLAllCollection.

Test: fast/dom/HTMLDocument/document-all.html

  • DerivedSources.make:
  • GNUmakefile.am:
  • WebCore.gypi:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSHTMLAllCollection.cpp: Removed.
  • bindings/js/JSHTMLAllCollection.h: Removed.
  • bindings/js/JSHTMLAllCollectionCustom.cpp: Added.

(WebCore::getNamedItems):
(WebCore::callHTMLAllCollection):
(WebCore::JSHTMLAllCollection::getCallData):
(WebCore::JSHTMLAllCollection::canGetItemsForName):
(WebCore::JSHTMLAllCollection::nameGetter):
(WebCore::JSHTMLAllCollection::item):
(WebCore::JSHTMLAllCollection::namedItem):

  • bindings/js/JSHTMLCollectionCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSHTMLDocumentCustom.cpp:
  • bindings/scripts/CodeGeneratorJS.pm:
  • dom/Document.cpp:

(WebCore::Document::all):

  • dom/Document.h:
  • dom/HTMLAllCollection.idl: Removed.
  • html/HTMLAllCollection.cpp: Added.

(WebCore::HTMLAllCollection::create):
(WebCore::HTMLAllCollection::HTMLAllCollection):
(WebCore::HTMLAllCollection::~HTMLAllCollection):

  • html/HTMLAllCollection.h: Added.
  • html/HTMLAllCollection.idl: Added.
  • html/HTMLCollection.h:
  • html/HTMLCollection.idl:
  • html/HTMLDocument.idl:
  • page/DOMWindow.idl:

LayoutTests: Update and add test for https://bugs.webkit.org/show_bug.cgi?id=30695
Drop .tags() support from HTMLCollection

Reviewed by Anders Carlsson.

  • fast/dom/HTMLDocument/document-all-expected.txt: Added.
  • fast/dom/HTMLDocument/document-all.html: Added.
  • fast/dom/HTMLDocument/script-tests: Added.
  • fast/dom/HTMLDocument/script-tests/document-all.js: Added.
  • fast/dom/Window/window-properties-expected.txt:
  • fast/dom/dom-constructors-expected.txt:
  • fast/dom/dom-constructors.html:
  • fast/dom/domListEnumeration-expected.txt:
  • fast/dom/prototype-inheritance-2-expected.txt:
  • fast/dom/prototype-inheritance-expected.txt:
  • fast/dom/script-tests/domListEnumeration.js:
  • fast/dom/undetectable-document-all-expected.txt:
  • fast/js/global-constructors-expected.txt:
Location:
trunk
Files:
8 added
3 deleted
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r49995 r49998  
     12009-10-23  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        Update and add test for https://bugs.webkit.org/show_bug.cgi?id=30695
     6        Drop .tags() support from HTMLCollection
     7
     8        * fast/dom/HTMLDocument/document-all-expected.txt: Added.
     9        * fast/dom/HTMLDocument/document-all.html: Added.
     10        * fast/dom/HTMLDocument/script-tests: Added.
     11        * fast/dom/HTMLDocument/script-tests/document-all.js: Added.
     12        * fast/dom/Window/window-properties-expected.txt:
     13        * fast/dom/dom-constructors-expected.txt:
     14        * fast/dom/dom-constructors.html:
     15        * fast/dom/domListEnumeration-expected.txt:
     16        * fast/dom/prototype-inheritance-2-expected.txt:
     17        * fast/dom/prototype-inheritance-expected.txt:
     18        * fast/dom/script-tests/domListEnumeration.js:
     19        * fast/dom/undetectable-document-all-expected.txt:
     20        * fast/js/global-constructors-expected.txt:
     21
    1222009-10-23  Alpha Lam  <hclam@chromium.org>
    223
  • trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt

    r49489 r49998  
    900900window.FileList.prototype [object FileListPrototype]
    901901window.FileList.prototype.item [function]
     902window.HTMLAllCollection [object HTMLAllCollectionConstructor]
     903window.HTMLAllCollection.prototype [object HTMLAllCollectionPrototype]
     904window.HTMLAllCollection.prototype.item [function]
     905window.HTMLAllCollection.prototype.namedItem [function]
     906window.HTMLAllCollection.prototype.tags [function]
    902907window.HTMLAnchorElement [object HTMLAnchorElementConstructor]
    903908window.HTMLAnchorElement.prototype [printed above as window.Element.prototype]
     
    926931window.HTMLCollection.prototype.item [function]
    927932window.HTMLCollection.prototype.namedItem [function]
    928 window.HTMLCollection.prototype.tags [function]
    929933window.HTMLDListElement [object HTMLDListElementConstructor]
    930934window.HTMLDListElement.prototype [printed above as window.Element.prototype]
  • trunk/LayoutTests/fast/dom/dom-constructors-expected.txt

    r46211 r49998  
    1919PASS TryAllocate('ProcessingInstruction') is 'exception'
    2020PASS TryAllocate('Text') is 'exception'
     21PASS TryAllocate('HTMLAllCollection') is 'exception'
    2122PASS TryAllocate('HTMLAnchorElement') is 'exception'
    2223PASS TryAllocate('HTMLAppletElement') is 'exception'
     
    137138PASS TryAllocate('EventListener') is 'no constructor'
    138139PASS TryAllocate('NPObject') is 'no constructor'
    139 PASS TryAllocate('HTMLAllCollection') is 'no constructor'
    140140PASS TryAllocate('DOMParser') is '[object DOMParser]'
    141141PASS TryAllocate('DOMParser') is '[object DOMParser]'
  • trunk/LayoutTests/fast/dom/dom-constructors.html

    r42428 r49998  
    2020    'DocumentFragment', 'DocumentType', 'Element', 'Entity',
    2121    'EntityReference', 'HTMLDocument', 'Node', 'Notation',
    22     'ProcessingInstruction', 'Text', 'HTMLAnchorElement',
     22    'ProcessingInstruction', 'Text', 'HTMLAllCollection', 'HTMLAnchorElement',
    2323    'HTMLAppletElement', 'HTMLAreaElement', 'HTMLBaseElement',
    2424    'HTMLBaseFontElement', 'HTMLBlockquoteElement', 'HTMLBodyElement',
     
    6666var objects_no_constructor = [
    6767    'EventTargetNode', 'UndetectableHTMLCollection',
    68     'XPathNSResolver', 'EventTarget', 'EventListener', 'NPObject',
    69     'HTMLAllCollection'
     68    'XPathNSResolver', 'EventTarget', 'EventListener', 'NPObject'
    7069];
    7170
  • trunk/LayoutTests/fast/dom/domListEnumeration-expected.txt

    r48723 r49998  
    1515
    1616[object HTMLCollection]
    17 PASS resultArray.length is 7
     17PASS resultArray.length is 6
    1818PASS resultArray[0].i is '0'
    1919PASS resultArray[0].item is htmlCollection.item(0)
  • trunk/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt

    r49489 r49998  
    221221Never found File
    222222Never found FileList
     223Never found HTMLAllCollection
    223224Never found HTMLBaseElement
    224225Never found HTMLBaseFontElement
  • trunk/LayoutTests/fast/dom/prototype-inheritance-expected.txt

    r49489 r49998  
    8686PASS inner.FileList.isInner is true
    8787PASS inner.FileList.constructor.isInner is true
     88PASS inner.HTMLAllCollection.isInner is true
     89PASS inner.HTMLAllCollection.constructor.isInner is true
    8890PASS inner.HTMLAnchorElement.isInner is true
    8991PASS inner.HTMLAnchorElement.constructor.isInner is true
  • trunk/LayoutTests/fast/dom/script-tests/domListEnumeration.js

    r48723 r49998  
    109109var htmlCollection = document.forms;
    110110resultArray = iterateList(htmlCollection);
    111 shouldBe("resultArray.length", "7");
     111shouldBe("resultArray.length", "6");
    112112shouldBe("resultArray[0].i", "'0'");
    113113shouldBe("resultArray[0].item", "htmlCollection.item(0)");
  • trunk/LayoutTests/fast/dom/undetectable-document-all-expected.txt

    r20145 r49998  
    11This tests that document.all should be undetectable, and that it should be possible to set document.all to something else. If this test is successful, the text "SUCCESS" should be shown below.
    2 document.all: [object HTMLCollection]
     2document.all: [object HTMLAllCollection]
    33SUCCESS!
    44
  • trunk/LayoutTests/fast/js/global-constructors-expected.txt

    r49489 r49998  
    4343PASS File.toString() is '[object FileConstructor]'
    4444PASS FileList.toString() is '[object FileListConstructor]'
     45PASS HTMLAllCollection.toString() is '[object HTMLAllCollectionConstructor]'
    4546PASS HTMLAnchorElement.toString() is '[object HTMLAnchorElementConstructor]'
    4647PASS HTMLAppletElement.toString() is '[object HTMLAppletElementConstructor]'
  • trunk/WebCore/ChangeLog

    r49997 r49998  
     12009-10-23  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=30695
     6        Drop .tags() support from HTMLCollection
     7
     8        - Make .tags() only work for HTMLAllCollections in JS. .tags() is still
     9          available for all HTMLCollection like objects in Objective-C since that
     10          is API.
     11        - Auto-generate HTMLAllCollection.
     12
     13        Test: fast/dom/HTMLDocument/document-all.html
     14
     15        * DerivedSources.make:
     16        * GNUmakefile.am:
     17        * WebCore.gypi:
     18        * WebCore.pro:
     19        * WebCore.vcproj/WebCore.vcproj:
     20        * WebCore.xcodeproj/project.pbxproj:
     21        * bindings/js/JSHTMLAllCollection.cpp: Removed.
     22        * bindings/js/JSHTMLAllCollection.h: Removed.
     23        * bindings/js/JSHTMLAllCollectionCustom.cpp: Added.
     24        (WebCore::getNamedItems):
     25        (WebCore::callHTMLAllCollection):
     26        (WebCore::JSHTMLAllCollection::getCallData):
     27        (WebCore::JSHTMLAllCollection::canGetItemsForName):
     28        (WebCore::JSHTMLAllCollection::nameGetter):
     29        (WebCore::JSHTMLAllCollection::item):
     30        (WebCore::JSHTMLAllCollection::namedItem):
     31        * bindings/js/JSHTMLCollectionCustom.cpp:
     32        (WebCore::toJS):
     33        * bindings/js/JSHTMLDocumentCustom.cpp:
     34        * bindings/scripts/CodeGeneratorJS.pm:
     35        * dom/Document.cpp:
     36        (WebCore::Document::all):
     37        * dom/Document.h:
     38        * dom/HTMLAllCollection.idl: Removed.
     39        * html/HTMLAllCollection.cpp: Added.
     40        (WebCore::HTMLAllCollection::create):
     41        (WebCore::HTMLAllCollection::HTMLAllCollection):
     42        (WebCore::HTMLAllCollection::~HTMLAllCollection):
     43        * html/HTMLAllCollection.h: Added.
     44        * html/HTMLAllCollection.idl: Added.
     45        * html/HTMLCollection.h:
     46        * html/HTMLCollection.idl:
     47        * html/HTMLDocument.idl:
     48        * page/DOMWindow.idl:
     49
    1502009-10-23  Pavel Feldman  <pfeldman@chromium.org>
    251
  • trunk/WebCore/DerivedSources.make

    r49420 r49998  
    127127    Geolocation \
    128128    Geoposition \
     129    HTMLAllCollection \
    129130    HTMLAnchorElement \
    130131    HTMLAppletElement \
  • trunk/WebCore/GNUmakefile.am

    r49778 r49998  
    170170        WebCore/html/File.idl \
    171171        WebCore/html/FileList.idl \
     172        WebCore/html/HTMLAllCollection.idl \
    172173        WebCore/html/HTMLAnchorElement.idl \
    173174        WebCore/html/HTMLAppletElement.idl \
     
    371372        WebCore/bindings/js/JSExceptionBase.h \
    372373        WebCore/bindings/js/JSGeolocationCustom.cpp \
    373         WebCore/bindings/js/JSHTMLAllCollection.cpp \
    374         WebCore/bindings/js/JSHTMLAllCollection.h \
    375         WebCore/bindings/js/JSHTMLAppletElementCustom.cpp \
     374        WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp \
     375        WebCore/bindings/js/JSHTMLAppletElementCustom.cpp \
    376376        WebCore/bindings/js/JSHTMLAppletElementCustom.h \
    377377        WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp \
     
    961961        WebCore/html/FormDataList.cpp \
    962962        WebCore/html/FormDataList.h \
     963        WebCore/html/HTMLAllCollection.cpp \
     964        WebCore/html/HTMLAllCollection.h \
    963965        WebCore/html/HTMLAnchorElement.cpp \
    964966        WebCore/html/HTMLAnchorElement.h \
  • trunk/WebCore/WebCore.gypi

    r49989 r49998  
    5252            'dom/EventListener.idl',
    5353            'dom/EventTarget.idl',
    54             'dom/HTMLAllCollection.idl',
    5554            'dom/KeyboardEvent.idl',
    5655            'dom/MessageChannel.idl',
     
    104103            'html/File.idl',
    105104            'html/FileList.idl',
     105            'html/HTMLAllCollection.idl',
    106106            'html/HTMLAnchorElement.idl',
    107107            'html/HTMLAppletElement.idl',
     
    492492            'bindings/js/JSHistoryCustom.cpp',
    493493            'bindings/js/JSHistoryCustom.h',
    494             'bindings/js/JSHTMLAllCollection.cpp',
    495             'bindings/js/JSHTMLAllCollection.h',
     494            'bindings/js/JSHTMLAllCollectionCustom.cpp',
    496495            'bindings/js/JSHTMLAppletElementCustom.cpp',
    497496            'bindings/js/JSHTMLAppletElementCustom.h',
     
    13281327            'html/FormDataList.cpp',
    13291328            'html/FormDataList.h',
     1329            'html/HTMLAllCollection.cpp',
     1330            'html/HTMLAllCollection.h',
    13301331            'html/HTMLAnchorElement.cpp',
    13311332            'html/HTMLAnchorElement.h',
  • trunk/WebCore/WebCore.pro

    r49986 r49998  
    395395    html/File.idl \
    396396    html/FileList.idl \
     397    html/HTMLAllCollection.idl \
    397398    html/HTMLAudioElement.idl \
    398399    html/HTMLAnchorElement.idl \
     
    704705    bindings/js/JSExceptionBase.cpp \
    705706    bindings/js/JSGeolocationCustom.cpp \
    706     bindings/js/JSHTMLAllCollection.cpp \
    707707    bindings/js/JSHistoryCustom.cpp \
    708708    bindings/js/JSHTMLAppletElementCustom.cpp \
    709709    bindings/js/JSHTMLCanvasElementCustom.cpp \
     710    bindings/js/JSHTMLAllCollectionCustom.cpp \
    710711    bindings/js/JSHTMLCollectionCustom.cpp \
    711712    bindings/js/JSHTMLDataGridElementCustom.cpp \
     
    991992    html/FileList.cpp \
    992993    html/FormDataList.cpp \
     994    html/HTMLAllCollection.cpp \
    993995    html/HTMLAnchorElement.cpp \
    994996    html/HTMLAppletElement.cpp \
     
    14041406    bindings/js/JSEventTarget.h \
    14051407    bindings/js/JSHistoryCustom.h \
    1406     bindings/js/JSHTMLAllCollection.h \
    14071408    bindings/js/JSHTMLAppletElementCustom.h \
    14081409    bindings/js/JSHTMLEmbedElementCustom.h \
     
    16651666    html/FileList.h \
    16661667    html/FormDataList.h \
     1668    html/HTMLAllCollection.h \
    16671669    html/HTMLAnchorElement.h \
    16681670    html/HTMLAppletElement.h \
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r49970 r49998  
    43074307                        <File
    43084308                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLCanvasElement.h"
     4309                                >
     4310                        </File>
     4311                        <File
     4312                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLAllCollection.cpp"
     4313                                >
     4314                                <FileConfiguration
     4315                                        Name="Debug|Win32"
     4316                                        ExcludedFromBuild="true"
     4317                                        >
     4318                                        <Tool
     4319                                                Name="VCCLCompilerTool"
     4320                                        />
     4321                                </FileConfiguration>
     4322                                <FileConfiguration
     4323                                        Name="Release|Win32"
     4324                                        ExcludedFromBuild="true"
     4325                                        >
     4326                                        <Tool
     4327                                                Name="VCCLCompilerTool"
     4328                                        />
     4329                                </FileConfiguration>
     4330                                <FileConfiguration
     4331                                        Name="Debug_Internal|Win32"
     4332                                        ExcludedFromBuild="true"
     4333                                        >
     4334                                        <Tool
     4335                                                Name="VCCLCompilerTool"
     4336                                        />
     4337                                </FileConfiguration>
     4338                                <FileConfiguration
     4339                                        Name="Debug_Cairo|Win32"
     4340                                        ExcludedFromBuild="true"
     4341                                        >
     4342                                        <Tool
     4343                                                Name="VCCLCompilerTool"
     4344                                        />
     4345                                </FileConfiguration>
     4346                                <FileConfiguration
     4347                                        Name="Release_Cairo|Win32"
     4348                                        ExcludedFromBuild="true"
     4349                                        >
     4350                                        <Tool
     4351                                                Name="VCCLCompilerTool"
     4352                                        />
     4353                                </FileConfiguration>
     4354                                <FileConfiguration
     4355                                        Name="Debug_All|Win32"
     4356                                        ExcludedFromBuild="true"
     4357                                        >
     4358                                        <Tool
     4359                                                Name="VCCLCompilerTool"
     4360                                        />
     4361                                </FileConfiguration>
     4362                        </File>
     4363                        <File
     4364                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLAllCollection.h"
    43094365                                >
    43104366                        </File>
     
    3001230068                        </File>
    3001330069                        <File
     30070                                RelativePath="..\html\HTMLAllCollection.cpp"
     30071                                >
     30072                        </File>
     30073                        <File
     30074                                RelativePath="..\html\HTMLAllCollection.h"
     30075                                >
     30076                        </File>
     30077                        <File
    3001430078                                RelativePath="..\html\HTMLCollection.cpp"
    3001530079                                >
     
    3385933923                                </File>
    3386033924                                <File
    33861                                         RelativePath="..\bindings\js\JSHTMLAllCollection.cpp"
    33862                                         >
    33863                                 </File>
    33864                                 <File
    33865                                         RelativePath="..\bindings\js\JSHTMLAllCollection.h"
    33866                                         >
    33867                                 </File>
    33868                                 <File
    3386933925                                        RelativePath="..\bindings\js\JSHTMLAppletElementCustom.cpp"
    3387033926                                        >
     
    3387233928                                <File
    3387333929                                        RelativePath="..\bindings\js\JSHTMLCanvasElementCustom.cpp"
     33930                                        >
     33931                                </File>
     33932                                <File
     33933                                        RelativePath="..\bindings\js\JSHTMLAllCollectionCustom.cpp"
    3387433934                                        >
    3387533935                                </File>
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r49778 r49998  
    22092209                934F71440D5A6F5300018D69 /* AuthenticationChallenge.h in Headers */ = {isa = PBXBuildFile; fileRef = 934F71430D5A6F5300018D69 /* AuthenticationChallenge.h */; settings = {ATTRIBUTES = (Private, ); }; };
    22102210                934FE9E50B5CA539003E4A73 /* FileChooser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 934FE9E40B5CA539003E4A73 /* FileChooser.cpp */; };
    2211                 9350E70D0E87500B00189FFF /* JSHTMLAllCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9350E70C0E87500B00189FFF /* JSHTMLAllCollection.cpp */; };
    22122211                9352071909BD3BA500F2038D /* StaticConstructors.h in Headers */ = {isa = PBXBuildFile; fileRef = 9352071709BD3BA500F2038D /* StaticConstructors.h */; };
    22132212                935207BE09BD410A00F2038D /* LocalizedStrings.h in Headers */ = {isa = PBXBuildFile; fileRef = 935207BD09BD410A00F2038D /* LocalizedStrings.h */; };
     
    42504249                BC6DADEF0A195FDF00E5CD14 /* WebFontCache.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6DADEE0A195FDF00E5CD14 /* WebFontCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
    42514250                BC6DADFA0A19602B00E5CD14 /* WebFontCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC6DADF90A19602B00E5CD14 /* WebFontCache.mm */; };
    4252                 BC6DC7A10C1A4BFA004E2017 /* JSHTMLAllCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6DC7A00C1A4BFA004E2017 /* JSHTMLAllCollection.h */; };
    42534251                BC74DA371013F3F7007987AD /* RGBColor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC74DA351013F3F7007987AD /* RGBColor.h */; };
    42544252                BC74DA381013F3F7007987AD /* RGBColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC74DA361013F3F7007987AD /* RGBColor.cpp */; };
     
    43284326                BC96DB430F3A880E00573CB3 /* RenderBoxModelObject.h in Headers */ = {isa = PBXBuildFile; fileRef = BC96DB420F3A880E00573CB3 /* RenderBoxModelObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
    43294327                BC96DB460F3A882200573CB3 /* RenderBoxModelObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC96DB450F3A882200573CB3 /* RenderBoxModelObject.cpp */; };
     4328                BC97E23A109144950010D361 /* HTMLAllCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = BC97E238109144950010D361 /* HTMLAllCollection.h */; };
     4329                BC97E23B109144950010D361 /* HTMLAllCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC97E239109144950010D361 /* HTMLAllCollection.cpp */; };
     4330                BC97E412109154FA0010D361 /* JSHTMLAllCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC97E410109154FA0010D361 /* JSHTMLAllCollection.cpp */; };
     4331                BC97E413109154FA0010D361 /* JSHTMLAllCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = BC97E411109154FA0010D361 /* JSHTMLAllCollection.h */; };
     4332                BC97E42C10915B060010D361 /* JSHTMLAllCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */; };
    43304333                BC98543D0CD3D98B00069BC1 /* JSConsole.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC98543B0CD3D98B00069BC1 /* JSConsole.cpp */; };
    43314334                BC98543E0CD3D98C00069BC1 /* JSConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = BC98543C0CD3D98B00069BC1 /* JSConsole.h */; };
     
    74517454                934F71430D5A6F5300018D69 /* AuthenticationChallenge.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AuthenticationChallenge.h; sourceTree = "<group>"; };
    74527455                934FE9E40B5CA539003E4A73 /* FileChooser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileChooser.cpp; sourceTree = "<group>"; };
    7453                 9350E70C0E87500B00189FFF /* JSHTMLAllCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAllCollection.cpp; sourceTree = "<group>"; };
    74547456                9352071709BD3BA500F2038D /* StaticConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticConstructors.h; sourceTree = "<group>"; };
    74557457                935207BD09BD410A00F2038D /* LocalizedStrings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalizedStrings.h; sourceTree = "<group>"; };
     
    93749376                BC6DADEE0A195FDF00E5CD14 /* WebFontCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebFontCache.h; sourceTree = "<group>"; };
    93759377                BC6DADF90A19602B00E5CD14 /* WebFontCache.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebFontCache.mm; sourceTree = "<group>"; };
    9376                 BC6DC7A00C1A4BFA004E2017 /* JSHTMLAllCollection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLAllCollection.h; sourceTree = "<group>"; };
    93779378                BC74DA351013F3F7007987AD /* RGBColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RGBColor.h; sourceTree = "<group>"; };
    93789379                BC74DA361013F3F7007987AD /* RGBColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RGBColor.cpp; sourceTree = "<group>"; };
     
    94599460                BC96DB420F3A880E00573CB3 /* RenderBoxModelObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderBoxModelObject.h; sourceTree = "<group>"; };
    94609461                BC96DB450F3A882200573CB3 /* RenderBoxModelObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderBoxModelObject.cpp; sourceTree = "<group>"; };
     9462                BC97E238109144950010D361 /* HTMLAllCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLAllCollection.h; sourceTree = "<group>"; };
     9463                BC97E239109144950010D361 /* HTMLAllCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLAllCollection.cpp; sourceTree = "<group>"; };
     9464                BC97E23C109146F10010D361 /* HTMLAllCollection.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLAllCollection.idl; sourceTree = "<group>"; };
     9465                BC97E410109154FA0010D361 /* JSHTMLAllCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAllCollection.cpp; sourceTree = "<group>"; };
     9466                BC97E411109154FA0010D361 /* JSHTMLAllCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLAllCollection.h; sourceTree = "<group>"; };
     9467                BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAllCollectionCustom.cpp; sourceTree = "<group>"; };
    94619468                BC98543B0CD3D98B00069BC1 /* JSConsole.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSConsole.cpp; sourceTree = "<group>"; };
    94629469                BC98543C0CD3D98B00069BC1 /* JSConsole.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSConsole.h; sourceTree = "<group>"; };
     
    1249612503                                A8DF3FC8097FA0FB0052981B /* HTMLCollection.h */,
    1249712504                                85DF2F690AA3C74300AD64C5 /* HTMLCollection.idl */,
     12505                                BC97E23C109146F10010D361 /* HTMLAllCollection.idl */,
     12506                                BC97E238109144950010D361 /* HTMLAllCollection.h */,
     12507                                BC97E239109144950010D361 /* HTMLAllCollection.cpp */,
    1249812508                                BC77CDB70FEFF1210070887B /* HTMLDataGridCellElement.cpp */,
    1249912509                                BC77CDBB0FEFF1420070887B /* HTMLDataGridCellElement.h */,
     
    1279912809                                BC00F0120E0A189500FD04E3 /* JSFileList.cpp */,
    1280012810                                BC00F0130E0A189500FD04E3 /* JSFileList.h */,
     12811                                BC97E410109154FA0010D361 /* JSHTMLAllCollection.cpp */,
     12812                                BC97E411109154FA0010D361 /* JSHTMLAllCollection.h */,
    1280112813                                1A4A2DEB0A1B852A00C807F8 /* JSHTMLAnchorElement.cpp */,
    1280212814                                1A4A2DEC0A1B852A00C807F8 /* JSHTMLAnchorElement.h */,
     
    1447614488                                BCDFD4910E3056BD009D10AD /* JSXMLHttpRequestUploadCustom.cpp */,
    1447714489                                BCEFE1E40DCA5F3300739219 /* JSXSLTProcessorCustom.cpp */,
     14490                                BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */,
    1447814491                        );
    1447914492                        name = Custom;
     
    1475714770                                E0FEF371B77C53EAC1C1FBEE /* JSEventSourceConstructor.cpp */,
    1475814771                                E0FEF371B67C53EAC1C1FBEE /* JSEventSourceConstructor.h */,
    14759                                 9350E70C0E87500B00189FFF /* JSHTMLAllCollection.cpp */,
    14760                                 BC6DC7A00C1A4BFA004E2017 /* JSHTMLAllCollection.h */,
    1476114772                                BC6C49F10D7DBA0500FFA558 /* JSImageConstructor.cpp */,
    1476214773                                BC6C49F20D7DBA0500FFA558 /* JSImageConstructor.h */,
     
    1700017011                                FE80DA660E9C4703000D6F75 /* JSGeoposition.h in Headers */,
    1700117012                                BC94D14F0C275C68006BC617 /* JSHistory.h in Headers */,
    17002                                 BC6DC7A10C1A4BFA004E2017 /* JSHTMLAllCollection.h in Headers */,
    1700317013                                1A4A2DF00A1B852A00C807F8 /* JSHTMLAnchorElement.h in Headers */,
    1700417014                                1A4A2DF20A1B852A00C807F8 /* JSHTMLAppletElement.h in Headers */,
     
    1806418074                                973E325710883B7C005BC493 /* ResourceLoadNotifier.h in Headers */,
    1806518075                                84801955108BAFB300CB2B1F /* FEGaussianBlur.h in Headers */,
     18076                                BC97E23A109144950010D361 /* HTMLAllCollection.h in Headers */,
     18077                                BC97E413109154FA0010D361 /* JSHTMLAllCollection.h in Headers */,
    1806618078                        );
    1806718079                        runOnlyForDeploymentPostprocessing = 0;
     
    1916919181                                BC94D14E0C275C68006BC617 /* JSHistory.cpp in Sources */,
    1917019182                                BCE7B1930D4E86960075A539 /* JSHistoryCustom.cpp in Sources */,
    19171                                 9350E70D0E87500B00189FFF /* JSHTMLAllCollection.cpp in Sources */,
    1917219183                                1A4A2DEF0A1B852A00C807F8 /* JSHTMLAnchorElement.cpp in Sources */,
    1917319184                                1A4A2DF10A1B852A00C807F8 /* JSHTMLAppletElement.cpp in Sources */,
     
    2019820209                                973E325610883B7C005BC493 /* ResourceLoadNotifier.cpp in Sources */,
    2019920210                                84801954108BAFB300CB2B1F /* FEGaussianBlur.cpp in Sources */,
     20211                                BC97E23B109144950010D361 /* HTMLAllCollection.cpp in Sources */,
     20212                                BC97E412109154FA0010D361 /* JSHTMLAllCollection.cpp in Sources */,
     20213                                BC97E42C10915B060010D361 /* JSHTMLAllCollectionCustom.cpp in Sources */,
    2020020214                        );
    2020120215                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebCore/bindings/js/JSHTMLCollectionCustom.cpp

    r48595 r49998  
    2424#include "HTMLCollection.h"
    2525#include "HTMLOptionsCollection.h"
     26#include "HTMLAllCollection.h"
    2627#include "JSDOMBinding.h"
    2728#include "JSHTMLAllCollection.h"
     
    144145            break;
    145146        case DocAll:
    146             typedef HTMLCollection HTMLAllCollection;
    147147            wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HTMLAllCollection, collection);
    148148            break;
  • trunk/WebCore/bindings/js/JSHTMLDocumentCustom.cpp

    r49963 r49998  
    2929#include "CharacterNames.h"
    3030#include "Frame.h"
     31#include "HTMLAllCollection.h"
    3132#include "HTMLBodyElement.h"
    3233#include "HTMLCollection.h"
  • trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r49963 r49998  
    293293    my @getOwnPropertySlotImpl = ();
    294294
    295     if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection") {
     295    if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") {
    296296        push(@getOwnPropertySlotImpl, "    ${namespaceMaybe}JSValue proto = prototype();\n");
    297297        push(@getOwnPropertySlotImpl, "    if (proto.isObject() && static_cast<${namespaceMaybe}JSObject*>(asObject(proto))->hasProperty(exec, propertyName))\n");
     
    370370    my @getOwnPropertyDescriptorImpl = ();
    371371   
    372     if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection") {
     372    if ($interfaceName eq "NamedNodeMap" or $interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") {
    373373        push(@getOwnPropertyDescriptorImpl, "    ${namespaceMaybe}JSValue proto = prototype();\n");
    374374        push(@getOwnPropertyDescriptorImpl, "    if (proto.isObject() && static_cast<${namespaceMaybe}JSObject*>(asObject(proto))->hasProperty(exec, propertyName))\n");
     
    658658    # Custom lookupSetter function
    659659    push(@headerContent, "    virtual JSC::JSValue lookupSetter(JSC::ExecState*, const JSC::Identifier& propertyName);\n") if $dataNode->extendedAttributes->{"CustomLookupSetter"};
     660
     661    # Override toBoolean to return false for objects that want to 'MasqueradesAsUndefined'.
     662    if ($dataNode->extendedAttributes->{"MasqueradesAsUndefined"}) {
     663        push(@headerContent, "    virtual bool toBoolean(JSC::ExecState*) const { return false; };\n");
     664        $structureFlags{"JSC::MasqueradesAsUndefined"} = 1;
     665    }
    660666
    661667    # Constructor object getter
     
    17031709        }
    17041710        push(@implContent, "}\n");
    1705         if ($interfaceName eq "HTMLCollection") {
     1711        if ($interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") {
    17061712            $implIncludes{"JSNode.h"} = 1;
    17071713            $implIncludes{"Node.h"} = 1;
     
    17141720        push(@implContent, "    return jsNumber(exec, static_cast<$implClassName*>(impl())->item(index));\n");
    17151721        push(@implContent, "}\n");
    1716         if ($interfaceName eq "HTMLCollection") {
     1722        if ($interfaceName eq "HTMLCollection" or $interfaceName eq "HTMLAllCollection") {
    17171723            $implIncludes{"JSNode.h"} = 1;
    17181724            $implIncludes{"Node.h"} = 1;
  • trunk/WebCore/dom/Document.cpp

    r49992 r49998  
    5959#include "FrameTree.h"
    6060#include "FrameView.h"
     61#include "HTMLAllCollection.h"
    6162#include "HTMLAnchorElement.h"
    6263#include "HTMLBodyElement.h"
     
    39994000}
    40004001
    4001 PassRefPtr<HTMLCollection> Document::all()
    4002 {
    4003     return HTMLCollection::create(this, DocAll);
     4002PassRefPtr<HTMLAllCollection> Document::all()
     4003{
     4004    return HTMLAllCollection::create(this);
    40044005}
    40054006
  • trunk/WebCore/dom/Document.h

    r49963 r49998  
    7272    class HTMLCanvasElement;
    7373    class HTMLCollection;
     74    class HTMLAllCollection;
    7475    class HTMLDocument;
    7576    class HTMLElement;
     
    317318    PassRefPtr<HTMLCollection> forms();
    318319    PassRefPtr<HTMLCollection> anchors();
    319     PassRefPtr<HTMLCollection> all();
    320320    PassRefPtr<HTMLCollection> objects();
    321321    PassRefPtr<HTMLCollection> scripts();
    322322    PassRefPtr<HTMLCollection> windowNamedItems(const String& name);
    323323    PassRefPtr<HTMLCollection> documentNamedItems(const String& name);
     324
     325    PassRefPtr<HTMLAllCollection> all();
    324326
    325327    // Find first anchor with the given name.
  • trunk/WebCore/html/HTMLCollection.h

    r43198 r49998  
    6565protected:
    6666    HTMLCollection(PassRefPtr<Node> base, CollectionType, CollectionCache*);
     67    HTMLCollection(PassRefPtr<Node> base, CollectionType);
    6768
    6869    CollectionCache* info() const { return m_info; }
     
    7273
    7374private:
    74     HTMLCollection(PassRefPtr<Node> base, CollectionType);
    75 
    7675    virtual Element* itemAfter(Element*) const;
    7776    virtual unsigned calcLength() const;
  • trunk/WebCore/html/HTMLCollection.idl

    r42618 r49998  
    3535        [Custom] Node namedItem(in DOMString name);
    3636
    37         // Extensions
     37#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
    3838        NodeList tags(in DOMString name);
     39#endif
    3940    };
    4041
  • trunk/WebCore/html/HTMLDocument.idl

    r43528 r49998  
    4040#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
    4141        // FIXME: This should eventually be available (if they are wanted) for all languages.
    42                  attribute [Custom, Deletable] HTMLCollection all;
     42                 attribute [Custom, Deletable] HTMLAllCollection all;
    4343#endif
    4444
  • trunk/WebCore/page/DOMWindow.idl

    r49989 r49998  
    427427
    428428        attribute HTMLCollectionConstructor HTMLCollection;
     429        attribute HTMLAllCollectionConstructor HTMLAllCollection;
    429430
    430431        attribute [CustomGetter] HTMLImageElementConstructor Image; // Usable with new operator
Note: See TracChangeset for help on using the changeset viewer.