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

Side by Side Diff: third_party/WebKit/Source/build/scripts/make_computed_style_base.py

Issue 2916563003: Compute effective touch action in StyleAdjuster. (Closed)
Patch Set: early out in style adjuster Created 3 years, 6 months 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
OLDNEW
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 14 matching lines...) Expand all
25 # TODO(shend): Put alignment sizes into code form, rather than linking to a CL w hich may disappear. 25 # TODO(shend): Put alignment sizes into code form, rather than linking to a CL w hich may disappear.
26 ALIGNMENT_ORDER = [ 26 ALIGNMENT_ORDER = [
27 # Aligns like double 27 # Aligns like double
28 'double', 28 'double',
29 # Aligns like a pointer (can be 32 or 64 bits) 29 # Aligns like a pointer (can be 32 or 64 bits)
30 'Vector<CSSPropertyID>', 'AtomicString', 'DataRef', 'RefPtr', 'DataPersisten t', 'Persistent', 'std::unique_ptr', 30 'Vector<CSSPropertyID>', 'AtomicString', 'DataRef', 'RefPtr', 'DataPersisten t', 'Persistent', 'std::unique_ptr',
31 'Vector<String>', 'Font', 'FillLayer', 'NinePieceImage', 31 'Vector<String>', 'Font', 'FillLayer', 'NinePieceImage',
32 # Aligns like float 32 # Aligns like float
33 'LengthBox', 'LengthSize', 'FloatSize', 'LengthPoint', 'Length', 'TextSizeAd just', 'TabSize', 'float', 33 'LengthBox', 'LengthSize', 'FloatSize', 'LengthPoint', 'Length', 'TextSizeAd just', 'TabSize', 'float',
34 # Aligns like int 34 # Aligns like int
35 'StyleColor', 'Color', 'LayoutUnit', 'LineClampValue', 'OutlineValue', 'unsi gned', 'int', 35 'StyleColor', 'Color', 'LayoutUnit', 'LineClampValue', 'OutlineValue', 'Touc hAction', 'unsigned', 'int',
36 # Aligns like short 36 # Aligns like short
37 'short', 37 'short',
38 # Aligns like char 38 # Aligns like char
39 'StyleSelfAlignmentData', 'StyleContentAlignmentData', 'uint8_t', 'char', 39 'StyleSelfAlignmentData', 'StyleContentAlignmentData', 'uint8_t', 'char',
40 # Aligns like bool 40 # Aligns like bool
41 'bool' 41 'bool'
42 ] 42 ]
43 43
44 # TODO(shend): Improve documentation and add docstrings. 44 # TODO(shend): Improve documentation and add docstrings.
45 45
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 518
519 @template_expander.use_jinja('ComputedStyleBaseConstants.h.tmpl') 519 @template_expander.use_jinja('ComputedStyleBaseConstants.h.tmpl')
520 def generate_base_computed_style_constants(self): 520 def generate_base_computed_style_constants(self):
521 return { 521 return {
522 'properties': self._properties, 522 'properties': self._properties,
523 'enums': self._generated_enums, 523 'enums': self._generated_enums,
524 } 524 }
525 525
526 if __name__ == '__main__': 526 if __name__ == '__main__':
527 json5_generator.Maker(ComputedStyleBaseWriter).main() 527 json5_generator.Maker(ComputedStyleBaseWriter).main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698