Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: Source/build/scripts/name_macros.py

Issue 57813007: CSS property names and value keywords no longer requires conditions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Julien's review on removing enabled_conditions param Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/build/scripts/make_style_shorthands.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 \\ 57 \\
58 %(unconditional_macros)s 58 %(unconditional_macros)s
59 \\ 59 \\
60 %(conditional_macros)s 60 %(conditional_macros)s
61 61
62 #endif // %(namespace)sInterfaces_h 62 #endif // %(namespace)sInterfaces_h
63 """ 63 """
64 64
65 65
66 class Writer(in_generator.Writer): 66 class Writer(in_generator.Writer):
67 def __init__(self, in_file_path, enabled_conditions): 67 def __init__(self, in_file_path):
68 super(Writer, self).__init__(in_file_path, enabled_conditions) 68 super(Writer, self).__init__(in_file_path)
69 self.namespace = self.in_file.parameters['namespace'].strip('"') 69 self.namespace = self.in_file.parameters['namespace'].strip('"')
70 self._entries_by_conditional = {} 70 self._entries_by_conditional = {}
71 self._unconditional_entries = [] 71 self._unconditional_entries = []
72 self._sort_entries_by_conditional() 72 self._sort_entries_by_conditional()
73 self._outputs = {(self.namespace + "Headers.h"): self.generate_headers_h eader, 73 self._outputs = {(self.namespace + "Headers.h"): self.generate_headers_h eader,
74 (self.namespace + "Interfaces.h"): self.generate_interf aces_header, 74 (self.namespace + "Interfaces.h"): self.generate_interf aces_header,
75 } 75 }
76 76
77 def _sort_entries_by_conditional(self): 77 def _sort_entries_by_conditional(self):
78 unconditional_names = set() 78 unconditional_names = set()
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 def generate_interfaces_header(self): 158 def generate_interfaces_header(self):
159 return INTERFACES_HEADER_TEMPLATE % { 159 return INTERFACES_HEADER_TEMPLATE % {
160 'license': license.license_for_generated_cpp(), 160 'license': license.license_for_generated_cpp(),
161 'namespace': self.namespace, 161 'namespace': self.namespace,
162 'macro_style_name': name_utilities.to_macro_style(self.namespace), 162 'macro_style_name': name_utilities.to_macro_style(self.namespace),
163 'declare_conditional_macros': self._declare_conditional_macros(), 163 'declare_conditional_macros': self._declare_conditional_macros(),
164 'unconditional_macros': '\n'.join(sorted(set(map(self._unconditional _macro, self._unconditional_entries)))), 164 'unconditional_macros': '\n'.join(sorted(set(map(self._unconditional _macro, self._unconditional_entries)))),
165 'conditional_macros': '\n'.join(map(self._conditional_macros, self._ entries_by_conditional.keys())), 165 'conditional_macros': '\n'.join(map(self._conditional_macros, self._ entries_by_conditional.keys())),
166 } 166 }
OLDNEW
« no previous file with comments | « Source/build/scripts/make_style_shorthands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698