Changeset 130962 in webkit
- Timestamp:
- Oct 10, 2012 2:33:01 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 11 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r130937 r130962 1 2012-10-10 Tony Chang <tony@chromium.org> 2 3 Unreviewed, rolling out r130937, r130949, r130955, and 4 r130957. 5 http://trac.webkit.org/changeset/130937 6 http://trac.webkit.org/changeset/130949 7 http://trac.webkit.org/changeset/130955 8 http://trac.webkit.org/changeset/130957 9 https://bugs.webkit.org/show_bug.cgi?id=94290 10 11 Breaks Qt build 12 13 * Source/cmake/WebKitMacros.cmake: 14 1 15 2012-10-10 Pablo Flouret <pablof@motorola.com> 2 16 -
trunk/Source/WebCore/CMakeLists.txt
r130947 r130962 2860 2860 2861 2861 2862 GENERATE_GRAMMAR(cssyy ${WEBCORE_DIR}/css/CSSGrammar.y .in ${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.h ${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.cpp ${WEBCORE_DIR}/css/CSSGrammar.y.includes "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")2862 GENERATE_GRAMMAR(cssyy ${WEBCORE_DIR}/css/CSSGrammar.y ${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.h ${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.cpp) 2863 2863 LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSGrammar.cpp) 2864 2864 2865 2865 2866 GENERATE_GRAMMAR(xpathyy ${WEBCORE_DIR}/xml/XPathGrammar.y ${DERIVED_SOURCES_WEBCORE_DIR}/XPathGrammar.h ${DERIVED_SOURCES_WEBCORE_DIR}/XPathGrammar.cpp "" "")2866 GENERATE_GRAMMAR(xpathyy ${WEBCORE_DIR}/xml/XPathGrammar.y ${DERIVED_SOURCES_WEBCORE_DIR}/XPathGrammar.h ${DERIVED_SOURCES_WEBCORE_DIR}/XPathGrammar.cpp) 2867 2867 LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XPathGrammar.cpp) 2868 2868 -
trunk/Source/WebCore/ChangeLog
r130960 r130962 1 2012-10-10 Tony Chang <tony@chromium.org> 2 3 Unreviewed, rolling out r130937, r130949, r130955, and 4 r130957. 5 http://trac.webkit.org/changeset/130937 6 http://trac.webkit.org/changeset/130949 7 http://trac.webkit.org/changeset/130955 8 http://trac.webkit.org/changeset/130957 9 https://bugs.webkit.org/show_bug.cgi?id=94290 10 11 Breaks Qt build 12 13 * CMakeLists.txt: 14 * DerivedSources.make: 15 * DerivedSources.pri: 16 * GNUmakefile.am: 17 * WebCore.gyp/WebCore.gyp: 18 * WebCore.gyp/scripts/action_preprocessgrammar.py: Removed. 19 * WebCore.vcproj/WebCore.vcproj: 20 * WebCore.xcodeproj/project.pbxproj: 21 * css/CSSGrammar.y: Renamed from Source/WebCore/css/CSSGrammar.y.in. 22 * css/CSSGrammar.y.includes: Removed. 23 * css/makegrammar.pl: 24 1 25 2012-10-10 Rob Buis <rbuis@rim.com> 2 26 -
trunk/Source/WebCore/DerivedSources.make
r130937 r130962 780 780 781 781 # CSS grammar 782 CSSGrammar.cpp : css/CSSGrammar.y.in 783 perl $(WebCore)/css/makegrammar.pl --grammar $< --extraDefines "$(FEATURE_DEFINES)" --outputDir . --symbolsPrefix cssyy 782 # NOTE: Older versions of bison do not inject an inclusion guard, so we add one. 783 784 CSSGrammar.cpp : css/CSSGrammar.y 785 $(BISON) -d -p cssyy $< -o $@ 786 touch CSSGrammar.cpp.h 787 touch CSSGrammar.hpp 788 echo '#ifndef CSSGrammar_h' > CSSGrammar.h 789 echo '#define CSSGrammar_h' >> CSSGrammar.h 790 cat CSSGrammar.cpp.h CSSGrammar.hpp >> CSSGrammar.h 791 echo '#endif' >> CSSGrammar.h 792 rm -f CSSGrammar.cpp.h CSSGrammar.hpp 784 793 785 794 # -------- 786 795 787 796 # XPath grammar 797 # NOTE: Older versions of bison do not inject an inclusion guard, so we add one. 798 788 799 XPathGrammar.cpp : xml/XPathGrammar.y $(PROJECT_FILE) 789 perl $(WebCore)/css/makegrammar.pl --grammar $< --outputDir . --symbolsPrefix xpathyy 800 $(BISON) -d -p xpathyy $< -o $@ 801 touch XPathGrammar.cpp.h 802 touch XPathGrammar.hpp 803 echo '#ifndef XPathGrammar_h' > XPathGrammar.h 804 echo '#define XPathGrammar_h' >> XPathGrammar.h 805 cat XPathGrammar.cpp.h XPathGrammar.hpp >> XPathGrammar.h 806 echo '#endif' >> XPathGrammar.h 807 rm -f XPathGrammar.cpp.h XPathGrammar.hpp 790 808 791 809 # -------- -
trunk/Source/WebCore/DerivedSources.pri
r130957 r130962 25 25 XLINK_NAMES = $$PWD/svg/xlinkattrs.in 26 26 27 CSSBISON = $$PWD/css/CSSGrammar.y .in27 CSSBISON = $$PWD/css/CSSGrammar.y 28 28 29 29 enable?(XSLT) { … … 805 805 cssbison.input = CSSBISON 806 806 cssbison.script = $$PWD/css/makegrammar.pl 807 cssbison.commands = perl $$cssbison.script --grammar $$PWD/css/CSSGrammar.y.in --preprocessor \"$${QMAKE_MOC} -E\" --outputDir ${QMAKE_FUNC_FILE_OUT_PATH} --extraDefines \"$${DEFINES} $$configDefines()\" --symbolsPrefix cssyy807 cssbison.commands = perl $$cssbison.script ${QMAKE_FILE_NAME} ${QMAKE_FUNC_FILE_OUT_PATH}/${QMAKE_FILE_BASE} 808 808 cssbison.depends = ${QMAKE_FILE_NAME} 809 809 GENERATORS += cssbison -
trunk/Source/WebCore/GNUmakefile.am
r130937 r130962 201 201 202 202 # XPath grammar 203 # NOTE: older versions of bison do not inject an inclusion guard, so we do it 203 204 $(GENSOURCES_WEBCORE)/XPathGrammar.h: $(GENSOURCES_WEBCORE)/XPathGrammar.cpp 204 205 $(GENSOURCES_WEBCORE)/XPathGrammar.cpp: $(WebCore)/xml/XPathGrammar.y 205 206 $(AM_V_GEN) 206 $(AM_V_at)perl $(WebCore)/css/makegrammar.pl --grammar $< --outputDir $(GENSOURCES_WEBCORE) --symbolsPrefix xpathyy 207 $(AM_V_at)rm -f $(GENSOURCES_WEBCORE)/XPathGrammar.cpp.h $(GENSOURCES_WEBCORE)/XPathGrammar.hpp 208 $(AM_V_at)$(BISON) -d -p xpathyy $< -o $(GENSOURCES_WEBCORE)/XPathGrammar.cpp 209 $(AM_V_at)touch $(GENSOURCES_WEBCORE)/XPathGrammar.cpp.h $(GENSOURCES_WEBCORE)/XPathGrammar.hpp 210 $(AM_V_at)echo '#ifndef XPathGrammar_h' > $(GENSOURCES_WEBCORE)/XPathGrammar.h 211 $(AM_V_at)echo '#define XPathGrammar_h' >> $(GENSOURCES_WEBCORE)/XPathGrammar.h 212 $(AM_V_at)cat $(GENSOURCES_WEBCORE)/XPathGrammar.cpp.h $(GENSOURCES_WEBCORE)/XPathGrammar.hpp >> $(GENSOURCES_WEBCORE)/XPathGrammar.h 213 $(AM_V_at)echo '#endif' >> $(GENSOURCES_WEBCORE)/XPathGrammar.h 214 $(AM_V_at)rm -f $(GENSOURCES_WEBCORE)/XPathGrammar.cpp.h $(GENSOURCES_WEBCORE)/XPathGrammar.hpp 207 215 208 216 # ---- … … 411 419 # CSS grammar 412 420 421 # NOTE: older versions of bison do not inject an inclusion guard, so we do it 413 422 DerivedSources/WebCore/CSSGrammar.h: $(GENSOURCES_WEBCORE)/CSSGrammar.cpp 414 DerivedSources/WebCore/CSSGrammar.cpp: $(WebCore)/css/CSSGrammar.y .in423 DerivedSources/WebCore/CSSGrammar.cpp: $(WebCore)/css/CSSGrammar.y 415 424 $(AM_V_GEN) 416 $(AM_V_at)perl $(WebCore)/css/makegrammar.pl --grammar $< --extraDefines "$(feature_defines)" --outputDir $(GENSOURCES_WEBCORE) --symbolsPrefix cssyy 425 $(AM_V_at)rm -f $(GENSOURCES_WEBCORE)/CSSGrammar.cpp.h $(GENSOURCES_WEBCORE)/CSSGrammar.hpp 426 $(AM_V_at)$(BISON) -d -p cssyy $< -o $(GENSOURCES_WEBCORE)/CSSGrammar.cpp 427 $(AM_V_at)touch $(GENSOURCES_WEBCORE)/CSSGrammar.cpp.h $(GENSOURCES_WEBCORE)/CSSGrammar.hpp 428 $(AM_V_at)echo '#ifndef CSSGrammar_h' > $(GENSOURCES_WEBCORE)/CSSGrammar.h 429 $(AM_V_at)echo '#define CSSGrammar_h' >> $(GENSOURCES_WEBCORE)/CSSGrammar.h 430 $(AM_V_at)cat $(GENSOURCES_WEBCORE)/CSSGrammar.cpp.h $(GENSOURCES_WEBCORE)/CSSGrammar.hpp >> $(GENSOURCES_WEBCORE)/CSSGrammar.h 431 $(AM_V_at)echo '#endif' >> $(GENSOURCES_WEBCORE)/CSSGrammar.h 432 $(AM_V_at)rm -f $(GENSOURCES_WEBCORE)/CSSGrammar.cpp.h $(GENSOURCES_WEBCORE)/CSSGrammar.hpp 417 433 418 434 # user agent style sheets -
trunk/Source/WebCore/WebCore.gyp/WebCore.gyp
r130950 r130962 587 587 'sources': [ 588 588 # bison rule 589 ' <(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.y',589 '../css/CSSGrammar.y', 590 590 '../xml/XPathGrammar.y', 591 591 … … 1076 1076 '--', 1077 1077 '<@(derived_sources_aggregate_files)', 1078 ],1079 },1080 {1081 'action_name': 'preprocess_grammar',1082 'inputs': [1083 '../css/CSSGrammar.y.in',1084 '../css/CSSGrammar.y.includes',1085 ],1086 'outputs': [1087 '<(SHARED_INTERMEDIATE_DIR)/webkit/CSSGrammar.y',1088 ],1089 'action': [1090 'python',1091 'scripts/action_preprocessgrammar.py',1092 '--output-dir',1093 '<(SHARED_INTERMEDIATE_DIR)/webkit/',1094 '--defines',1095 '<(feature_defines)',1096 '<@(_inputs)',1097 1078 ], 1098 1079 }, -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r130947 r130962 35880 35880 </File> 35881 35881 <File 35882 RelativePath="..\css\CSSGrammar.y.in" 35883 > 35884 </File> 35885 <File 35886 RelativePath="..\css\CSSGrammar.y.includes" 35882 RelativePath="..\css\CSSGrammar.y" 35887 35883 > 35888 35884 </File> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r130947 r130962 13034 13034 BCEA477C097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSComputedStyleDeclaration.cpp; sourceTree = "<group>"; }; 13035 13035 BCEA477D097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSComputedStyleDeclaration.h; sourceTree = "<group>"; }; 13036 BCEA477E097CAAC80094C9E4 /* CSSGrammar.y */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.yacc; path = CSSGrammar.y; sourceTree = "<group>"; }; 13036 13037 BCEA4789097CAAC80094C9E4 /* CSSPropertyNames.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSPropertyNames.in; sourceTree = "<group>"; }; 13037 13038 BCEA478C097CAAC80094C9E4 /* CSSValueKeywords.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSValueKeywords.in; sourceTree = "<group>"; }; … … 13756 13757 FBD6AF8615EF21D4008B7110 /* CSSBasicShapes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSBasicShapes.cpp; sourceTree = "<group>"; }; 13757 13758 FBD6AF8715EF21D4008B7110 /* CSSBasicShapes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSBasicShapes.h; sourceTree = "<group>"; }; 13758 FCEBCD711623A7910029965E /* CSSGrammar.y.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; path = CSSGrammar.y.in; sourceTree = "<group>"; };13759 FCEBCD721623A7910029965E /* CSSGrammar.y.includes */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; path = CSSGrammar.y.includes; sourceTree = "<group>"; };13760 13759 FD00D7A214A3F61900734011 /* SincResampler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SincResampler.cpp; sourceTree = "<group>"; }; 13761 13760 FD00D7A314A3F61900734011 /* SincResampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SincResampler.h; sourceTree = "<group>"; }; … … 21125 21124 BC23E4E00DAACE0F009FDC91 /* CSSGradientValue.cpp */, 21126 21125 BC53C6910DA591140021EB5D /* CSSGradientValue.h */, 21127 FCEBCD711623A7910029965E /* CSSGrammar.y.in */, 21128 FCEBCD721623A7910029965E /* CSSGrammar.y.includes */, 21126 BCEA477E097CAAC80094C9E4 /* CSSGrammar.y */, 21129 21127 BC772B360C4EA91E0083285F /* CSSHelper.h */, 21130 21128 BC23E76B0DAE88A9009FDC91 /* CSSImageGeneratorValue.cpp */, -
trunk/Source/WebCore/css/CSSGrammar.y
r130961 r130962 1 %{ 2 1 3 /* 2 4 * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org) … … 21 23 */ 22 24 25 #include "config.h" 26 27 #include "CSSParser.h" 28 #include "CSSParserMode.h" 29 #include "CSSPrimitiveValue.h" 30 #include "CSSPropertyNames.h" 31 #include "CSSSelector.h" 32 #include "CSSSelectorList.h" 33 #include "Document.h" 34 #include "HTMLNames.h" 35 #include "MediaList.h" 36 #include "MediaQueryExp.h" 37 #include "StyleRule.h" 38 #include "StyleSheetContents.h" 39 #include "WebKitCSSKeyframeRule.h" 40 #include "WebKitCSSKeyframesRule.h" 41 #include <wtf/FastMalloc.h> 42 #include <stdlib.h> 43 #include <string.h> 44 45 using namespace WebCore; 46 using namespace HTMLNames; 47 48 #define YYMALLOC fastMalloc 49 #define YYFREE fastFree 50 51 #define YYENABLE_NLS 0 52 #define YYLTYPE_IS_TRIVIAL 1 53 #define YYMAXDEPTH 10000 54 #define YYDEBUG 0 55 56 %} 57 23 58 %pure_parser 24 59 … … 53 88 54 89 %{ 90 91 #if YYDEBUG > 0 92 #define YYPRINT(File,Type,Value) print_token_value(File,Type,Value) 93 static void print_token_value(FILE * yyoutput, int yytype, YYSTYPE const &yyvalue); 94 #endif 55 95 56 96 static inline int cssyyerror(void*, const char*) … … 1280 1320 declaration: 1281 1321 VAR_DEFINITION ':' maybe_space expr prio { 1282 #if ENABLE _CSS_VARIABLES1322 #if ENABLE(CSS_VARIABLES) 1283 1323 parser->storeVariableDeclaration($1, parser->sinkFloatingValueList($4), $5); 1284 1324 $$ = true; … … 1415 1455 | '#' maybe_space { $$.id = 0; $$.string = CSSParserString(); $$.unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; } /* Handle error case: "color: #;" */ 1416 1456 | VARFUNCTION maybe_space IDENT ')' maybe_space { 1417 #if ENABLE _CSS_VARIABLES1457 #if ENABLE(CSS_VARIABLES) 1418 1458 $$.id = 0; 1419 1459 $$.string = $3; … … 1511 1551 unary_term { $$ = $1; } 1512 1552 | VARFUNCTION maybe_space IDENT ')' maybe_space { 1513 #if ENABLE _CSS_VARIABLES1553 #if ENABLE(CSS_VARIABLES) 1514 1554 $$.id = 0; 1515 1555 $$.string = $3; … … 1696 1736 %% 1697 1737 1738 #if YYDEBUG > 0 1739 static void print_token_value(FILE * yyoutput, int yytype, YYSTYPE const &yyvalue) 1740 { 1741 switch (yytype) { 1742 case IDENT: 1743 case STRING: 1744 case NTH: 1745 case HEX: 1746 case IDSEL: 1747 case DIMEN: 1748 case INVALIDDIMEN: 1749 case URI: 1750 case FUNCTION: 1751 case ANYFUNCTION: 1752 case NOTFUNCTION: 1753 case CALCFUNCTION: 1754 case MINFUNCTION: 1755 case MAXFUNCTION: 1756 case VAR_DEFINITION: 1757 case UNICODERANGE: 1758 YYFPRINTF(yyoutput, "%s", String(yyvalue.string).utf8().data()); 1759 break; 1760 default: 1761 break; 1762 } 1763 } 1764 #endif -
trunk/Source/WebCore/css/makegrammar.pl
r130957 r130962 22 22 use warnings; 23 23 24 use Config; 25 use File::Basename; 26 use File::Spec; 27 use Getopt::Long; 28 use IO::File; 24 my $grammar = $ARGV[0]; 25 my $fileBase = $ARGV[1]; 29 26 30 require Config;27 system("bison -d -p cssyy " . $grammar . " -o " . $fileBase . ".tab.c"); 31 28 32 my $gcc = ""; 33 if ($ENV{CC}) { 34 $gcc = $ENV{CC}; 35 } elsif (($Config::Config{'osname'}) =~ /solaris/i) { 36 $gcc = "/usr/sfw/bin/gcc"; 37 } else { 38 $gcc = "/usr/bin/gcc"; 39 } 40 41 $gcc .= " -E -P -x c"; 42 43 my $grammarFilePath = ""; 44 my $outputDir = "."; 45 my $extraDefines = ""; 46 my $symbolsPrefix = ""; 47 48 GetOptions( 49 'grammar=s' => \$grammarFilePath, 50 'outputDir=s' => \$outputDir, 51 'preprocessor=s' => \$gcc, 52 'extraDefines=s' => \$extraDefines, 53 'symbolsPrefix=s' => \$symbolsPrefix 54 ); 55 56 die "Need a symbols prefix to give to bison (e.g. cssyy, xpathyy)" unless length($symbolsPrefix); 57 58 my ($filename, $basePath, $suffix) = fileparse($grammarFilePath, (".y", ".y.in")); 59 60 if ($suffix eq ".y.in") { 61 my $grammarFileIncludesPath = "${basePath}${filename}.y.includes"; 62 my $grammarFileOutPath = File::Spec->join($outputDir, "$filename.y"); 63 my $featureFlags = "-D " . join(" -D ", split(" ", $extraDefines)); 64 65 my $processed = new IO::File; 66 open $processed, "$gcc $grammarFilePath $featureFlags|"; 67 68 open GRAMMAR, ">$grammarFileOutPath" or die; 69 open INCLUDES, "<$grammarFileIncludesPath" or die; 70 71 while (<INCLUDES>) { 72 print GRAMMAR; 73 } 74 while (<$processed>) { 75 print GRAMMAR; 76 } 77 78 close GRAMMAR; 79 $grammarFilePath = $grammarFileOutPath; 80 } 81 82 my $fileBase = File::Spec->join($outputDir, $filename); 83 system("bison -d -p $symbolsPrefix $grammarFilePath -o $fileBase.cpp"); 84 85 open HEADER, ">$fileBase.h" or die; 29 open HEADER, ">" . $fileBase . ".h" or die; 86 30 print HEADER << "EOF"; 87 31 #ifndef CSSGRAMMAR_H … … 89 33 EOF 90 34 91 open HPP, "< $fileBase.cpp.h" or open HPP, "<$fileBase.hpp" or die;35 open HPP, "<" . $fileBase . ".tab.h" or die; 92 36 while (<HPP>) { 93 37 print HEADER; … … 96 40 97 41 print HEADER "#endif\n"; 42 98 43 close HEADER; 99 44 100 unlink("$fileBase.cpp.h"); 101 unlink("$fileBase.hpp"); 45 unlink($fileBase . ".tab.h"); 102 46 47 open CPP, ">" . $fileBase . ".cpp" or die; 48 open GENSRC, "<" . $fileBase . ".tab.c" or die; 49 while (<GENSRC>) { 50 print CPP; 51 } 52 close GENSRC; 53 close CPP; 54 55 unlink($fileBase . ".tab.c"); -
trunk/Source/cmake/WebKitMacros.cmake
r130937 r130962 149 149 150 150 151 MACRO (GENERATE_GRAMMAR _prefix _input _output_header _output_source _other_dependencies _features)151 MACRO (GENERATE_GRAMMAR _prefix _input _output_header _output_source) 152 152 ADD_CUSTOM_COMMAND( 153 153 OUTPUT ${_output_header} ${_output_source} 154 154 MAIN_DEPENDENCY ${_input} 155 DEPENDS ${_input} ${_other_dependencies} 156 COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/css/makegrammar.pl --grammar ${_input} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR} --extraDefines "${_features}" --symbolsPrefix ${_prefix} 155 COMMAND ${BISON_EXECUTABLE} -p ${_prefix} ${_input} -o ${_output_source} --defines=${_output_header} 157 156 VERBATIM) 158 157 ENDMACRO ()
Note: See TracChangeset
for help on using the changeset viewer.