Changeset 89362 in webkit


Ignore:
Timestamp:
Jun 21, 2011 10:32:29 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-21 Alexandru Chiculita <Alexandru Chiculita>

Reviewed by Tony Chang.

"WebCore/css/makeprop.pl" and "WebCore/css/makevalues.pl" should take ENABLE_ flags into account
https://bugs.webkit.org/show_bug.cgi?id=62114

Changed the line commenting style in WebCore/css/*.in files from "#" prefixed to "" prefixed.
That's needed because we now pre-process the files with the C++ pre-processor. Also, there's
no need to manually strip the comments anymore.

Moved the duplication checks from project files to makeprop.pl and makevalues.pl.
In addition makevalues.pl will also lower case the values.

This is a build script refactoring, so no tests are provided.

  • CMakeLists.txt:
  • CodeGenerators.pri:
  • DerivedSources.make:
  • GNUmakefile.am:
  • WebCore.gyp/WebCore.gyp:
  • WebCore.gyp/scripts/action_csspropertynames.py:
  • WebCore.gyp/scripts/action_cssvaluekeywords.py:
  • css/CSSPropertyNames.in: comment style only
  • css/CSSValueKeywords.in: comment style only
  • css/SVGCSSPropertyNames.in: comment style only
  • css/SVGCSSValueKeywords.in: comment style only
  • css/WCSSValueKeywords.in: comment style only
  • css/makeprop.pl:
  • css/makevalues.pl:
Location:
trunk/Source/WebCore
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r89321 r89362  
    22082208    DEPENDS ${WebCore_CSS_PROPERTY_NAMES}
    22092209    WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
    2210     COMMAND ${PERL_EXECUTABLE} -ne "print" ${WebCore_CSS_PROPERTY_NAMES} > ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.in
    2211     COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/css/makeprop.pl
     2210    COMMAND cat ${WebCore_CSS_PROPERTY_NAMES} > ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.in
     2211    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makeprop.pl --defines "${FEATURE_DEFINES}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}"
    22122212    VERBATIM)
    22132213LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.cpp)
     
    22222222    DEPENDS ${WebCore_CSS_VALUE_KEYWORDS}
    22232223    WORKING_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR}
    2224     COMMAND ${PERL_EXECUTABLE} -ne "print lc" ${WebCore_CSS_VALUE_KEYWORDS} > ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.in
    2225     COMMAND ${PERL_EXECUTABLE} ${WEBCORE_DIR}/css/makevalues.pl
     2224    COMMAND cat ${WebCore_CSS_VALUE_KEYWORDS} > ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.in
     2225    COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/css/makevalues.pl --defines "${FEATURE_DEFINES}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}"
    22262226    VERBATIM)
    22272227LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.cpp)
  • trunk/Source/WebCore/ChangeLog

    r89359 r89362  
     12011-06-21  Alexandru Chiculita  <achicu@adobe.com>
     2
     3        Reviewed by Tony Chang.
     4
     5        "WebCore/css/makeprop.pl" and "WebCore/css/makevalues.pl" should take ENABLE_ flags into account
     6        https://bugs.webkit.org/show_bug.cgi?id=62114
     7       
     8        Changed the line commenting style in WebCore/css/*.in files from "#" prefixed to "//" prefixed.
     9        That's needed because we now pre-process the files with the C++ pre-processor. Also, there's
     10        no need to manually strip the comments anymore.
     11       
     12        Moved the duplication checks from project files to makeprop.pl and makevalues.pl.
     13        In addition makevalues.pl will also lower case the values.
     14
     15        This is a build script refactoring, so no tests are provided.
     16
     17        * CMakeLists.txt:
     18        * CodeGenerators.pri:
     19        * DerivedSources.make:
     20        * GNUmakefile.am:
     21        * WebCore.gyp/WebCore.gyp:
     22        * WebCore.gyp/scripts/action_csspropertynames.py:
     23        * WebCore.gyp/scripts/action_cssvaluekeywords.py:
     24        * css/CSSPropertyNames.in: comment style only
     25        * css/CSSValueKeywords.in: comment style only
     26        * css/SVGCSSPropertyNames.in: comment style only
     27        * css/SVGCSSValueKeywords.in: comment style only
     28        * css/WCSSValueKeywords.in: comment style only
     29        * css/makeprop.pl:
     30        * css/makevalues.pl:
     31
    1322011-06-21  Peter Varga  <pvarga@webkit.org>
    233
  • trunk/Source/WebCore/CodeGenerators.pri

    r88798 r89362  
    608608cssprops.output = $${WC_GENERATED_SOURCES_DIR}/CSSPropertyNames.cpp
    609609cssprops.input = WALDOCSSPROPS
    610 cssprops.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES} > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$cssprops.wkScript && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
     610cssprops.commands = cat ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES} > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl -I$$PWD/bindings/scripts $$cssprops.wkScript --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME} && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
    611611cssprops.depends = ${QMAKE_FILE_NAME} $${DASHBOARDSUPPORTCSSPROPERTIES} $${EXTRACSSPROPERTIES} $$cssprops.wkScript
    612612addExtraCompiler(cssprops)
     
    616616cssvalues.output = $${WC_GENERATED_SOURCES_DIR}/CSSValueKeywords.cpp
    617617cssvalues.input = WALDOCSSVALUES
    618 cssvalues.commands = perl -ne \"print lc\" ${QMAKE_FILE_NAME} $$EXTRACSSVALUES > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl $$cssvalues.wkScript && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
     618cssvalues.commands = cat ${QMAKE_FILE_NAME} $$EXTRACSSVALUES > $${WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.in && cd $$WC_GENERATED_SOURCES_DIR && perl -I$$PWD/bindings/scripts $$cssvalues.wkScript --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" --preprocessor \"$${QMAKE_MOC} -E\" ${QMAKE_FILE_NAME} && $(DEL_FILE) ${QMAKE_FILE_BASE}.in ${QMAKE_FILE_BASE}.gperf
    619619cssvalues.depends = ${QMAKE_FILE_NAME} $${EXTRACSSVALUES} $$cssvalues.wkScript
    620620cssvalues.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/${QMAKE_FILE_BASE}.h
  • trunk/Source/WebCore/DerivedSources.make

    r88798 r89362  
    651651endif
    652652
    653 # The grep commands below reject output containing anything other than:
    654 # 1. Lines beginning with '#'
    655 # 2. Lines containing only whitespace
    656 # These two types of lines will be ignored by make{prop,values}.pl.
    657653CSSPropertyNames.h : $(WEBCORE_CSS_PROPERTY_NAMES) css/makeprop.pl
    658         if sort $(WEBCORE_CSS_PROPERTY_NAMES) | uniq -d | grep -E -v '(^#)|(^[[:space:]]*$$)'; then echo 'Duplicate value!'; exit 1; fi
    659654        cat $(WEBCORE_CSS_PROPERTY_NAMES) > CSSPropertyNames.in
    660         perl "$(WebCore)/css/makeprop.pl"
     655        perl -I$(WebCore)/bindings/scripts "$(WebCore)/css/makeprop.pl" --defines "$(FEATURE_DEFINES)"
    661656
    662657CSSValueKeywords.h : $(WEBCORE_CSS_VALUE_KEYWORDS) css/makevalues.pl
    663         # Lower case all the values, as CSS values are case-insensitive
    664         perl -ne 'print lc' $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in
    665         if sort CSSValueKeywords.in | uniq -d | grep -E -v '(^#)|(^[[:space:]]*$$)'; then echo 'Duplicate value!'; exit 1; fi
    666         perl "$(WebCore)/css/makevalues.pl"
     658        cat $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in
     659        perl -I$(WebCore)/bindings/scripts "$(WebCore)/css/makevalues.pl" --defines "$(FEATURE_DEFINES)"
    667660
    668661# --------
  • trunk/Source/WebCore/GNUmakefile.am

    r89251 r89362  
    596596DerivedSources/WebCore/CSSPropertyNames.cpp: DerivedSources/WebCore/CSSPropertyNames.h
    597597DerivedSources/WebCore/CSSPropertyNames.h: $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/makeprop.pl
    598         if sort $(WEBCORE_CSS_PROPERTY_NAMES) | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
    599598        cat $(WEBCORE_CSS_PROPERTY_NAMES) > CSSPropertyNames.in
    600         $(PERL) "$(WebCore)/css/makeprop.pl"
     599        $(PERL) -I$(WebCore)/bindings/scripts "$(WebCore)/css/makeprop.pl" --defines "$(FEATURE_DEFINES)"
    601600        mv CSSPropertyNames* $(GENSOURCES_WEBCORE)
    602601
     
    604603DerivedSources/WebCore/CSSValueKeywords.cpp: DerivedSources/WebCore/CSSValueKeywords.h
    605604DerivedSources/WebCore/CSSValueKeywords.h: $(WEBCORE_CSS_VALUE_KEYWORDS) $(WebCore)/css/makevalues.pl
    606         $(PERL) -ne 'print lc' $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in
    607         if sort CSSValueKeywords.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
    608         $(PERL) "$(WebCore)/css/makevalues.pl"
     605        cat $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in
     606        $(PERL) -I$(WebCore)/bindings/scripts "$(WebCore)/css/makevalues.pl" --defines "$(FEATURE_DEFINES)"
    609607        mv CSSValueKeywords* $(GENSOURCES_WEBCORE)
    610608
  • trunk/Source/WebCore/WebCore.gyp/WebCore.gyp

    r89266 r89362  
    533533            '<@(_outputs)',
    534534            '--',
    535             '<@(_inputs)'
     535            '--defines', '<(feature_defines)',
     536            '--',
     537            '<@(_inputs)',
    536538          ],
    537539          'conditions': [
     
    559561            '<@(_outputs)',
    560562            '--',
    561             '<@(_inputs)'
     563            '--defines', '<(feature_defines)',
     564            '--',
     565            '<@(_inputs)',
    562566          ],
    563567          'conditions': [
  • trunk/Source/WebCore/WebCore.gyp/scripts/action_csspropertynames.py

    r50480 r89362  
    3232# gyp-based builds to makeprop.pl.
    3333#
    34 # usage: action_makenames.py OUTPUTS -- INPUTS
     34# usage: action_csspropertynames.py OUTPUTS -- [--defines ENABLE_FLAG1 ENABLE_FLAG2 ...] -- INPUTS
    3535#
    3636# Exactly two outputs must be specified: a path to each of CSSPropertyNames.cpp
     
    4545import os
    4646import posixpath
     47import shlex
    4748import shutil
    4849import subprocess
     
    7475
    7576
     77def SplitDefines(options):
     78    # The defines come in as one flat string. Split it up into distinct arguments.
     79    if '--defines' in options:
     80        definesIndex = options.index('--defines')
     81        if definesIndex + 1 < len(options):
     82            splitOptions = shlex.split(options[definesIndex + 1])
     83            if splitOptions:
     84                options[definesIndex + 1] = ' '.join(splitOptions)
     85
    7686def main(args):
    77     (outputs, inputs) = SplitArgsIntoSections(args[1:])
     87    outputs, options, inputs = SplitArgsIntoSections(args[1:])
     88
     89    SplitDefines(options)
    7890
    7991    # Make all output pathnames absolute so that they can be accessed after
     
    115127    merged = open(mergedPath, 'wb')    # 'wb' to get \n only on windows
    116128
    117     # Make sure there aren't any duplicate lines in the in files.
    118     lineDict = {}
     129    # Concatenate all the input files.
    119130    for inFilePath in inFiles:
    120131        inFile = open(inFilePath)
    121         for line in inFile:
    122             line = line.rstrip()
    123             if line.startswith('#'):
    124                 line = ''
    125             if line == '':
    126                 continue
    127             if line in lineDict:
    128                 raise KeyError, 'Duplicate value %s' % line
    129             lineDict[line] = True
    130             print >>merged, line
     132        shutil.copyfileobj(inFile, merged)
    131133        inFile.close()
    132134
    133135    merged.close()
    134136
     137    # scriptsPath is a Perl include directory, located relative to
     138    # makepropInput.
     139    scriptsPath = os.path.normpath(
     140        os.path.join(os.path.dirname(makepropInput), os.pardir, 'bindings', 'scripts'))
     141
    135142    # Build up the command.
    136     command = ['perl', makepropInput]
     143    command = ['perl', '-I', scriptsPath, makepropInput]
     144    command.extend(options)
    137145
    138146    # Do it. checkCall is new in 2.5, so simulate its behavior with call and
  • trunk/Source/WebCore/WebCore.gyp/scripts/action_cssvaluekeywords.py

    r50480 r89362  
    3636# gyp-based builds to makevalues.pl.
    3737#
    38 # usage: action_cssvaluekeywords.py OUTPUTS -- INPUTS
     38# usage: action_cssvaluekeywords.py OUTPUTS -- [--defines ENABLE_FLAG1 ENABLE_FLAG2 ...] -- INPUTS
    3939#
    4040# Exactly two outputs must be specified: a path to each of CSSValueKeywords.c
     
    4949import os
    5050import posixpath
     51import shlex
    5152import shutil
    5253import subprocess
     
    7879
    7980
     81def SplitDefines(options):
     82    # The defines come in as one flat string. Split it up into distinct arguments.
     83    if '--defines' in options:
     84        definesIndex = options.index('--defines')
     85        if definesIndex + 1 < len(options):
     86            splitOptions = shlex.split(options[definesIndex + 1])
     87            if splitOptions:
     88                options[definesIndex + 1] = ' '.join(splitOptions)
     89
    8090def main(args):
    81     (outputs, inputs) = SplitArgsIntoSections(args[1:])
     91    outputs, options, inputs = SplitArgsIntoSections(args[1:])
     92
     93    SplitDefines(options)
    8294
    8395    # Make all output pathnames absolute so that they can be accessed after
     
    119131    merged = open(mergedPath, 'wb')    # 'wb' to get \n only on windows
    120132
    121     # Make sure there aren't any duplicate lines in the in files. Lowercase
    122     # everything because CSS values are case-insensitive.
    123     lineDict = {}
     133    # Concatenate all the input files.
    124134    for inFilePath in inFiles:
    125135        inFile = open(inFilePath)
    126         for line in inFile:
    127             line = line.rstrip()
    128             if line.startswith('#'):
    129                 line = ''
    130             if line == '':
    131                 continue
    132             line = line.lower()
    133             if line in lineDict:
    134                 raise KeyError, 'Duplicate value %s' % line
    135             lineDict[line] = True
    136             print >>merged, line
     136        shutil.copyfileobj(inFile, merged)
    137137        inFile.close()
    138138
    139139    merged.close()
    140140
     141    # scriptsPath is a Perl include directory, located relative to
     142    # makevaluesInput.
     143    scriptsPath = os.path.normpath(
     144        os.path.join(os.path.dirname(makevaluesInput), os.pardir, 'bindings', 'scripts'))
     145
    141146    # Build up the command.
    142     command = ['perl', makevaluesInput]
     147    command = ['perl', '-I', scriptsPath, makevaluesInput]
     148    command.extend(options)
    143149
    144150    # Do it. checkCall is new in 2.5, so simulate its behavior with call and
  • trunk/Source/WebCore/css/CSSPropertyNames.in

    r87121 r89362  
    1 #
    2 # CSS property names
    3 #
    4 # Some properties are used internally, but are not part of CSS. They are used to get
    5 # HTML4 compatibility in the rendering engine.
    6 #
    7 # Microsoft extensions are documented here:
    8 # http://msdn.microsoft.com/workshop/author/css/reference/attributes.asp
    9 #
     1//
     2// CSS property names
     3//
     4// Some properties are used internally, but are not part of CSS. They are used to get
     5// HTML4 compatibility in the rendering engine.
     6//
     7// Microsoft extensions are documented here:
     8// http://msdn.microsoft.com/workshop/author/css/reference/attributes.asp
     9//
    1010
    11 # high-priority property names have to be listed first, to simplify the check
    12 # for applying them first.
     11// high-priority property names have to be listed first, to simplify the check
     12// for applying them first.
    1313color
    1414direction
     
    2929zoom
    3030
    31 # line height needs to be right after the above high-priority properties
     31// line height needs to be right after the above high-priority properties
    3232line-height
    3333
    34 # The remaining properties are listed in alphabetical order
     34// The remaining properties are listed in alphabetical order
    3535background
    3636background-attachment
     
    8080box-shadow
    8181box-sizing
    82 # -webkit-box-sizing worked in Safari 4 and earlier.
     82// -webkit-box-sizing worked in Safari 4 and earlier.
    8383-webkit-box-sizing = box-sizing
    8484caption-side
     
    111111min-width
    112112opacity
    113 # Honor -webkit-opacity as a synonym for opacity. This was the only syntax that worked in Safari 1.1,
    114 # and may be in use on some websites and widgets.
     113// Honor -webkit-opacity as a synonym for opacity. This was the only syntax that worked in Safari 1.1,
     114// and may be in use on some websites and widgets.
    115115-webkit-opacity = opacity
    116116orphans
     
    190190-webkit-background-composite
    191191-webkit-background-origin
    192 # -webkit-background-size differs from background-size only in the interpretation of
    193 # a single value: -webkit-background-size: l; is equivalent to background-size: l l;
    194 # whereas background-size: l; is equivalent to background-size: l auto;
     192// -webkit-background-size differs from background-size only in the interpretation of
     193// a single value: -webkit-background-size: l; is equivalent to background-size: l l;
     194// whereas background-size: l; is equivalent to background-size: l auto;
    195195-webkit-background-size
    196196-webkit-border-after
     
    209209-webkit-border-horizontal-spacing
    210210-webkit-border-image
    211 # -webkit-border-radius differs from border-radius only in the interpretation of
    212 # a value consisting of two lengths: "-webkit-border-radius: l1 l2;" is equivalent
    213 # to "border-radius: l1 / l2;"
     211// -webkit-border-radius differs from border-radius only in the interpretation of
     212// a value consisting of two lengths: "-webkit-border-radius: l1 l2;" is equivalent
     213// to "border-radius: l1 / l2;"
    214214-webkit-border-radius
    215215-webkit-border-start
  • trunk/Source/WebCore/css/CSSValueKeywords.in

    r87881 r89362  
    1 # These are all values accepted for CSS2.
    2 #
    3 # WARNING:
    4 # --------
    5 #
    6 # The Values are sorted according to the properties they belong to,
    7 # and have to be in the same order as the enums in RenderStyleConstants.h.
    8 #
    9 # If not, the optimizations in the cssparser and style selector will fail,
    10 # and produce incorrect results.
    11 #
     1// These are all values accepted for CSS2.
     2//
     3// WARNING:
     4// --------
     5//
     6// The Values are sorted according to the properties they belong to,
     7// and have to be in the same order as the enums in RenderStyleConstants.h.
     8//
     9// If not, the optimizations in the cssparser and style selector will fail,
     10// and produce incorrect results.
     11//
    1212inherit
    1313initial
    14 #
    15 # CSS_PROP_OUTLINE_STYLE
    16 # CSS_PROP_BORDER_TOP_STYLE
    17 # CSS_PROP_BORDER_BOTTOM_STYLE
    18 # CSS_PROP_BORDER_LEFT_STYLE
     14//
     15// CSS_PROP_OUTLINE_STYLE
     16// CSS_PROP_BORDER_TOP_STYLE
     17// CSS_PROP_BORDER_BOTTOM_STYLE
     18// CSS_PROP_BORDER_LEFT_STYLE
    1919none
    2020hidden
     
    2727solid
    2828double
    29 #
    30 # CSS_PROP_FONT:
    31 #
     29//
     30// CSS_PROP_FONT:
     31//
    3232caption
    3333icon
     
    4040status-bar
    4141
    42 #
    43 # CSS_PROP_FONT_STYLE:
    44 #
    45 #normal
     42//
     43// CSS_PROP_FONT_STYLE:
     44//
     45//normal
    4646italic
    4747oblique
    48 # The following is only allowed in @font-face:
     48// The following is only allowed in @font-face:
    4949all
    50 #
    51 # CSS_PROP_FONT_VARIANT:
    52 #
    53 #normal
     50//
     51// CSS_PROP_FONT_VARIANT:
     52//
     53//normal
    5454small-caps
    55 #
    56 # CSS_PROP_FONT_WEIGHT:
    57 #
     55//
     56// CSS_PROP_FONT_WEIGHT:
     57//
    5858normal
    5959bold
     
    6969800
    7070900
    71 #
    72 # CSS_PROP_FONT_SIZE:
    73 #
     71//
     72// CSS_PROP_FONT_SIZE:
     73//
    7474xx-small
    7575x-small
     
    8282smaller
    8383larger
    84 #
    85 # CSS_PROP_FONT_STRETCH:
    86 #
    87 #normal
     84//
     85// CSS_PROP_FONT_STRETCH:
     86//
     87//normal
    8888wider
    8989narrower
     
    9696extra-expanded
    9797ultra-expanded
    98 #
    99 # CSS_PROP_GENERIC_FONT_FAMILY:
    100 #
     98//
     99// CSS_PROP_GENERIC_FONT_FAMILY:
     100//
    101101serif
    102102sans-serif
     
    105105monospace
    106106-webkit-body
    107 #
    108 #
    109 # CSS_PROP_*_COLOR
    110 #
     107//
     108//
     109// CSS_PROP_*_COLOR
     110//
    111111aqua
    112112black
     
    159159-webkit-focus-ring-color
    160160currentcolor
    161 #
    162 # colors in non strict mode
     161//
     162// colors in non strict mode
    163163grey
    164164-webkit-text
    165 #
    166 # CSS_PROP_BACKGROUND_REPEAT:
    167 #
     165//
     166// CSS_PROP_BACKGROUND_REPEAT:
     167//
    168168repeat
    169169repeat-x
    170170repeat-y
    171171no-repeat
    172 # round
    173 # space
    174 #
    175 # CSS_PROP__WEBKIT_BACKGROUND_COMPOSITE:
    176 #
     172// round
     173// space
     174//
     175// CSS_PROP__WEBKIT_BACKGROUND_COMPOSITE:
     176//
    177177clear
    178178copy
     
    187187xor
    188188plus-darker
    189 # highlight
     189// highlight
    190190plus-lighter
    191 #
    192 # CSS_PROP_VERTICAL_ALIGN:
    193 #
     191//
     192// CSS_PROP_VERTICAL_ALIGN:
     193//
    194194baseline
    195195middle
     
    200200top
    201201bottom
    202 # HTML alignment MIDDLE has no corresponding CSS alignment
     202// HTML alignment MIDDLE has no corresponding CSS alignment
    203203-webkit-baseline-middle
    204 #
    205 # CSS_PROP_TEXT_ALIGN:
    206 #
     204//
     205// CSS_PROP_TEXT_ALIGN:
     206//
    207207-webkit-auto
    208208left
     
    214214-webkit-center
    215215-webkit-match-parent
    216 #
    217 # CSS_PROP_LIST_STYLE_POSITION:
    218 #
     216//
     217// CSS_PROP_LIST_STYLE_POSITION:
     218//
    219219outside
    220220inside
    221 #
    222 # CSS_PROP_LIST_STYLE_TYPE:
    223 #
     221//
     222// CSS_PROP_LIST_STYLE_TYPE:
     223//
    224224disc
    225225circle
     
    302302hiragana-iroha
    303303katakana-iroha
    304 #none
    305 #
    306 # CSS_PROP_DISPLAY:
    307 #
     304//none
     305//
     306// CSS_PROP_DISPLAY:
     307//
    308308inline
    309309block
     
    325325-webkit-inline-box
    326326-wap-marquee
    327 #none
    328 #
    329 # CSS_PROP_CURSOR:
    330 #
     327//none
     328//
     329// CSS_PROP_CURSOR:
     330//
    331331auto
    332332crosshair
     
    338338context-menu
    339339alias
    340 # copy
     340// copy
    341341progress
    342342no-drop
     
    364364-webkit-grab
    365365-webkit-grabbing
    366 # none
    367 #
    368 # CSS_PROP_DIRECTION:
    369 #
     366// none
     367//
     368// CSS_PROP_DIRECTION:
     369//
    370370ltr
    371371rtl
    372 #
    373 # CSS_PROP_TEXT_TRANSFORM:
    374 #
     372//
     373// CSS_PROP_TEXT_TRANSFORM:
     374//
    375375capitalize
    376376uppercase
    377377lowercase
    378 #none
    379 #
    380 # CSS_PROP_VISIBILITY:
    381 #
     378//none
     379//
     380// CSS_PROP_VISIBILITY:
     381//
    382382visible
    383 #hidden
     383//hidden
    384384collapse
    385 #
    386 # Unordered rest
    387 #
     385//
     386// Unordered rest
     387//
    388388a3
    389389a4
     
    440440-webkit-nowrap
    441441
    442 # CSS3 Values
    443 # CSS_PROP_BOX_ALIGN
     442// CSS3 Values
     443// CSS_PROP_BOX_ALIGN
    444444stretch
    445445start
    446446end
    447 #center
    448 #baseline
    449 
    450 # CSS_PROP_BOX_DIRECTION
    451 # normal
     447//center
     448//baseline
     449
     450// CSS_PROP_BOX_DIRECTION
     451// normal
    452452reverse
    453453
    454 # CSS_PROP_BOX_ORIENT
     454// CSS_PROP_BOX_ORIENT
    455455horizontal
    456456vertical
     
    458458block-axis
    459459
    460 # CSS_PROP_BOX_PACK
    461 # start
    462 # end
    463 # center
    464 # justify
    465 
    466 # CSS_PROP_BOX_LINES
     460// CSS_PROP_BOX_PACK
     461// start
     462// end
     463// center
     464// justify
     465
     466// CSS_PROP_BOX_LINES
    467467single
    468468multiple
    469469
    470 # CSS_PROP_MARQUEE_DIRECTION
     470// CSS_PROP_MARQUEE_DIRECTION
    471471forwards
    472472backwards
    473473ahead
    474 # reverse
    475 # left
    476 # right
     474// reverse
     475// left
     476// right
    477477up
    478478down
    479 # auto
    480 
    481 # CSS_PROP_MARQUEE_SPEED
     479// auto
     480
     481// CSS_PROP_MARQUEE_SPEED
    482482slow
    483 # normal
     483// normal
    484484fast
    485485
    486 # CSS_PROP_MARQUEE_REPETITION
     486// CSS_PROP_MARQUEE_REPETITION
    487487infinite
    488488
    489 # CSS_PROP_MARQUEE_STYLE
    490 # none
     489// CSS_PROP_MARQUEE_STYLE
     490// none
    491491slide
    492 # scroll
     492// scroll
    493493alternate
    494494
    495 #
    496 # CSS_PROP__KHTML_USER_MODIFY
    497 #
     495//
     496// CSS_PROP__KHTML_USER_MODIFY
     497//
    498498read-only
    499499read-write
    500500read-write-plaintext-only
    501501
    502 #
    503 # CSS_PROP__KHTML_USER_DRAG
    504 #
     502//
     503// CSS_PROP__KHTML_USER_DRAG
     504//
    505505element
    506506
    507 #
    508 # CSS_PROP__KHTML_USER_SELECT
    509 #
     507//
     508// CSS_PROP__KHTML_USER_SELECT
     509//
    510510ignore
    511511
    512 #
    513 # CSS_PROP_WIDTH/MIN_WIDTH/MAX_WIDTH
    514 #
     512//
     513// CSS_PROP_WIDTH/MIN_WIDTH/MAX_WIDTH
     514//
    515515intrinsic
    516516min-intrinsic
    517517
    518 #
    519 # CSS_PROP_TEXT_OVERFLOW
    520 #
     518//
     519// CSS_PROP_TEXT_OVERFLOW
     520//
    521521clip
    522522ellipsis
    523523
    524 #
    525 # CSS_PROP__KHTML_MARGIN_COLLAPSE
    526 #
    527 # collapse
    528 # separate
     524//
     525// CSS_PROP__KHTML_MARGIN_COLLAPSE
     526//
     527// collapse
     528// separate
    529529discard
    530530
    531 #
    532 # CSS_PROP_TEXT_*_COLOR
    533 #
     531//
     532// CSS_PROP_TEXT_*_COLOR
     533//
    534534dot-dash
    535535dot-dot-dash
    536536wave
    537537
    538 #
    539 # CSS_PROP_TEXT_*_MODE
    540 #
     538//
     539// CSS_PROP_TEXT_*_MODE
     540//
    541541continuous
    542542skip-white-space
    543543
    544 #
    545 # CSS_PROP_WORD_BREAK
    546 #
     544//
     545// CSS_PROP_WORD_BREAK
     546//
    547547break-all
    548548
    549 #
    550 # CSS_PROP_WORD_WRAP
    551 #
     549//
     550// CSS_PROP_WORD_WRAP
     551//
    552552break-word
    553553
    554 #
    555 # CSS_PROP__KHTML_NBSP_MODE
    556 #
     554//
     555// CSS_PROP__KHTML_NBSP_MODE
     556//
    557557space
    558558
    559 #
    560 # CSS_PROP__KHTML_LINE_BREAK
    561 #
     559//
     560// CSS_PROP__KHTML_LINE_BREAK
     561//
    562562after-white-space
    563563
    564 # -webkit-appearance
    565 # The order here should match the order in the ControlPart enum in ThemeTypes.h.
    566 # All appearance values that should be accepted by the parser should be listed between 'checkbox' and 'textarea':
     564// -webkit-appearance
     565// The order here should match the order in the ControlPart enum in ThemeTypes.h.
     566// All appearance values that should be accepted by the parser should be listed between 'checkbox' and 'textarea':
    567567checkbox
    568568radio
     
    618618rating-level-indicator
    619619textarea
    620 # An appearance value that should not be accepted by the parser:
     620// An appearance value that should not be accepted by the parser:
    621621caps-lock-indicator
    622622
    623 #
    624 # CSS_PROP_BORDER_IMAGE
    625 #
    626 # stretch
    627 # repeat
     623//
     624// CSS_PROP_BORDER_IMAGE
     625//
     626// stretch
     627// repeat
    628628round
    629629
    630 #
    631 # CSS_PROP_BACKGROUND_CLIP/ORIGIN
    632 #
    633 # border/content/padding are deprecated and ultimately will only apply to the -webkit- form of these properties.
    634 # border-box/content-box/padding-box should be used instead.
    635 #
     630//
     631// CSS_PROP_BACKGROUND_CLIP/ORIGIN
     632//
     633// border/content/padding are deprecated and ultimately will only apply to the -webkit- form of these properties.
     634// border-box/content-box/padding-box should be used instead.
     635//
    636636border
    637637border-box
     
    641641padding-box
    642642
    643 #
    644 # background-size
    645 #
     643//
     644// background-size
     645//
    646646contain
    647647cover
    648648
    649 #
    650 # CSS_PROP__KHTML_RTL_ORDERING
    651 #
     649//
     650// CSS_PROP__KHTML_RTL_ORDERING
     651//
    652652logical
    653653visual
    654654
    655 #
    656 # CSS_PROP__WEBKIT_BORDER_FIT
    657 #
     655//
     656// CSS_PROP__WEBKIT_BORDER_FIT
     657//
    658658lines
    659659
    660 #
    661 # CSS_PROP__WEBKIT_ANIMATION_DIRECTION
    662 #
    663 # alternate
    664 
    665 #
    666 # CSS_PROP__WEBKIT_ANIMATION_FILL_MODE
    667 #
    668 # forwards
    669 # backwards
    670 # both
    671 
    672 #
    673 # CSS_PROP__WEBKIT_ANIMATION_ITERATION_COUNT
    674 #
    675 # infinite
    676 
    677 #
    678 # CSS_PROP__WEBKIT_ANIMATION_PLAY_STATE
    679 #
     660//
     661// CSS_PROP__WEBKIT_ANIMATION_DIRECTION
     662//
     663// alternate
     664
     665//
     666// CSS_PROP__WEBKIT_ANIMATION_FILL_MODE
     667//
     668// forwards
     669// backwards
     670// both
     671
     672//
     673// CSS_PROP__WEBKIT_ANIMATION_ITERATION_COUNT
     674//
     675// infinite
     676
     677//
     678// CSS_PROP__WEBKIT_ANIMATION_PLAY_STATE
     679//
    680680running
    681681paused
    682682
    683 #
    684 # CSS_PROP__WEBKIT_TRANSFORM_STYLE
    685 #
     683//
     684// CSS_PROP__WEBKIT_TRANSFORM_STYLE
     685//
    686686flat
    687687preserve-3d
    688688
    689 #
    690 # CSS_PROP__WEBKIT_TRANSITION_TIMING_FUNCTION
    691 # CSS_PROP__WEBKIT_ANIMATION_TIMING_FUNCTION
    692 #
     689//
     690// CSS_PROP__WEBKIT_TRANSITION_TIMING_FUNCTION
     691// CSS_PROP__WEBKIT_ANIMATION_TIMING_FUNCTION
     692//
    693693ease
    694694linear
     
    699699step-end
    700700
    701 #
    702 # CSS_PROP_ZOOM
    703 #
     701//
     702// CSS_PROP_ZOOM
     703//
    704704document
    705705reset
    706706
    707 #
    708 # CSS_PROP_POINTER_EVENTS
    709 #
     707//
     708// CSS_PROP_POINTER_EVENTS
     709//
    710710visiblePainted
    711711visibleFill
    712712visibleStroke
    713 #visible
     713//visible
    714714painted
    715715fill
    716716stroke
    717 #all
    718 #none
    719 
    720 #
    721 # CSS_PROP_SPEECH
    722 #
     717//all
     718//none
     719
     720//
     721// CSS_PROP_SPEECH
     722//
    723723spell-out
    724724digits
     
    726726no-punctuation
    727727
    728 #
    729 # -webkit-font-smoothing
    730 #
    731 # auto
    732 # none
     728//
     729// -webkit-font-smoothing
     730//
     731// auto
     732// none
    733733antialiased
    734734subpixel-antialiased
    735735
    736 # text-rendering
    737 #auto
     736// text-rendering
     737//auto
    738738optimizeSpeed
    739739optimizeLegibility
    740740geometricPrecision
    741741
    742 # -webkit-color-correction
    743 #default
     742// -webkit-color-correction
     743//default
    744744sRGB
    745745
    746 # (-webkit-view-mode:) media feature:
     746// (-webkit-view-mode:) media feature:
    747747floating
    748748fullscreen
     
    751751windowed
    752752
    753 # -webkit-hyphens
    754 # none
     753// -webkit-hyphens
     754// none
    755755manual
    756 # auto
    757 
    758 # -webkit-writing-mode
    759 # SVG compatibility
     756// auto
     757
     758// -webkit-writing-mode
     759// SVG compatibility
    760760lr
    761761rl
     
    764764rl-tb
    765765tb-rl
    766 # Standard values from CSS3
     766// Standard values from CSS3
    767767horizontal-tb
    768768vertical-rl
     
    770770horizontal-bt
    771771
    772 # -webkit-text-emphasis-position
     772// -webkit-text-emphasis-position
    773773over
    774774under
    775775
    776 # -webkit-text-emphasis-style
     776// -webkit-text-emphasis-style
    777777filled
    778778open
    779779dot
    780 # circle
     780// circle
    781781double-circle
    782782triangle
    783783sesame
    784784
    785 # -webkit-radial-gradient
    786 # circle
     785// -webkit-radial-gradient
     786// circle
    787787ellipse
    788788closest-side
     
    790790farthest-side
    791791farthest-corner
    792 # contain
    793 # cover
    794 
    795 # -webkit-text-orientation
     792// contain
     793// cover
     794
     795// -webkit-text-orientation
    796796upright
    797797vertical-right
    798798
    799 # -webkit-line-box-contain
     799// -webkit-line-box-contain
    800800font
    801801glyphs
     
    803803replaced
    804804
    805 # image-rendering
    806 #auto
    807 #optimizeSpeed
     805// image-rendering
     806//auto
     807//optimizeSpeed
    808808optimizeQuality
    809809-webkit-optimize-contrast
  • trunk/Source/WebCore/css/SVGCSSPropertyNames.in

    r87121 r89362  
    1 #
    2 # all valid SVG CSS2 properties.
    3 #
     1//
     2// all valid SVG CSS2 properties.
     3//
    44
    5 # SVG style props
     5// SVG style props
    66clip-path
    77clip-rule
    88mask
    9 # opacity
     9// opacity
    1010enable-background
    1111filter
     
    1515stop-color
    1616stop-opacity
    17 # pointer-events
     17// pointer-events
    1818color-interpolation
    1919color-interpolation-filters
     
    2323fill-opacity
    2424fill-rule
    25 #font-size-adjust
    26 #image-rendering
     25//font-size-adjust
     26//image-rendering
    2727marker
    2828marker-end
     
    3838stroke-opacity
    3939stroke-width
    40 # text-rendering
     40// text-rendering
    4141alignment-baseline
    4242baseline-shift
  • trunk/Source/WebCore/css/SVGCSSValueKeywords.in

    r87121 r89362  
    1 # These are all values accepted for CSS2.
    2 #
    3 # WARNING:
    4 # --------
    5 #
    6 # The Values are sorted according to the properties they belong to,
    7 # and have to be in the same order as the enums in RenderStyle.h.
    8 #
    9 # If not, the optimizations in the cssparser and style selector will fail,
    10 # and produce incorrect results.
    11 #
    12 #
    13 # CSS_PROP_*_COLOR
    14 #
     1// These are all values accepted for CSS2.
     2//
     3// WARNING:
     4// --------
     5//
     6// The Values are sorted according to the properties they belong to,
     7// and have to be in the same order as the enums in RenderStyle.h.
     8//
     9// If not, the optimizations in the cssparser and style selector will fail,
     10// and produce incorrect results.
     11//
     12//
     13// CSS_PROP_*_COLOR
     14//
    1515aliceblue
    1616antiquewhite
    17 # aqua
     17// aqua
    1818aquamarine
    1919azure
    2020beige
    2121bisque
    22 # black
     22// black
    2323blanchedalmond
    24 # blue
     24// blue
    2525blueviolet
    2626brown
     
    6161floralwhite
    6262forestgreen
    63 # fuchsia
     63// fuchsia
    6464gainsboro
    6565ghostwhite
    6666gold
    6767goldenrod
    68 # gray
    69 # grey
    70 # green
     68// gray
     69// grey
     70// green
    7171greenyellow
    7272honeydew
     
    9595lightsteelblue
    9696lightyellow
    97 # lime
     97// lime
    9898limegreen
    9999linen
    100100magenta
    101 # maroon
     101// maroon
    102102mediumaquamarine
    103103mediumblue
     
    114114moccasin
    115115navajowhite
    116 # navy
     116// navy
    117117oldlace
    118 # olive
     118// olive
    119119olivedrab
    120 # orange
     120// orange
    121121orangered
    122122orchid
     
    131131plum
    132132powderblue
    133 # purple
    134 # red
     133// purple
     134// red
    135135rosybrown
    136136royalblue
     
    141141seashell
    142142sienna
    143 # silver
     143// silver
    144144skyblue
    145145slateblue
     
    150150steelblue
    151151tan
    152 # teal
     152// teal
    153153thistle
    154154tomato
     
    156156violet
    157157wheat
    158 # white
     158// white
    159159whitesmoke
    160 # yellow
     160// yellow
    161161yellowgreen
    162162
    163 # CSS_PROP_CLIP_PATH
    164 # CSS_PROP_CLIP_RULE
     163// CSS_PROP_CLIP_PATH
     164// CSS_PROP_CLIP_RULE
    165165nonzero
    166166evenodd
    167167
    168 # CSS_PROP_MASK
    169 # CSS_PROP_OPACITY
    170 # CSS_PROP_ENABLE_BACKGROUND
     168// CSS_PROP_MASK
     169// CSS_PROP_OPACITY
     170// CSS_PROP_ENABLE_BACKGROUND
    171171accumulate
    172172new
    173173
    174 # CSS_PROP_FILTER
    175 # CSS_PROP_FLOOD_COLOR
    176 #currentColor
    177 
    178 # CSS_PROP_FLOOD_OPACITY
    179 # CSS_PROP_LIGHTING_COLOR
    180 #currentColor
    181 
    182 # CSS_PROP_STOP_COLOR
    183 # CSS_PROP_STOP_OPACITY
    184 # CSS_PROP_COLOR_INTERPOLATION
    185 #auto
    186 #sRGB
     174// CSS_PROP_FILTER
     175// CSS_PROP_FLOOD_COLOR
     176//currentColor
     177
     178// CSS_PROP_FLOOD_OPACITY
     179// CSS_PROP_LIGHTING_COLOR
     180//currentColor
     181
     182// CSS_PROP_STOP_COLOR
     183// CSS_PROP_STOP_OPACITY
     184// CSS_PROP_COLOR_INTERPOLATION
     185//auto
     186//sRGB
    187187linearRGB
    188188
    189 # CSS_PROP_COLOR_INTERPOLATION_FILTERS
    190 #auto
    191 #sRGB
    192 #linearRGB
    193 
    194 # CSS_PROP_COLOR_PROFILE
    195 #sRGB
    196 
    197 # CSS_PROP_COLOR_RENDERING
    198 #auto
    199 #optimizeSpeed
    200 #optimizeQuality
    201 
    202 ## CSS_PROP_FILL
    203 #currentColor
    204 
    205 # CSS_PROP_FILL_OPACITY
    206 # CSS_PROP_FILL_RULE
    207 #nonzero
    208 #evenodd
    209 
    210 # CSS_PROP_IMAGE_RENDERING
    211 #auto
    212 #optimizeSpeed
    213 #optimizeQuality
    214 
    215 # CSS_PROP_MARKER
    216 # CSS_PROP_MARKER_END
    217 # CSS_PROP_MARKER_MID
    218 # CSS_PROP_MARKER_START
    219 # CSS_PROP_SHAPE_RENDERING
    220 #auto
    221 #optimizeSpeed
     189// CSS_PROP_COLOR_INTERPOLATION_FILTERS
     190//auto
     191//sRGB
     192//linearRGB
     193
     194// CSS_PROP_COLOR_PROFILE
     195//sRGB
     196
     197// CSS_PROP_COLOR_RENDERING
     198//auto
     199//optimizeSpeed
     200//optimizeQuality
     201
     202//// CSS_PROP_FILL
     203//currentColor
     204
     205// CSS_PROP_FILL_OPACITY
     206// CSS_PROP_FILL_RULE
     207//nonzero
     208//evenodd
     209
     210// CSS_PROP_IMAGE_RENDERING
     211//auto
     212//optimizeSpeed
     213//optimizeQuality
     214
     215// CSS_PROP_MARKER
     216// CSS_PROP_MARKER_END
     217// CSS_PROP_MARKER_MID
     218// CSS_PROP_MARKER_START
     219// CSS_PROP_SHAPE_RENDERING
     220//auto
     221//optimizeSpeed
    222222crispEdges
    223 #geometricPrecision
    224 
    225 # CSS_PROP_STROKE
    226 # CSS_PROP_STROKE_DASHARRAY
    227 # CSS_PROP_STROKE_DASHOFFSET
    228 # CSS_PROP_STROKE_LINECAP
     223//geometricPrecision
     224
     225// CSS_PROP_STROKE
     226// CSS_PROP_STROKE_DASHARRAY
     227// CSS_PROP_STROKE_DASHOFFSET
     228// CSS_PROP_STROKE_LINECAP
    229229butt
    230 # round
    231 # square
    232 
    233 # CSS_PROP_STROKE_LINEJOIN
     230// round
     231// square
     232
     233// CSS_PROP_STROKE_LINEJOIN
    234234miter
    235 # round
     235// round
    236236bevel
    237237
    238 # CSS_PROP_STROKE_MITERLIMIT
    239 # CSS_PROP_STROKE_OPACITY
    240 # CSS_PROP_STROKE_WIDTH
    241 
    242 # CSS_PROP_ALIGNMENT_BASELINE
    243 #auto
    244 # baseline
     238// CSS_PROP_STROKE_MITERLIMIT
     239// CSS_PROP_STROKE_OPACITY
     240// CSS_PROP_STROKE_WIDTH
     241
     242// CSS_PROP_ALIGNMENT_BASELINE
     243//auto
     244// baseline
    245245before-edge
    246246after-edge
    247 #middle
     247//middle
    248248central
    249249text-before-edge
     
    254254mathematical
    255255
    256 # CSS_PROP_BASELINE_SHIFT
    257 #baseline
    258 # sub
    259 # super
    260 
    261 # CSS_PROP_DOMINANT_BASELINE
    262 #auto
     256// CSS_PROP_BASELINE_SHIFT
     257//baseline
     258// sub
     259// super
     260
     261// CSS_PROP_DOMINANT_BASELINE
     262//auto
    263263use-script
    264264no-change
    265265reset-size
    266266
    267 # CSS_PROP_GLYPH_ORIENTATION_HORIZONTAL
    268 
    269 # CSS_PROP_GLYPH_ORIENTATION_VERTICAL
    270 # CSS_PROP_KERNING
    271 # CSS_PROP_TEXT_ANCHOR
    272 # start
    273 # middle
    274 # end
    275 
    276 # CSS_PROP_VECTOR_EFFECT
    277 # none
     267// CSS_PROP_GLYPH_ORIENTATION_HORIZONTAL
     268
     269// CSS_PROP_GLYPH_ORIENTATION_VERTICAL
     270// CSS_PROP_KERNING
     271// CSS_PROP_TEXT_ANCHOR
     272// start
     273// middle
     274// end
     275
     276// CSS_PROP_VECTOR_EFFECT
     277// none
    278278non-scaling-stroke
  • trunk/Source/WebCore/css/WCSSValueKeywords.in

    r47176 r89362  
    1 # place holder for all WCSS specific CSS value keywords
     1// place holder for all WCSS specific CSS value keywords
  • trunk/Source/WebCore/css/makeprop.pl

    r85212 r89362  
    2222#   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    2323#   Boston, MA 02110-1301, USA.
     24use Getopt::Long;
     25use preprocessor;
    2426use strict;
    2527use warnings;
    2628
    27 open NAMES, "<CSSPropertyNames.in" || die "Could not find CSSPropertyNames.in";
     29my $defines;
     30my $preprocessor;
     31GetOptions('defines=s' => \$defines,
     32           'preprocessor=s' => \$preprocessor);
     33
     34my @NAMES = applyPreprocessor("CSSPropertyNames.in", $defines, $preprocessor);
     35
     36my %namesHash;
     37my @duplicates = ();
     38
    2839my @names = ();
    2940my @aliases = ();
    30 while (<NAMES>) {
    31   next if (m/(^#)|(^\s*$)/);
     41foreach (@NAMES) {
     42  next if (m/(^\s*$)/);
    3243  # Input may use a different EOL sequence than $/, so avoid chomp.
    3344  $_ =~ s/[\r\n]+$//g;
     45  if (exists $namesHash{$_}) {
     46    push @duplicates, $_;
     47  } else {
     48    $namesHash{$_} = 1;
     49  }
    3450  if ($_ =~ /=/) {
    3551    push @aliases, $_;
     
    3854  }
    3955}
    40 close(NAMES);
     56
     57if (@duplicates > 0) {
     58    die 'Duplicate CSS property names: ', join(', ', @duplicates) . "\n";
     59}
    4160
    4261open GPERF, ">CSSPropertyNames.gperf" || die "Could not open CSSPropertyNames.gperf for writing";
  • trunk/Source/WebCore/css/makevalues.pl

    r72667 r89362  
    2222#   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    2323#   Boston, MA 02110-1301, USA.
     24use Getopt::Long;
     25use preprocessor;
    2426use strict;
    2527use warnings;
    2628
    27 open NAMES, "<CSSValueKeywords.in" || die "Could not open CSSValueKeywords.in";
     29my $defines;
     30my $preprocessor;
     31GetOptions('defines=s' => \$defines,
     32           'preprocessor=s' => \$preprocessor);
     33
     34my @NAMES = applyPreprocessor("CSSValueKeywords.in", $defines, $preprocessor);
     35
     36my %namesHash;
     37my @duplicates = ();
     38
    2839my @names = ();
    29 while (<NAMES>) {
    30   next if (m/(^#)|(^\s*$)/);
     40foreach (@NAMES) {
     41  next if (m/(^\s*$)/);
    3142  # Input may use a different EOL sequence than $/, so avoid chomp.
    3243  $_ =~ s/[\r\n]+$//g;
     44  # CSS values need to be lower case.
     45  $_ = lc $_;
     46  if (exists $namesHash{$_}) {
     47    push @duplicates, $_;
     48  } else {
     49    $namesHash{$_} = 1;
     50  }
    3351  push @names, $_;
    3452}
    35 close(NAMES);
     53
     54if (@duplicates > 0) {
     55    die 'Duplicate CSS value keywords  values: ', join(', ', @duplicates) . "\n";
     56}
    3657
    3758open GPERF, ">CSSValueKeywords.gperf" || die "Could not open CSSValueKeywords.gperf for writing";
Note: See TracChangeset for help on using the changeset viewer.