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

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

Issue 2657263002: Experiment with blocking script inside fragment-parser-inserted `<iframe srcdoc>`.
Patch Set: Bitwise logic is hard. Created 3 years, 10 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 (C) 2013 Google Inc. All rights reserved. 2 # Copyright (C) 2013 Google Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 import in_generator 32 import in_generator
33 import trie_builder 33 import trie_builder
34 import template_expander 34 import template_expander
35 35
36 36
37 class ElementLookupTrieWriter(in_generator.Writer): 37 class ElementLookupTrieWriter(in_generator.Writer):
38 # FIXME: Inherit all these from somewhere. 38 # FIXME: Inherit all these from somewhere.
39 defaults = { 39 defaults = {
40 'JSInterfaceName': None, 40 'JSInterfaceName': None,
41 'constructorNeedsCreatedByParser': None, 41 'constructorNeedsCreatedByParser': None,
42 'constructorNeedsCreatedByFragmentParser': None,
42 'interfaceName': None, 43 'interfaceName': None,
43 'noConstructor': None, 44 'noConstructor': None,
44 'runtimeEnabled': None, 45 'runtimeEnabled': None,
45 } 46 }
46 default_parameters = { 47 default_parameters = {
47 'attrsNullNamespace': None, 48 'attrsNullNamespace': None,
48 'export': '', 49 'export': '',
49 'fallbackInterfaceName': '', 50 'fallbackInterfaceName': '',
50 'fallbackJSInterfaceName': '', 51 'fallbackJSInterfaceName': '',
51 'namespace': '', 52 'namespace': '',
(...skipping 21 matching lines...) Expand all
73 @template_expander.use_jinja('ElementLookupTrie.cpp.tmpl') 74 @template_expander.use_jinja('ElementLookupTrie.cpp.tmpl')
74 def generate_implementation(self): 75 def generate_implementation(self):
75 return { 76 return {
76 'namespace': self._namespace, 77 'namespace': self._namespace,
77 'length_tries': trie_builder.trie_list_by_str_length(self._tags) 78 'length_tries': trie_builder.trie_list_by_str_length(self._tags)
78 } 79 }
79 80
80 81
81 if __name__ == '__main__': 82 if __name__ == '__main__':
82 in_generator.Maker(ElementLookupTrieWriter).main(sys.argv) 83 in_generator.Maker(ElementLookupTrieWriter).main(sys.argv)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698