diff options
| author | Ben Murdoch <benm@google.com> | 2010-05-11 18:35:50 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2010-05-14 10:23:05 +0100 |
| commit | 21939df44de1705786c545cd1bf519d47250322d (patch) | |
| tree | ef56c310f5c0cdc379c2abb2e212308a3281ce20 /WebCore/WebCore.gyp/scripts | |
| parent | 4ff1d8891d520763f17675827154340c7c740f90 (diff) | |
| download | external_webkit-21939df44de1705786c545cd1bf519d47250322d.zip external_webkit-21939df44de1705786c545cd1bf519d47250322d.tar.gz external_webkit-21939df44de1705786c545cd1bf519d47250322d.tar.bz2 | |
Merge Webkit at r58956: Initial merge by Git.
Change-Id: I1d9fb60ea2c3f2ddc04c17a871acdb39353be228
Diffstat (limited to 'WebCore/WebCore.gyp/scripts')
| -rw-r--r-- | WebCore/WebCore.gyp/scripts/action_derivedsourcesallinone.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/WebCore/WebCore.gyp/scripts/action_derivedsourcesallinone.py b/WebCore/WebCore.gyp/scripts/action_derivedsourcesallinone.py index 6a11414..c9c5bf5 100644 --- a/WebCore/WebCore.gyp/scripts/action_derivedsourcesallinone.py +++ b/WebCore/WebCore.gyp/scripts/action_derivedsourcesallinone.py @@ -49,7 +49,7 @@ import subprocess import sys # A regexp for finding Conditional attributes in interface definitions. -conditionalPattern = re.compile('interface[\s]*\[[^\]]*Conditional=([\_0-9a-zA-Z&]*)') +conditionalPattern = re.compile('interface[\s]*\[[^\]]*Conditional=([\_0-9a-zA-Z&|]*)') copyrightTemplate = """/* * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT. @@ -82,11 +82,13 @@ copyrightTemplate = """/* """ -# Wraps conditional with ENABLE() and && if more than one conditional is specified. +# Wraps conditional with ENABLE() and replace '&','|' with '&&','||' if more than one conditional is specified. def formatConditional(conditional): def wrapWithEnable(s): + if re.match('[|&]$', s): + return s * 2 return 'ENABLE(' + s + ')' - return ' && '.join(map(wrapWithEnable, conditional)) + return ' '.join(map(wrapWithEnable, conditional)) # Find the conditional interface attribute. @@ -101,7 +103,7 @@ def extractConditional(idlFilePath): match = conditionalPattern.search(idlContents) if match: conditional = match.group(1) - conditional = conditional.split('&') + conditional = re.split('([|&])', conditional) return conditional |
