Changeset 63111 in webkit
- Timestamp:
- Jul 12, 2010 1:53:58 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r63109 r63111 1 2010-07-11 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Always generate SVGNames and MathMLNames for all ports (to support HTML5) 6 https://bugs.webkit.org/show_bug.cgi?id=42050 7 8 Historically, FOONames has only been generate when ENABLE(FOO) is defined. 9 However, for HTML5 parser support, we need to have access to the SVG 10 and MathML tag names regardless of whether we the engine is configured 11 to render SVG or MathML content. 12 13 This change enables generation of SVGNames and MathMLNames on all ports and 14 makes it so that ports can include FOOElementFactory.* regardless of whether 15 ENABLE(FOO) is defined (and have it do the right thing). 16 17 No functional change (yet) so no tests. 18 19 * DerivedSources.make: 20 * GNUmakefile.am: 21 * WebCore.gyp/WebCore.gyp: 22 * WebCore.pri: 23 * dom/make_names.pl: 24 1 25 2010-07-10 Eric Seidel <eric@webkit.org> 2 26 -
trunk/WebCore/DerivedSources.make
r63064 r63111 715 715 # SVG tag and attribute names, and element factory 716 716 717 ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)718 719 717 ifeq ($(findstring ENABLE_SVG_USE,$(FEATURE_DEFINES)), ENABLE_SVG_USE) 720 718 SVG_FLAGS := $(SVG_FLAGS) ENABLE_SVG_USE=1 … … 759 757 perl -I $(WebCore)/bindings/scripts $< --attrs $(WebCore)/svg/xlinkattrs.in 760 758 761 else762 763 SVGElementFactory.cpp :764 echo > $@765 766 SVGNames.cpp :767 echo > $@768 769 XLinkNames.cpp :770 echo > $@771 772 # This file is autogenerated by make_names.pl when SVG is enabled.773 774 JSSVGElementWrapperFactory.cpp :775 echo > $@776 777 endif778 779 759 # -------- 780 760 … … 800 780 # MathML tag and attribute names, and element factory 801 781 802 ifeq ($(findstring ENABLE_MATHML,$(FEATURE_DEFINES)), ENABLE_MATHML)803 804 782 MathMLElementFactory.cpp MathMLNames.cpp : dom/make_names.pl mathml/mathtags.in mathml/mathattrs.in 805 783 perl -I $(WebCore)/bindings/scripts $< --tags $(WebCore)/mathml/mathtags.in --attrs $(WebCore)/mathml/mathattrs.in --factory --wrapperFactory 806 807 else808 809 MathMLElementFactory.cpp :810 echo > $@811 812 MathMLNames.cpp :813 echo > $@814 815 endif816 817 818 784 819 785 # -------- -
trunk/WebCore/GNUmakefile.am
r63050 r63111 3137 3137 WebCore/mathml/RenderMathMLUnderOver.h 3138 3138 3139 endif # END ENABLE_MATHML 3140 3139 3141 webcore_built_sources += \ 3140 3142 DerivedSources/WebCore/MathMLElementFactory.cpp \ … … 3150 3152 DerivedSources/WebCore/MathMLElementFactory.cpp DerivedSources/WebCore/MathMLNames.cpp: $(WebCore)/dom/make_names.pl $(WebCore)/mathml/mathtags.in $(WebCore)/mathml/mathattrs.in 3151 3153 $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --tags $(WebCore)/mathml/mathtags.in --attrs $(WebCore)/mathml/mathattrs.in --factory --wrapperFactory --outputDir "$(GENSOURCES_WEBCORE)" 3152 else 3153 DerivedSources/WebCore/MathMLElementFactory.cpp: 3154 echo > $@ 3155 3156 DerivedSources/WebCore/MathMLNames.cpp: 3157 echo > $@ 3158 3159 endif # END ENABLE_MATHML 3154 3160 3155 3161 3156 # ---- … … 3188 3183 WEBCORE_CSS_PROPERTY_NAMES += $(WebCore)/css/SVGCSSPropertyNames.in 3189 3184 WEBCORE_CSS_VALUE_KEYWORDS += $(WebCore)/css/SVGCSSValueKeywords.in 3190 3191 webcore_built_sources += \3192 DerivedSources/WebCore/JSSVGElementWrapperFactory.cpp \3193 DerivedSources/WebCore/SVGElementFactory.cpp \3194 DerivedSources/WebCore/SVGNames.cpp \3195 DerivedSources/WebCore/XLinkNames.cpp3196 3185 3197 3186 IDL_BINDINGS += \ … … 3801 3790 endif 3802 3791 3792 endif # END ENABLE_SVG 3793 3794 webcore_built_sources += \ 3795 DerivedSources/WebCore/JSSVGElementWrapperFactory.cpp \ 3796 DerivedSources/WebCore/SVGElementFactory.cpp \ 3797 DerivedSources/WebCore/SVGNames.cpp \ 3798 DerivedSources/WebCore/XLinkNames.cpp 3799 3803 3800 # SVG tag and attribute names (need to pass an extra flag if svg experimental features are enabled) 3804 3801 DerivedSources/WebCore/SVGNames.cpp: DerivedSources/WebCore/SVGElementFactory.cpp; … … 3820 3817 DerivedSources/WebCore/XLinkNames.cpp : $(WebCore)/dom/make_names.pl $(WebCore)/svg/xlinkattrs.in 3821 3818 $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/svg/xlinkattrs.in --outputDir "$(GENSOURCES_WEBCORE)" 3822 3823 endif # END ENABLE_SVG3824 3819 3825 3820 # ---- -
trunk/WebCore/WebCore.gyp/WebCore.gyp
r62793 r63111 389 389 }, 390 390 { 391 'action_name': 'MathMLNames', 392 'inputs': [ 393 '../dom/make_names.pl', 394 '../mathml/mathtags.in', 395 '../mathml/mathattrs.in', 396 ], 397 'outputs': [ 398 '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp', 399 '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.h', 400 ], 401 'action': [ 402 'python', 403 'scripts/action_makenames.py', 404 '<@(_outputs)', 405 '--', 406 '<@(_inputs)', 407 '--', 408 '--extraDefines', '<(feature_defines)' 409 ], 410 }, 411 { 391 412 'action_name': 'UserAgentStyleSheets', 392 413 'inputs': [ … … 686 707 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNSNames.cpp', 687 708 '<(SHARED_INTERMEDIATE_DIR)/webkit/XMLNames.cpp', 709 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp', 710 '<(SHARED_INTERMEDIATE_DIR)/webkit/MathMLNames.cpp', 688 711 689 712 # Additional .cpp files from the webcore_bindings_sources rules. … … 710 733 'sources': [ 711 734 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp', 712 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp',713 735 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp', 714 736 ], -
trunk/WebCore/WebCore.pri
r63064 r63111 667 667 INSPECTOR_INTERFACES = inspector/InspectorFrontend2.idl 668 668 669 contains(DEFINES, ENABLE_MATHML=1) { 670 mathmlnames.output = $${WC_GENERATED_SOURCES_DIR}/MathMLNames.cpp 671 mathmlnames.input = MATHML_NAMES 672 mathmlnames.wkScript = $$PWD/dom/make_names.pl 673 mathmlnames.commands = perl -I$$PWD/bindings/scripts $$mathmlnames.wkScript --tags $$PWD/mathml/mathtags.in --attrs $$PWD/mathml/mathattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR 674 mathmlnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/MathMLElementFactory.cpp 675 addExtraCompiler(mathmlnames) 676 } 669 mathmlnames.output = $${WC_GENERATED_SOURCES_DIR}/MathMLNames.cpp 670 mathmlnames.input = MATHML_NAMES 671 mathmlnames.wkScript = $$PWD/dom/make_names.pl 672 mathmlnames.commands = perl -I$$PWD/bindings/scripts $$mathmlnames.wkScript --tags $$PWD/mathml/mathtags.in --attrs $$PWD/mathml/mathattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR 673 mathmlnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/MathMLElementFactory.cpp 674 addExtraCompiler(mathmlnames) 677 675 678 676 contains(DEFINES, ENABLE_WML=1) { … … 685 683 } 686 684 687 contains(DEFINES, ENABLE_SVG=1) { 688 # GENERATOR 5-C: 689 svgnames.output = $${WC_GENERATED_SOURCES_DIR}/SVGNames.cpp 690 svgnames.input = SVG_NAMES 691 svgnames.depends = $$PWD/svg/svgattrs.in 692 svgnames.wkScript = $$PWD/dom/make_names.pl 693 svgnames.commands = perl -I$$PWD/bindings/scripts $$svgnames.wkScript --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR 694 svgnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/SVGElementFactory.cpp $${WC_GENERATED_SOURCES_DIR}/JSSVGElementWrapperFactory.cpp 695 addExtraCompiler(svgnames) 696 } 685 # GENERATOR 5-C: 686 svgnames.output = $${WC_GENERATED_SOURCES_DIR}/SVGNames.cpp 687 svgnames.input = SVG_NAMES 688 svgnames.depends = $$PWD/svg/svgattrs.in 689 svgnames.wkScript = $$PWD/dom/make_names.pl 690 svgnames.commands = perl -I$$PWD/bindings/scripts $$svgnames.wkScript --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR 691 svgnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/SVGElementFactory.cpp $${WC_GENERATED_SOURCES_DIR}/JSSVGElementWrapperFactory.cpp 692 addExtraCompiler(svgnames) 697 693 698 694 # GENERATOR 5-D: -
trunk/WebCore/dom/make_names.pl
r63109 r63111 338 338 my %tagConstructorMap = %$tagConstructorMapRef; 339 339 340 print F "#if $parameters{guardFactoryWith}\n" if $parameters{guardFactoryWith};341 342 340 # This is to avoid generating the same constructor several times. 343 341 my %uniqueTags = (); … … 373 371 } 374 372 } 375 376 print F "#endif\n" if $parameters{guardFactoryWith};377 373 } 378 374 … … 653 649 #include "config.h" 654 650 #include "$parameters{namespace}ElementFactory.h" 655 656 651 #include "$parameters{namespace}Names.h" 657 652 END 658 653 ; 654 655 print F "\n#if $parameters{guardFactoryWith}\n\n" if $parameters{guardFactoryWith}; 659 656 660 657 printElementIncludes($F); … … 690 687 printConstructors($F, \%tagConstructorMap); 691 688 692 print F "#if $parameters{guardFactoryWith}\n" if $parameters{guardFactoryWith};693 694 689 print F <<END 695 690 static void addTag(const QualifiedName& tag, ConstructorFunction func) … … 712 707 713 708 print F "}\n"; 714 print F "#endif\n" if $parameters{guardFactoryWith};715 709 716 710 print F "\nPassRefPtr<$parameters{namespace}Element> $parameters{namespace}ElementFactory::create$parameters{namespace}Element(const QualifiedName& qName, Document* document"; 717 711 print F ", HTMLFormElement* formElement" if $parameters{namespace} eq "HTML"; 718 712 print F ", bool createdByParser)\n{\n"; 719 720 print F "#if $parameters{guardFactoryWith}\n" if $parameters{guardFactoryWith};721 713 722 714 print F <<END … … 754 746 print F " return $parameters{namespace}Element::create(qName, document);\n"; 755 747 756 if ($parameters{guardFactoryWith}) {757 758 748 print F <<END 759 #else760 return 0;761 #endif762 END763 ;764 765 }766 767 print F <<END768 749 } 769 750 … … 772 753 END 773 754 ; 755 756 print F "#endif\n" if $parameters{guardFactoryWith}; 774 757 775 758 close F; … … 815 798 print F " static PassRefPtr<$parameters{namespace}Element> create$parameters{namespace}Element(const WebCore::QualifiedName&, WebCore::Document*"; 816 799 print F ", HTMLFormElement* = 0" if $parameters{namespace} eq "HTML"; 817 print F ", bool /*createdByParser*/= true);\n";800 print F ", bool createdByParser = true);\n"; 818 801 819 802 printf F<<END … … 924 907 printLicenseHeader($F); 925 908 926 print F "#include \"config.h\"\n\n"; 927 928 print F "#if $parameters{guardFactoryWith}\n\n" if $parameters{guardFactoryWith}; 929 909 print F "#include \"config.h\"\n"; 930 910 print F "#include \"$wrapperFactoryType$parameters{namespace}ElementWrapperFactory.h\"\n"; 911 912 print F "\n#if $parameters{guardFactoryWith}\n\n" if $parameters{guardFactoryWith}; 931 913 932 914 printJSElementIncludes($F, $wrapperFactoryType);
Note: See TracChangeset
for help on using the changeset viewer.