a code review -- issue-734-double-events-r618.patch

0 views
Skip to first unread message

Joel Webber

unread,
Mar 15, 2007, 12:13:14 PM3/15/07
to Google-Web-Tool...@googlegroups.com, Kelly Norton, rdayal
Hello Kelly and Rajeev,

I'd like you to do a code review.  To review this change please execute in the trunk:

       svn update -r618
       patch -p0 < issue-734-double-events-r618.patch

to review the following code:

This is to fix issue 734: http://code.google.com/p/google-web-toolkit/issues/detail?id=734.

The basic issue stems from *really old* code in DOMImpl[Standard|IE6] that used to simulate something like event bubbling. In a nutshell, the event dispatcher used to crawl up the DOM, looking for the first element with a listener. Most of the time, this has no effect, but it can lead to multiple firings of the same event when it is allowed to bubble up.

This should never have persisted this long, and I've found that fixing it (which also simplifies the code) gets rid of the double firing problem, and all of our samples still work just fine.

It did uncover a bug in Menus, though, and the fix should be self explanatory.
issue-734-double-events-r618.patch

Kelly Norton

unread,
Mar 16, 2007, 2:04:34 PM3/16/07
to Joel Webber, Google-Web-Tool...@googlegroups.com, rdayal
LGTM.

What platforms have you run tests on? I know you have to fly soon, so I'd be happy to fire off test runs for any untested platforms and commit while you are in the air.

/kel

Joel Webber

unread,
Mar 16, 2007, 3:15:51 PM3/16/07
to Kelly Norton, Google-Web-Tool...@googlegroups.com, rdayal
It seemed to work properly on Safari, FF, and IE. It's probably worth checking it out on Linux hosted mode (crappy old gecko), just to be sure, though I doubt it will be a problem.

The only funky part was that it exposed a bug in Menu[Item], but the old code was simply wrong. It didn't affect anything else I tested.

Thanks for doing this!
joel.
--
joel.

Kelly Norton

unread,
Mar 20, 2007, 3:10:17 PM3/20/07
to Joel Webber, Google-Web-Tool...@googlegroups.com, rdayal
Committed as r670 after running tests on all platforms.
/kel

Rajeev Dayal

unread,
Mar 22, 2007, 4:12:38 PM3/22/07
to Joel Webber, Google-Web-Tool...@googlegroups.com
Late LGTM after Kelly's help with understanding some of the event dispatching infrastructure.
Reply all
Reply to author
Forward
0 new messages