There are a few simple things we can do to optimize and clean up child view event handling code.
Created attachment 256596 [details] [diff] [review] fix v1.0 1. All key events have 0,0 for a refpoint so just handle that in the key event conversion function instead of making callers do it every time they convert a key event. 2. Right now we ignore the message argument when creating gecko events, then we pass the message all the way through the conversion chain just to set it on the gecko event at the end. This is silly, just set the message when the event is created and stop passing it through the conversion chain as an unnecessary argument. Optimized signatures and simpler code. Win win.
Comment on attachment 256596 [details] [diff] [review] fix v1.0 Makes sense to me. One other thing that would be nice to clean up: convertLocation:... is a really inaccurate name; ideally it should just be folded into convertEvent:toGeckoEvent: but that messes up the drag stuff. Maybe split it into a few methods with accurate names, have convertEvent:... call all of them, and have the drag code call just the ones it needs?
Comment on attachment 256596 [details] [diff] [review] fix v1.0 sr=pink
landed on trunk, probably coming up with another patch so not marking as fixed
Created attachment 256650 [details] [diff] [review] convertLocation cleanup, v1.0 Get rid of convertLocation... The name didn't make much sense, the code was messy, and it was inefficient.
Comment on attachment 256650 [details] [diff] [review] convertLocation cleanup, v1.0 r=me
convertLocation fix landed on trunk