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

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

Issue 250933005: Make createEvent do case-insensitive matches (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test Created 6 years, 8 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
Index: Source/build/scripts/make_event_factory.py
diff --git a/Source/build/scripts/make_event_factory.py b/Source/build/scripts/make_event_factory.py
index be8a2a916d38ed33ce7251b49fd41fe1347a4037..b929c9b079bdf4196070338141f57c79ae385f9e 100755
--- a/Source/build/scripts/make_event_factory.py
+++ b/Source/build/scripts/make_event_factory.py
@@ -37,6 +37,13 @@ import name_utilities
import template_expander
+def case_insensitive_matching(name):
+ return (name == ('HTMLEvents')
+ or name.startswith('Event')
arv (Not doing code reviews) 2014/05/05 16:06:11 Why do we get "Events" here?
arv (Not doing code reviews) 2014/05/05 16:06:11 maybe? or name == 'Event' or name == 'Events' ...
+ or name.startswith('UIEvent')
+ or name.startswith('CustomEvent')
+ or name.startswith('MouseEvent'))
+
class EventFactoryWriter(name_macros.Writer):
defaults = {
'ImplementedAs': None,
@@ -50,6 +57,7 @@ class EventFactoryWriter(name_macros.Writer):
'cpp_name': name_utilities.cpp_name,
'enable_conditional': name_utilities.enable_conditional_if_endif,
'lower_first': name_utilities.lower_first,
+ 'case_insensitive_matching': case_insensitive_matching,
'script_name': name_utilities.script_name,
}
« no previous file with comments | « LayoutTests/fast/events/event-creation-expected.txt ('k') | Source/build/scripts/templates/EventFactory.cpp.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698