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

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

Issue 1569813002: Make createEvent do more case-insensitive matches (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove KeyEvents change Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-createEvent-expected.txt ('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 #!/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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #endif // %(namespace)s%(suffix)sHeaders_h 46 #endif // %(namespace)s%(suffix)sHeaders_h
47 """ 47 """
48 48
49 49
50 def case_insensitive_matching(name): 50 def case_insensitive_matching(name):
51 return (name == ('HTMLEvents') 51 return (name == ('HTMLEvents')
52 or name == 'Event' 52 or name == 'Event'
53 or name == 'Events' 53 or name == 'Events'
54 or name.startswith('UIEvent') 54 or name.startswith('UIEvent')
55 or name.startswith('CustomEvent') 55 or name.startswith('CustomEvent')
56 or name.startswith('MouseEvent')) 56 or name == 'KeyboardEvent'
57 or name == 'MessageEvent'
58 or name.startswith('MouseEvent')
59 or name == 'TouchEvent')
57 60
58 61
59 class EventFactoryWriter(in_generator.Writer): 62 class EventFactoryWriter(in_generator.Writer):
60 defaults = { 63 defaults = {
61 'ImplementedAs': None, 64 'ImplementedAs': None,
62 'Conditional': None, 65 'Conditional': None,
63 'RuntimeEnabled': None, 66 'RuntimeEnabled': None,
64 } 67 }
65 default_parameters = { 68 default_parameters = {
66 'export': '', 69 'export': '',
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 def generate_implementation(self): 150 def generate_implementation(self):
148 return { 151 return {
149 'namespace': self.namespace, 152 'namespace': self.namespace,
150 'suffix': self.suffix, 153 'suffix': self.suffix,
151 'events': self.in_file.name_dictionaries, 154 'events': self.in_file.name_dictionaries,
152 } 155 }
153 156
154 157
155 if __name__ == "__main__": 158 if __name__ == "__main__":
156 in_generator.Maker(EventFactoryWriter).main(sys.argv) 159 in_generator.Maker(EventFactoryWriter).main(sys.argv)
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Document-createEvent-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698