| OLD | NEW |
| 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> | 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> |
| 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
| 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |
| 5 # Copyright (C) 2006 Apple Computer, Inc. | 5 # Copyright (C) 2006 Apple Computer, Inc. |
| 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. | 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. |
| 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 # Copyright (C) 2012 Ericsson AB. All rights reserved. | 10 # Copyright (C) 2012 Ericsson AB. All rights reserved. |
| (...skipping 4135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4146 AddToImplIncludes(HeaderFilesForInterface($implementedBy, $implement
edByImplName)); | 4146 AddToImplIncludes(HeaderFilesForInterface($implementedBy, $implement
edByImplName)); |
| 4147 } | 4147 } |
| 4148 if ($attrExt->{"EnabledAtRuntime"}) { | 4148 if ($attrExt->{"EnabledAtRuntime"}) { |
| 4149 push(@constantsEnabledAtRuntime, $constant); | 4149 push(@constantsEnabledAtRuntime, $constant); |
| 4150 } else { | 4150 } else { |
| 4151 my $conditionalString = GenerateConditionalString($constant); | 4151 my $conditionalString = GenerateConditionalString($constant); |
| 4152 $code .= "#if ${conditionalString}\n" if $conditionalString; | 4152 $code .= "#if ${conditionalString}\n" if $conditionalString; |
| 4153 $code .= <<END; | 4153 $code .= <<END; |
| 4154 {"${name}", $value}, | 4154 {"${name}", $value}, |
| 4155 END | 4155 END |
| 4156 $code .= "#endif\n" if $conditionalString; | 4156 $code .= "#endif // $conditionalString\n" if $conditionalString; |
| 4157 } | 4157 } |
| 4158 } | 4158 } |
| 4159 if ($has_constants) { | 4159 if ($has_constants) { |
| 4160 $code .= "};\n\n"; | 4160 $code .= "};\n\n"; |
| 4161 $code .= join "", GenerateCompileTimeCheckForEnumsIfNeeded($interface); | 4161 $code .= join "", GenerateCompileTimeCheckForEnumsIfNeeded($interface); |
| 4162 $implementation{nameSpaceWebCore}->add($code); | 4162 $implementation{nameSpaceWebCore}->add($code); |
| 4163 } | 4163 } |
| 4164 | 4164 |
| 4165 if (!HasCustomConstructor($interface)) { | 4165 if (!HasCustomConstructor($interface)) { |
| 4166 if ($interface->extendedAttributes->{"NamedConstructor"}) { | 4166 if ($interface->extendedAttributes->{"NamedConstructor"}) { |
| (...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5974 my $conditionalString = GenerateConditionalString($constant); | 5974 my $conditionalString = GenerateConditionalString($constant); |
| 5975 push(@checks, "#if ${conditionalString}\n") if $conditionalString; | 5975 push(@checks, "#if ${conditionalString}\n") if $conditionalString; |
| 5976 | 5976 |
| 5977 if ($constant->extendedAttributes->{"ImplementedBy"}) { | 5977 if ($constant->extendedAttributes->{"ImplementedBy"}) { |
| 5978 my $implementedByImplName = GetImplNameFromImplementedBy($consta
nt->extendedAttributes->{"ImplementedBy"}); | 5978 my $implementedByImplName = GetImplNameFromImplementedBy($consta
nt->extendedAttributes->{"ImplementedBy"}); |
| 5979 push(@checks, "COMPILE_ASSERT($value == " . $implementedByImplNa
me . "::$name, ${implClassName}Enum${name}IsWrongUseDoNotCheckConstants);\n"); | 5979 push(@checks, "COMPILE_ASSERT($value == " . $implementedByImplNa
me . "::$name, ${implClassName}Enum${name}IsWrongUseDoNotCheckConstants);\n"); |
| 5980 } else { | 5980 } else { |
| 5981 push(@checks, "COMPILE_ASSERT($value == ${implClassName}::$name,
${implClassName}Enum${name}IsWrongUseDoNotCheckConstants);\n"); | 5981 push(@checks, "COMPILE_ASSERT($value == ${implClassName}::$name,
${implClassName}Enum${name}IsWrongUseDoNotCheckConstants);\n"); |
| 5982 } | 5982 } |
| 5983 | 5983 |
| 5984 push(@checks, "#endif\n") if $conditionalString; | 5984 push(@checks, "#endif // $conditionalString\n") if $conditionalStrin
g; |
| 5985 } | 5985 } |
| 5986 push(@checks, "\n"); | 5986 push(@checks, "\n"); |
| 5987 } | 5987 } |
| 5988 return @checks; | 5988 return @checks; |
| 5989 } | 5989 } |
| 5990 | 5990 |
| 5991 sub ExtendedAttributeContains | 5991 sub ExtendedAttributeContains |
| 5992 { | 5992 { |
| 5993 my $callWith = shift; | 5993 my $callWith = shift; |
| 5994 return 0 unless $callWith; | 5994 return 0 unless $callWith; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6028 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { | 6028 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { |
| 6029 $found = 1; | 6029 $found = 1; |
| 6030 } | 6030 } |
| 6031 return 1 if $found; | 6031 return 1 if $found; |
| 6032 }, 0); | 6032 }, 0); |
| 6033 | 6033 |
| 6034 return $found; | 6034 return $found; |
| 6035 } | 6035 } |
| 6036 | 6036 |
| 6037 1; | 6037 1; |
| OLD | NEW |