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

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

Issue 2217763003: Remove Blink-WebKit-only document.createEvent strings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 == 'ApplicationCacheErrorEvent'
75 or name == 'AudioProcessingEvent'
76 or name == 'BeforeInstallPromptEvent'
77 or name == 'BeforeUnloadEvent' 74 or name == 'BeforeUnloadEvent'
78 or name == 'BlobEvent'
79 or name == 'ClipboardEvent'
80 or name == 'CloseEvent' 75 or name == 'CloseEvent'
81 or name == 'CompositionEvent' 76 or name == 'CompositionEvent'
82 or name == 'DeviceMotionEvent' 77 or name == 'DeviceMotionEvent'
83 or name == 'DeviceOrientationEvent' 78 or name == 'DeviceOrientationEvent'
84 or name == 'DragEvent' 79 or name == 'DragEvent'
85 or name == 'ErrorEvent' 80 or name == 'ErrorEvent'
86 or name == 'ExtendableEvent'
87 or name == 'ExtendableMessageEvent'
88 or name == 'FetchEvent'
89 or name == 'FocusEvent' 81 or name == 'FocusEvent'
90 or name == 'FontFaceSetLoadEvent'
91 or name == 'GamepadEvent'
92 or name == 'HashChangeEvent' 82 or name == 'HashChangeEvent'
93 or name == 'IDBVersionChangeEvent' 83 or name == 'IDBVersionChangeEvent'
94 or name == 'KeyboardEvents' 84 or name == 'KeyboardEvents'
95 or name == 'MediaEncryptedEvent'
96 or name == 'MediaKeyMessageEvent'
97 or name == 'MediaQueryListEvent'
98 or name == 'MediaStreamEvent'
99 or name == 'MediaStreamTrackEvent'
100 or name == 'MIDIConnectionEvent'
101 or name == 'MIDIMessageEvent'
102 or name == 'MutationEvent' 85 or name == 'MutationEvent'
103 or name == 'MutationEvents' 86 or name == 'MutationEvents'
104 or name == 'NotificationEvent'
105 or name == 'OfflineAudioCompletionEvent'
106 or name == 'OrientationEvent'
107 or name == 'PageTransitionEvent' 87 or name == 'PageTransitionEvent'
108 or name == 'PopStateEvent' 88 or name == 'PopStateEvent'
109 or name == 'PresentationConnectionAvailableEvent'
110 or name == 'PresentationConnectionCloseEvent'
111 or name == 'ProgressEvent' 89 or name == 'ProgressEvent'
112 or name == 'PromiseRejectionEvent'
113 or name == 'PushEvent'
114 or name == 'ResourceProgressEvent'
115 or name == 'RTCDataChannelEvent'
116 or name == 'RTCDTMFToneChangeEvent'
117 or name == 'RTCIceCandidateEvent'
118 or name == 'SecurityPolicyViolationEvent'
119 or name == 'ServiceWorkerMessageEvent'
120 or name == 'SpeechRecognitionError'
121 or name == 'SpeechRecognitionEvent'
122 or name == 'SpeechSynthesisEvent'
123 or name == 'StorageEvent' 90 or name == 'StorageEvent'
124 or name == 'SVGEvents' 91 or name == 'SVGEvents'
125 or name == 'SyncEvent'
126 or name == 'TextEvent' 92 or name == 'TextEvent'
127 or name == 'TrackEvent' 93 or name == 'TrackEvent'
128 or name == 'TransitionEvent' 94 or name == 'TransitionEvent'
129 or name == 'WebGLContextEvent' 95 or name == 'WebGLContextEvent'
130 or name == 'WebKitAnimationEvent' 96 or name == 'WebKitAnimationEvent'
131 or name == 'WebKitTransitionEvent' 97 or name == 'WebKitTransitionEvent'
132 or name == 'WheelEvent') 98 or name == 'WheelEvent')
133 99
134 100
135 def measure_name(name): 101 def measure_name(name):
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 def generate_implementation(self): 192 def generate_implementation(self):
227 return { 193 return {
228 'namespace': self.namespace, 194 'namespace': self.namespace,
229 'suffix': self.suffix, 195 'suffix': self.suffix,
230 'events': self.in_file.name_dictionaries, 196 'events': self.in_file.name_dictionaries,
231 } 197 }
232 198
233 199
234 if __name__ == "__main__": 200 if __name__ == "__main__":
235 in_generator.Maker(EventFactoryWriter).main(sys.argv) 201 in_generator.Maker(EventFactoryWriter).main(sys.argv)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698