82 data = [d.strip()
for d
in data
if not isCommentLine(d)
and not '=' in d]
83
85 universal_properties = set.intersection(*browser_props)
86 universal_properties = universal_properties.difference(['cssText'])
87 universal_properties = universal_properties.intersection(
88 list(
map(camelCaseName, data)))
89
90 output_file = open(OUTPUT_FILE, 'w')
91 output_file.write("""
92/// Exposing all the extra CSS property getters and setters.
93@JS()
94library dart.css_properties;
95
96import 'dart:_js_annotations';
97import 'dart:_js_bindings' as js_bindings;
98import 'dart:html_common';
99
100@JS()
101@staticInterop
102class CssStyleDeclaration implements js_bindings.CSSStyleDeclaration {}
103
104extension CssStyleDeclarationView on CssStyleDeclaration {
105 // dart:html requires a `String?` type for `value`.
106 external Object setProperty(String property, String? value,
107 [String? priority = '']);
108
109 //
110 """)
111
112 for camelName in sorted(universal_properties):
114 output_file.write("""
115 /** Gets the value of "%s" */
116 String get %s => this._%s;
117
118 /** Sets the value of "%s" */
119 set %
s(String? value) {
120 _%s = value == null ? '' : value;
121 }
122
123 @JS('%s')
124 external String get _%s;
125
126 @JS('%s')
127 external set _%
s(String value);
128 """ % (property, camelName, camelName, property, camelName, camelName,
129 camelName, camelName, camelName, camelName))
130
131 output_file.write("""
132
133 //
134
135""")
136
137 property_lines = []
138
140 for prop in sorted(data, key=camelCaseName):
142 upper_camel_case_name = camel_case_name[0].upper() + camel_case_name[1:]
143 css_name = prop.replace('-webkit-', '')
144 base_css_name = prop.replace('-webkit-', '')
145
146 if base_css_name in seen or base_css_name.startswith(
147 '-internal') or camel_case_name in universal_properties:
148 continue
149 seen.add(base_css_name)
150
151 comment = ' /** %s the value of "' + base_css_name + '" */'
152 property_lines.append('\n')
153 property_lines.append(comment % 'Gets')
154 if base_css_name in annotated:
155 property_lines.append(annotated[base_css_name])
156 property_lines.append("""
157 String get %s =>
158 getPropertyValue('%s');
159
160""" % (camel_case_name, css_name))
161
162 property_lines.append(comment % 'Sets')
163 if base_css_name in annotated:
164 property_lines.append(annotated[base_css_name])
165 property_lines.append("""
166 set %s(String value) {
167 setProperty('%s', value, '');
168 }
169""" % (camel_case_name, css_name))
170
171 output_file.write(''.
join(property_lines))
172 output_file.write('}\n')
173 output_file.close()
174
175
static void readlines(const void *data, size_t size, F f)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set
def readCssProperties(filename)
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>