Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import math | 6 import math |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 import json5_generator | 9 import json5_generator |
| 10 import template_expander | 10 import template_expander |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 # Aligns like a pointer (can be 32 or 64 bits) | 29 # Aligns like a pointer (can be 32 or 64 bits) |
| 30 'NamedGridLinesMap', 'OrderedNamedGridLines', 'NamedGridAreaMap', 'Transform Operations', | 30 'NamedGridLinesMap', 'OrderedNamedGridLines', 'NamedGridAreaMap', 'Transform Operations', |
| 31 'Vector<CSSPropertyID>', 'Vector<GridTrackSize>', 'GridPosition', 'AtomicStr ing', | 31 'Vector<CSSPropertyID>', 'Vector<GridTrackSize>', 'GridPosition', 'AtomicStr ing', |
| 32 'RefPtr', 'DataPersistent', 'Persistent', 'std::unique_ptr', | 32 'RefPtr', 'DataPersistent', 'Persistent', 'std::unique_ptr', |
| 33 'Vector<String>', 'Font', 'FillLayer', 'NinePieceImage', | 33 'Vector<String>', 'Font', 'FillLayer', 'NinePieceImage', |
| 34 # Aligns like float | 34 # Aligns like float |
| 35 'StyleOffsetRotation', 'TransformOrigin', 'ScrollPadding', 'ScrollSnapMargin ', 'LengthBox', | 35 'StyleOffsetRotation', 'TransformOrigin', 'ScrollPadding', 'ScrollSnapMargin ', 'LengthBox', |
| 36 'LengthSize', 'FloatSize', 'LengthPoint', 'Length', 'TextSizeAdjust', 'TabSi ze', 'float', | 36 'LengthSize', 'FloatSize', 'LengthPoint', 'Length', 'TextSizeAdjust', 'TabSi ze', 'float', |
| 37 # Aligns like int | 37 # Aligns like int |
| 38 'ScrollSnapType', 'ScrollSnapAlign', 'BorderValue', 'StyleColor', 'Color', ' LayoutUnit', | 38 'ScrollSnapType', 'ScrollSnapAlign', 'BorderValue', 'StyleColor', 'Color', ' LayoutUnit', |
| 39 'LineClampValue', 'OutlineValue', 'unsigned', 'size_t', 'int', | 39 'LineClampValue', 'OutlineValue', 'TouchAction', 'unsigned', 'size_t', 'int' , |
|
shend
2017/06/30 03:05:40
(A) You won't need this if you put "field_size: 6"
sunxd
2017/07/04 15:35:42
Done.
| |
| 40 # Aligns like short | 40 # Aligns like short |
| 41 'unsigned short', 'short', | 41 'unsigned short', 'short', |
| 42 # Aligns like char | 42 # Aligns like char |
| 43 'StyleSelfAlignmentData', 'StyleContentAlignmentData', 'uint8_t', 'char', | 43 'StyleSelfAlignmentData', 'StyleContentAlignmentData', 'uint8_t', 'char', |
| 44 # Aligns like bool | 44 # Aligns like bool |
| 45 'bool' | 45 'bool' |
| 46 ] | 46 ] |
| 47 | 47 |
| 48 # TODO(shend): Improve documentation and add docstrings. | 48 # TODO(shend): Improve documentation and add docstrings. |
| 49 | 49 |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 538 | 538 |
| 539 @template_expander.use_jinja('ComputedStyleBaseConstants.h.tmpl') | 539 @template_expander.use_jinja('ComputedStyleBaseConstants.h.tmpl') |
| 540 def generate_base_computed_style_constants(self): | 540 def generate_base_computed_style_constants(self): |
| 541 return { | 541 return { |
| 542 'properties': self._properties, | 542 'properties': self._properties, |
| 543 'enums': self._generated_enums, | 543 'enums': self._generated_enums, |
| 544 } | 544 } |
| 545 | 545 |
| 546 if __name__ == '__main__': | 546 if __name__ == '__main__': |
| 547 json5_generator.Maker(ComputedStyleBaseWriter).main() | 547 json5_generator.Maker(ComputedStyleBaseWriter).main() |
| OLD | NEW |