OLD | NEW |
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 | 65 |
66 # All events on the following whitelist are matched case-sensitively | 66 # All events on the following whitelist are matched case-sensitively |
67 # in createEvent and are measured using UseCounter. | 67 # in createEvent and are measured using UseCounter. |
68 # | 68 # |
69 # TODO(foolip): All events on this list should either be added to the spec and | 69 # TODO(foolip): All events on this list should either be added to the spec and |
70 # moved to the above whitelist (causing them to be matched case-insensitively) | 70 # moved to the above whitelist (causing them to be matched case-insensitively) |
71 # or be deprecated/removed. https://crbug.com/569690 | 71 # or be deprecated/removed. https://crbug.com/569690 |
72 def create_event_legacy_whitelist(name): | 72 def create_event_legacy_whitelist(name): |
73 return (name == 'AnimationEvent' | 73 return (name == 'AnimationEvent' |
74 or name == 'AnimationPlayerEvent' | |
75 or name == 'ApplicationCacheErrorEvent' | 74 or name == 'ApplicationCacheErrorEvent' |
76 or name == 'AudioProcessingEvent' | 75 or name == 'AudioProcessingEvent' |
77 or name == 'BeforeInstallPromptEvent' | 76 or name == 'BeforeInstallPromptEvent' |
78 or name == 'BeforeUnloadEvent' | 77 or name == 'BeforeUnloadEvent' |
79 or name == 'BlobEvent' | 78 or name == 'BlobEvent' |
80 or name == 'ClipboardEvent' | 79 or name == 'ClipboardEvent' |
81 or name == 'CloseEvent' | 80 or name == 'CloseEvent' |
82 or name == 'CompositionEvent' | 81 or name == 'CompositionEvent' |
83 or name == 'DeviceLightEvent' | |
84 or name == 'DeviceMotionEvent' | 82 or name == 'DeviceMotionEvent' |
85 or name == 'DeviceOrientationEvent' | 83 or name == 'DeviceOrientationEvent' |
86 or name == 'DragEvent' | 84 or name == 'DragEvent' |
87 or name == 'ErrorEvent' | 85 or name == 'ErrorEvent' |
88 or name == 'ExtendableEvent' | 86 or name == 'ExtendableEvent' |
89 or name == 'ExtendableMessageEvent' | 87 or name == 'ExtendableMessageEvent' |
90 or name == 'FetchEvent' | 88 or name == 'FetchEvent' |
91 or name == 'FocusEvent' | 89 or name == 'FocusEvent' |
92 or name == 'FontFaceSetLoadEvent' | 90 or name == 'FontFaceSetLoadEvent' |
93 or name == 'ForeignFetchEvent' | |
94 or name == 'GamepadEvent' | 91 or name == 'GamepadEvent' |
95 or name == 'HashChangeEvent' | 92 or name == 'HashChangeEvent' |
96 or name == 'IDBVersionChangeEvent' | 93 or name == 'IDBVersionChangeEvent' |
97 or name == 'InputEvent' | |
98 or name == 'InstallEvent' | |
99 or name == 'KeyboardEvents' | 94 or name == 'KeyboardEvents' |
100 or name == 'MediaEncryptedEvent' | 95 or name == 'MediaEncryptedEvent' |
101 or name == 'MediaKeyMessageEvent' | 96 or name == 'MediaKeyMessageEvent' |
102 or name == 'MediaQueryListEvent' | 97 or name == 'MediaQueryListEvent' |
103 or name == 'MediaStreamEvent' | 98 or name == 'MediaStreamEvent' |
104 or name == 'MediaStreamTrackEvent' | 99 or name == 'MediaStreamTrackEvent' |
105 or name == 'MIDIConnectionEvent' | 100 or name == 'MIDIConnectionEvent' |
106 or name == 'MIDIMessageEvent' | 101 or name == 'MIDIMessageEvent' |
107 or name == 'MutationEvent' | 102 or name == 'MutationEvent' |
108 or name == 'MutationEvents' | 103 or name == 'MutationEvents' |
109 or name == 'NotificationEvent' | 104 or name == 'NotificationEvent' |
110 or name == 'OfflineAudioCompletionEvent' | 105 or name == 'OfflineAudioCompletionEvent' |
111 or name == 'OrientationEvent' | 106 or name == 'OrientationEvent' |
112 or name == 'PageTransitionEvent' | 107 or name == 'PageTransitionEvent' |
113 or name == 'PaymentRequestUpdateEvent' | |
114 or name == 'PointerEvent' | |
115 or name == 'PopStateEvent' | 108 or name == 'PopStateEvent' |
116 or name == 'PresentationConnectionAvailableEvent' | 109 or name == 'PresentationConnectionAvailableEvent' |
117 or name == 'PresentationConnectionCloseEvent' | 110 or name == 'PresentationConnectionCloseEvent' |
118 or name == 'ProgressEvent' | 111 or name == 'ProgressEvent' |
119 or name == 'PromiseRejectionEvent' | 112 or name == 'PromiseRejectionEvent' |
120 or name == 'PushEvent' | 113 or name == 'PushEvent' |
121 or name == 'RelatedEvent' | |
122 or name == 'ResourceProgressEvent' | 114 or name == 'ResourceProgressEvent' |
123 or name == 'RTCDataChannelEvent' | 115 or name == 'RTCDataChannelEvent' |
124 or name == 'RTCDTMFToneChangeEvent' | 116 or name == 'RTCDTMFToneChangeEvent' |
125 or name == 'RTCIceCandidateEvent' | 117 or name == 'RTCIceCandidateEvent' |
126 or name == 'SecurityPolicyViolationEvent' | 118 or name == 'SecurityPolicyViolationEvent' |
127 or name == 'SensorErrorEvent' | |
128 or name == 'SensorReadingEvent' | |
129 or name == 'ServiceWorkerMessageEvent' | 119 or name == 'ServiceWorkerMessageEvent' |
130 or name == 'SpeechRecognitionError' | 120 or name == 'SpeechRecognitionError' |
131 or name == 'SpeechRecognitionEvent' | 121 or name == 'SpeechRecognitionEvent' |
132 or name == 'SpeechSynthesisEvent' | 122 or name == 'SpeechSynthesisEvent' |
133 or name == 'StorageEvent' | 123 or name == 'StorageEvent' |
134 or name == 'SVGEvents' | 124 or name == 'SVGEvents' |
135 or name == 'SyncEvent' | 125 or name == 'SyncEvent' |
136 or name == 'TextEvent' | 126 or name == 'TextEvent' |
137 or name == 'TrackEvent' | 127 or name == 'TrackEvent' |
138 or name == 'TransitionEvent' | 128 or name == 'TransitionEvent' |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 def generate_implementation(self): | 226 def generate_implementation(self): |
237 return { | 227 return { |
238 'namespace': self.namespace, | 228 'namespace': self.namespace, |
239 'suffix': self.suffix, | 229 'suffix': self.suffix, |
240 'events': self.in_file.name_dictionaries, | 230 'events': self.in_file.name_dictionaries, |
241 } | 231 } |
242 | 232 |
243 | 233 |
244 if __name__ == "__main__": | 234 if __name__ == "__main__": |
245 in_generator.Maker(EventFactoryWriter).main(sys.argv) | 235 in_generator.Maker(EventFactoryWriter).main(sys.argv) |
OLD | NEW |