Changeset 92890 in webkit
- Timestamp:
- Aug 11, 2011 4:35:29 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r92885 r92890 1 2011-08-11 Tom Zakrajsek <tomz@codeaurora.org> 2 3 Created tests for HTMLUnknownElement interface. 4 https://bugs.webkit.org/show_bug.cgi?id=41841. 5 6 Reviewed by Adam Barth. 7 8 * fast/dom/prototype-inheritance-expected.txt: 9 * fast/html/unknown-tag.html: Added. 10 * platform/chromium/fast/dom/prototype-inheritance-expected.txt: 11 * platform/gtk/fast/dom/prototype-inheritance-expected.txt: 12 * platform/qt/fast/dom/prototype-inheritance-expected.txt: 13 * platform/win/fast/dom/prototype-inheritance-expected.txt: 14 1 15 2011-08-11 Adam Barth <abarth@webkit.org> 2 16 -
trunk/LayoutTests/fast/dom/prototype-inheritance-expected.txt
r91340 r92890 242 242 PASS inner.HTMLUListElement.isInner is true 243 243 PASS inner.HTMLUListElement.constructor.isInner is true 244 PASS inner.HTMLUnknownElement.isInner is true 245 PASS inner.HTMLUnknownElement.constructor.isInner is true 244 246 PASS inner.HTMLVideoElement.isInner is true 245 247 PASS inner.HTMLVideoElement.constructor.isInner is true -
trunk/LayoutTests/platform/chromium/fast/dom/prototype-inheritance-expected.txt
r92304 r92890 242 242 PASS inner.HTMLUListElement.isInner is true 243 243 PASS inner.HTMLUListElement.constructor.isInner is true 244 PASS inner.HTMLUnknownElement.isInner is true 245 PASS inner.HTMLUnknownElement.constructor.isInner is true 244 246 PASS inner.HTMLVideoElement.isInner is true 245 247 PASS inner.HTMLVideoElement.constructor.isInner is true -
trunk/LayoutTests/platform/gtk/fast/dom/prototype-inheritance-expected.txt
r92368 r92890 242 242 PASS inner.HTMLUListElement.isInner is true 243 243 PASS inner.HTMLUListElement.constructor.isInner is true 244 PASS inner.HTMLUnknownElement.isInner is true 245 PASS inner.HTMLUnknownElement.constructor.isInner is true 244 246 PASS inner.HTMLVideoElement.isInner is true 245 247 PASS inner.HTMLVideoElement.constructor.isInner is true -
trunk/LayoutTests/platform/qt/fast/dom/prototype-inheritance-expected.txt
r89732 r92890 242 242 PASS inner.HTMLUListElement.isInner is true 243 243 PASS inner.HTMLUListElement.constructor.isInner is true 244 PASS inner.HTMLUnknownElement.isInner is true 245 PASS inner.HTMLUnknownElement.constructor.isInner is true 244 246 PASS inner.HTMLVideoElement.isInner is true 245 247 PASS inner.HTMLVideoElement.constructor.isInner is true -
trunk/LayoutTests/platform/win/fast/dom/prototype-inheritance-expected.txt
r91342 r92890 240 240 PASS inner.HTMLUListElement.isInner is true 241 241 PASS inner.HTMLUListElement.constructor.isInner is true 242 PASS inner.HTMLUnknownElement.isInner is true 243 PASS inner.HTMLUnknownElement.constructor.isInner is true 242 244 PASS inner.HTMLVideoElement.isInner is true 243 245 PASS inner.HTMLVideoElement.constructor.isInner is true -
trunk/Source/WebCore/CMakeLists.txt
r92796 r92890 269 269 html/HTMLTrackElement.idl 270 270 html/HTMLUListElement.idl 271 html/HTMLUnknownElement.idl 271 272 html/HTMLVideoElement.idl 272 273 html/ImageData.idl -
trunk/Source/WebCore/ChangeLog
r92888 r92890 1 2011-08-11 Tom Zakrajsek <tomz@codeaurora.org> 2 3 Add HTMLUnknownElement interface as defined in 4 http://www.w3.org/TR/html5/elements.html#elements-in-the-dom. 5 https://bugs.webkit.org/show_bug.cgi?id=41841 6 7 Reviewed by Adam Barth. 8 9 Test: fast/html/unknown-tag.html 10 11 * CMakeLists.txt: 12 * CodeGenerators.pri: 13 * DerivedSources.cpp: 14 * DerivedSources.make: 15 * GNUmakefile.list.am: 16 * WebCore.gypi: 17 * WebCore.vcproj/WebCore.vcproj: 18 * WebCore.xcodeproj/project.pbxproj: 19 * bindings/scripts/CodeGeneratorV8.pm: 20 (IsDOMNodeType): 21 * dom/make_names.pl: 22 (defaultParametersHash): 23 (buildConstructorMap): 24 (printJSElementIncludes): 25 (printElementIncludes): 26 (printWrapperFunctions): 27 (printWrapperFactoryCppFile): 28 * html/HTMLTagNames.in: 29 * html/HTMLUnknownElement.h: Added. 30 (WebCore::HTMLUnknownElement::create): 31 (WebCore::HTMLUnknownElement::HTMLUnknownElement): 32 * html/HTMLUnknownElement.idl: Added. 33 * mathml/mathtags.in: 34 * page/DOMWindow.idl: 35 * svg/svgtags.in: 36 1 37 2011-08-11 Levi Weintraub <leviw@chromium.org> 2 38 -
trunk/Source/WebCore/CodeGenerators.pri
r92365 r92890 312 312 html/HTMLTrackElement.idl \ 313 313 html/HTMLUListElement.idl \ 314 html/HTMLUnknownElement.idl \ 314 315 html/HTMLVideoElement.idl \ 315 316 html/ImageData.idl \ -
trunk/Source/WebCore/DerivedSources.cpp
r92365 r92890 205 205 #include "JSHTMLTextAreaElement.cpp" 206 206 #include "JSHTMLTitleElement.cpp" 207 #include "JSHTMLUnknownElement.cpp" 207 208 #include "JSHTMLUListElement.cpp" 208 209 #include "JSHTMLVideoElement.cpp" -
trunk/Source/WebCore/DerivedSources.make
r92365 r92890 279 279 HTMLTrackElement \ 280 280 HTMLUListElement \ 281 HTMLUnknownElement \ 281 282 HTMLVideoElement \ 282 283 IDBAny \ -
trunk/Source/WebCore/GNUmakefile.list.am
r92848 r92890 326 326 DerivedSources/WebCore/JSHTMLTrackElement.cpp \ 327 327 DerivedSources/WebCore/JSHTMLTrackElement.h \ 328 DerivedSources/WebCore/JSHTMLUnknownElement.cpp \ 329 DerivedSources/WebCore/JSHTMLUnknownElement.h \ 328 330 DerivedSources/WebCore/JSHTMLUListElement.cpp \ 329 331 DerivedSources/WebCore/JSHTMLUListElement.h \ … … 1790 1792 Source/WebCore/html/HTMLTrackElement.cpp \ 1791 1793 Source/WebCore/html/HTMLTrackElement.h \ 1794 Source/WebCore/html/HTMLUnknownElement.h \ 1792 1795 Source/WebCore/html/HTMLUListElement.cpp \ 1793 1796 Source/WebCore/html/HTMLUListElement.h \ -
trunk/Source/WebCore/WebCore.gypi
r92795 r92890 415 415 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSElement.h', 416 416 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSHTMLElement.h', 417 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSHTMLUnknownElement.h', 417 418 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSNode.h', 418 419 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSNodeList.h', … … 1312 1313 'html/HTMLTrackElement.idl', 1313 1314 'html/HTMLUListElement.idl', 1315 'html/HTMLUnknownElement.idl', 1314 1316 'html/HTMLVideoElement.idl', 1315 1317 'html/ImageData.idl', … … 5631 5633 'html/HTMLUListElement.cpp', 5632 5634 'html/HTMLUListElement.h', 5635 'html/HTMLUnknownElement.h', 5633 5636 'html/HTMLVideoElement.cpp', 5634 5637 'html/HTMLVideoElement.h', … … 7495 7498 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSHTMLUListElement.cpp', 7496 7499 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSHTMLUListElement.h', 7500 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSHTMLUnknownElement.cpp', 7501 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSHTMLUnknownElement.h', 7497 7502 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSHTMLVideoElement.cpp', 7498 7503 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSHTMLVideoElement.h', -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r92709 r92890 6659 6659 </File> 6660 6660 <File 6661 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSHTMLUnknownElement.cpp" 6662 > 6663 <FileConfiguration 6664 Name="Debug|Win32" 6665 ExcludedFromBuild="true" 6666 > 6667 <Tool 6668 Name="VCCLCompilerTool" 6669 /> 6670 </FileConfiguration> 6671 <FileConfiguration 6672 Name="Release|Win32" 6673 ExcludedFromBuild="true" 6674 > 6675 <Tool 6676 Name="VCCLCompilerTool" 6677 /> 6678 </FileConfiguration> 6679 <FileConfiguration 6680 Name="Debug_Cairo_CFLite|Win32" 6681 ExcludedFromBuild="true" 6682 > 6683 <Tool 6684 Name="VCCLCompilerTool" 6685 /> 6686 </FileConfiguration> 6687 <FileConfiguration 6688 Name="Release_Cairo_CFLite|Win32" 6689 ExcludedFromBuild="true" 6690 > 6691 <Tool 6692 Name="VCCLCompilerTool" 6693 /> 6694 </FileConfiguration> 6695 <FileConfiguration 6696 Name="Debug_All|Win32" 6697 ExcludedFromBuild="true" 6698 > 6699 <Tool 6700 Name="VCCLCompilerTool" 6701 /> 6702 </FileConfiguration> 6703 <FileConfiguration 6704 Name="Production|Win32" 6705 ExcludedFromBuild="true" 6706 > 6707 <Tool 6708 Name="VCCLCompilerTool" 6709 /> 6710 </FileConfiguration> 6711 </File> 6712 <File 6661 6713 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSHTMLElement.h" 6662 6714 > 6663 6715 </File> 6664 6716 <File 6717 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSHTMLUnknownElement.h" 6718 > 6719 </File> 6720 <File 6665 6721 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSHTMLElementWrapperFactory.cpp" 6666 6722 > … … 6713 6769 /> 6714 6770 </FileConfiguration> 6771 </File> 6772 <File 6773 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSHTMLUnknownElement.h" 6774 > 6715 6775 </File> 6716 6776 <File -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r92709 r92890 1672 1672 6E47E66010B7944B00B186C8 /* WebGLGetInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E47E65E10B7944B00B186C8 /* WebGLGetInfo.cpp */; }; 1673 1673 6E47E66110B7944B00B186C8 /* WebGLGetInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E47E65F10B7944B00B186C8 /* WebGLGetInfo.h */; }; 1674 6E4ABCD4138EA0B70071D291 /* JSHTMLUnknownElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E4ABCD2138EA0B70071D291 /* JSHTMLUnknownElement.cpp */; }; 1675 6E4ABCD5138EA0B70071D291 /* JSHTMLUnknownElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4ABCD3138EA0B70071D291 /* JSHTMLUnknownElement.h */; }; 1674 1676 6E4E91AC10F7FB3100A2779C /* CanvasContextAttributes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E4E91A710F7FB3100A2779C /* CanvasContextAttributes.cpp */; }; 1675 1677 6E4E91AD10F7FB3100A2779C /* CanvasContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4E91A810F7FB3100A2779C /* CanvasContextAttributes.h */; }; … … 8303 8305 6E47E65E10B7944B00B186C8 /* WebGLGetInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLGetInfo.cpp; path = canvas/WebGLGetInfo.cpp; sourceTree = "<group>"; }; 8304 8306 6E47E65F10B7944B00B186C8 /* WebGLGetInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLGetInfo.h; path = canvas/WebGLGetInfo.h; sourceTree = "<group>"; }; 8307 6E4ABCD2138EA0B70071D291 /* JSHTMLUnknownElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLUnknownElement.cpp; sourceTree = "<group>"; }; 8308 6E4ABCD3138EA0B70071D291 /* JSHTMLUnknownElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLUnknownElement.h; sourceTree = "<group>"; }; 8305 8309 6E4E91A710F7FB3100A2779C /* CanvasContextAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CanvasContextAttributes.cpp; path = canvas/CanvasContextAttributes.cpp; sourceTree = "<group>"; }; 8306 8310 6E4E91A810F7FB3100A2779C /* CanvasContextAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanvasContextAttributes.h; path = canvas/CanvasContextAttributes.h; sourceTree = "<group>"; }; … … 16851 16855 1A85B20E0A1B258700D8C87C /* JSHTMLUListElement.cpp */, 16852 16856 1A85B20F0A1B258700D8C87C /* JSHTMLUListElement.h */, 16857 6E4ABCD2138EA0B70071D291 /* JSHTMLUnknownElement.cpp */, 16858 6E4ABCD3138EA0B70071D291 /* JSHTMLUnknownElement.h */, 16853 16859 E446140E0CD6826900FADA75 /* JSHTMLVideoElement.cpp */, 16854 16860 E446140F0CD6826900FADA75 /* JSHTMLVideoElement.h */, … … 21989 21995 A80E7B0C0A19D606007FB8C5 /* JSHTMLTitleElement.h in Headers */, 21990 21996 1A85B2110A1B258700D8C87C /* JSHTMLUListElement.h in Headers */, 21997 6E4ABCD5138EA0B70071D291 /* JSHTMLUnknownElement.h in Headers */, 21991 21998 E44614170CD6826900FADA75 /* JSHTMLVideoElement.h in Headers */, 21992 21999 C585A67D11D4FB08004C3E4B /* JSIDBAny.h in Headers */, … … 24967 24974 A80E7B130A19D606007FB8C5 /* JSHTMLTitleElement.cpp in Sources */, 24968 24975 1A85B2100A1B258700D8C87C /* JSHTMLUListElement.cpp in Sources */, 24976 6E4ABCD4138EA0B70071D291 /* JSHTMLUnknownElement.cpp in Sources */, 24969 24977 E44614160CD6826900FADA75 /* JSHTMLVideoElement.cpp in Sources */, 24970 24978 C585A67C11D4FB08004C3E4B /* JSIDBAny.cpp in Sources */, -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r92747 r92890 3181 3181 return 1 if $type eq 'HTMLDocument'; 3182 3182 return 1 if $type eq 'HTMLElement'; 3183 return 1 if $type eq 'HTMLUnknownElement'; 3183 3184 return 1 if $type eq 'HTMLFormElement'; 3184 3185 return 1 if $type eq 'HTMLTableCaptionElement'; -
trunk/Source/WebCore/dom/make_names.pl
r84820 r92890 147 147 'guardFactoryWith' => '', 148 148 'tagsNullNamespace' => 0, 149 'attrsNullNamespace' => 0 149 'attrsNullNamespace' => 0, 150 'fallbackInterfaceName' => '' 150 151 ); 151 152 } … … 269 270 } 270 271 271 # Build a direct mapping from the tags to the Element to create, excluding 272 # Element that have not constructor. 272 # Build a direct mapping from the tags to the Element to create. 273 273 sub buildConstructorMap 274 274 { … … 276 276 for my $tagName (keys %enabledTags) { 277 277 my $interfaceName = $enabledTags{$tagName}{interfaceName}; 278 next if (usesDefaultWrapper($interfaceName));279 278 280 279 if ($enabledTags{$tagName}{mapToTagName}) { … … 606 605 print F "#include \"${wrapperFactoryType}${JSInterfaceName}.h\"\n"; 607 606 } 607 print F "#include \"${wrapperFactoryType}$parameters{fallbackInterfaceName}.h\"\n"; 608 608 } 609 609 … … 624 624 print F "#include \"${interfaceName}.h\"\n"; 625 625 } 626 print F "#include \"$parameters{fallbackInterfaceName}.h\"\n"; 626 627 } 627 628 … … 763 764 print F "}\n"; 764 765 766 765 767 print F "\nPassRefPtr<$parameters{namespace}Element> $parameters{namespace}ElementFactory::create$parameters{namespace}Element(const QualifiedName& qName, Document* document"; 766 768 print F ", HTMLFormElement* formElement" if $parameters{namespace} eq "HTML"; … … 799 801 } 800 802 801 print F " return $parameters{ namespace}Element::create(qName, document);\n";803 print F " return $parameters{fallbackInterfaceName}::create(qName, document);\n"; 802 804 803 805 print F <<END … … 886 888 # Avoid defining the same wrapper method twice. 887 889 my $JSInterfaceName = $enabledTags{$tagName}{JSInterfaceName}; 888 next if defined($tagsSeen{$JSInterfaceName}) || usesDefaultJSWrapper($tagName);890 next if defined($tagsSeen{$JSInterfaceName}) || (usesDefaultJSWrapper($tagName) && ($parameters{fallbackInterfaceName} eq $parameters{namespace} . "Element")); 889 891 $tagsSeen{$JSInterfaceName} = 1; 890 892 … … 933 935 END 934 936 ; 935 } else { 937 } elsif (${JSInterfaceName} eq "HTMLElement") { 938 print F <<END 939 static v8::Handle<v8::Value> create${JSInterfaceName}Wrapper($parameters{namespace}Element* element) 940 { 941 return V8$parameters{namespace}Element::wrap(element); 942 } 943 944 END 945 ; 946 } else { 936 947 print F <<END 937 948 static v8::Handle<v8::Value> create${JSInterfaceName}Wrapper($parameters{namespace}Element* element) … … 1047 1058 for my $tag (sort keys %enabledTags) { 1048 1059 # Do not add the name to the map if it does not have a JS wrapper constructor or uses the default wrapper. 1049 next if usesDefaultJSWrapper($tag, \%enabledTags);1060 next if (usesDefaultJSWrapper($tag, \%enabledTags) && ($parameters{fallbackInterfaceName} eq $parameters{namespace} . "Element")); 1050 1061 1051 1062 my $conditional = $enabledTags{$tag}{conditional}; … … 1072 1083 print F <<END 1073 1084 return createWrapperFunction(exec, globalObject, element); 1074 return CREATE_DOM_WRAPPER(exec, globalObject, $parameters{ namespace}Element, element.get());1085 return CREATE_DOM_WRAPPER(exec, globalObject, $parameters{fallbackInterfaceName}, element.get()); 1075 1086 END 1076 1087 ; … … 1078 1089 print F <<END 1079 1090 return createWrapperFunction(element); 1080 return V8$parameters{ namespace}Element::wrap(element, forceNewObject);1091 return V8$parameters{fallbackInterfaceName}::wrap(static_cast<$parameters{fallbackInterfaceName}*>(element), forceNewObject); 1081 1092 END 1082 1093 ; -
trunk/Source/WebCore/html/HTMLTagNames.in
r84991 r92890 2 2 namespacePrefix="xhtml" 3 3 namespaceURI="http://www.w3.org/1999/xhtml" 4 fallbackInterfaceName="HTMLUnknownElement" 4 5 5 6 a interfaceName=HTMLAnchorElement -
trunk/Source/WebCore/mathml/mathtags.in
r70221 r92890 2 2 namespaceURI="http://www.w3.org/1998/Math/MathML" 3 3 guardFactoryWith="ENABLE(MATHML)" 4 fallbackInterfaceName="MathMLElement" 4 5 5 6 math -
trunk/Source/WebCore/page/DOMWindow.idl
r92392 r92890 483 483 attribute HTMLCollectionConstructor HTMLCollection; 484 484 attribute HTMLAllCollectionConstructor HTMLAllCollection; 485 attribute HTMLUnknownElementConstructor HTMLUnknownElement; 485 486 486 487 attribute [CustomGetter] HTMLImageElementConstructor Image; // Usable with new operator -
trunk/Source/WebCore/svg/svgtags.in
r91331 r92890 2 2 namespaceURI="http://www.w3.org/2000/svg" 3 3 guardFactoryWith="ENABLE(SVG)" 4 fallbackInterfaceName="SVGElement" 4 5 5 6 a
Note: See TracChangeset
for help on using the changeset viewer.