DescriptionSimplify EventTarget bindings generation
EventTarget has special-cased bindings generation, with several bugs.
This CL corrects and simplifies it in a few ways:
1. Remove duplicate |EventTarget* imp| initialization
Currently EventListener has |EventTarget* imp| initialized twice.
(With different names, |impl| and |imp|, so this compiles.)
Also rearranges the template code so that the special case
is more narrowly focused (instead of overall),
and check the interface name, not just method names,
which clarifies the special case.
(This also means we can remove the test cases,
as it's just a special-case for one interface.)
This does *not* change web behavior:
Unlike all other methods, addEventListener and removeEventListener do not check arguments length.
This is apparently required for legacy calls,
so I've opened a separate bug for this:
https://code.google.com/p/chromium/issues/detail?id=353484
Previously EventTarget skipped this, due to having an overall special case,
instead of just special-casing the method call itself;
we now have an explicit special-case in the template.
This was hit by 3 tests:
fast/dom/node-legacy-event-listener.html
fast/dom/XMLHttpRequest-legacy-event-listener.html
fast/dom/Window/window-legacy-event-listener.html
(More details at the bug.)
I've added more detailed tests on behavior, and other argument handling.
Follow-up CL:
* further reduce special case (use usual argument handling)
TBR=haraken
BUG=345503
BUG=353484
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169506
Patch Set 1 #Patch Set 2 : Cleaner #Patch Set 3 : Much more extensive #
Total comments: 6
Patch Set 4 : Don't change web behavior #
Messages
Total messages: 27 (0 generated)
|