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

Unified Diff: third_party/WebKit/Source/build/scripts/make_event_factory.py

Issue 2755313002: Fix issue 701381. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/Source/build/scripts/templates/EventFactory.cpp.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/build/scripts/make_event_factory.py
diff --git a/third_party/WebKit/Source/build/scripts/make_event_factory.py b/third_party/WebKit/Source/build/scripts/make_event_factory.py
index c6688f8790e1d8925e3313fc1ee521d4a7001955..46c292f6fed5dd8612094278b99b87900323b4f6 100755
--- a/third_party/WebKit/Source/build/scripts/make_event_factory.py
+++ b/third_party/WebKit/Source/build/scripts/make_event_factory.py
@@ -63,13 +63,9 @@ def create_event_whitelist(name):
or name == 'TouchEvent')
-# All events on the following whitelist are matched case-sensitively
-# in createEvent and are measured using UseCounter.
-#
-# TODO(foolip): All events on this list should either be added to the spec and
-# moved to the above whitelist (causing them to be matched case-insensitively)
-# or be deprecated/removed. https://crbug.com/569690
-def create_event_legacy_whitelist(name):
+# All events on the following whitelist are matched case-insensitively
+# in createEvent and are mesured using UseCounter.
tkent 2017/03/20 22:51:07 mesured -> measured
+def create_event_whitelist_use_counter(name):
foolip 2017/03/21 02:41:14 I don't think that a new list should be needed. I
return (name == 'AnimationEvent'
or name == 'BeforeUnloadEvent'
or name == 'CloseEvent'
@@ -81,9 +77,6 @@ def create_event_legacy_whitelist(name):
or name == 'FocusEvent'
or name == 'HashChangeEvent'
or name == 'IDBVersionChangeEvent'
- or name == 'KeyboardEvents'
- or name == 'MutationEvent'
- or name == 'MutationEvents'
or name == 'PageTransitionEvent'
or name == 'PopStateEvent'
or name == 'ProgressEvent'
@@ -93,11 +86,23 @@ def create_event_legacy_whitelist(name):
or name == 'TrackEvent'
or name == 'TransitionEvent'
or name == 'WebGLContextEvent'
- or name == 'WebKitAnimationEvent'
- or name == 'WebKitTransitionEvent'
or name == 'WheelEvent')
+# All events on the following whitelist are matched case-sensitively
+# in createEvent and are measured using UseCounter.
+#
+# TODO(foolip): All events on this list should either be added to the spec and
+# moved to the above whitelist (causing them to be matched case-insensitively)
+# or be deprecated/removed. https://crbug.com/569690
+def create_event_legacy_whitelist(name):
+ return (name == 'KeyboardEvents'
+ or name == 'MutationEvent'
+ or name == 'MutationEvents'
+ or name == 'WebKitAnimationEvent'
+ or name == 'WebKitTransitionEvent')
+
+
def measure_name(name):
return 'DocumentCreateEvent' + name
@@ -118,6 +123,7 @@ class EventFactoryWriter(json5_generator.Writer):
'script_name': name_utilities.script_name,
'create_event_whitelist': create_event_whitelist,
'create_event_legacy_whitelist': create_event_legacy_whitelist,
+ 'create_event_whitelist_use_counter': create_event_whitelist_use_counter,
'measure_name': measure_name,
}
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/Source/build/scripts/templates/EventFactory.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698