[webkit-dev] How WebCore receives Mouse events?
Mark Rowe
mrowe at apple.com
Sat Sep 20 22:16:28 PDT 2008
On Sep 20, 2008, at 9:18 PM, Tau After wrote:
> Hello,
> Could anybody point me the source code where the WebCore register
> itself with the low layer system to receive the Mouse events? (maybe
> also key events for elements like buttons)
WebCore doesn't register for mouse events, the WebKit layer takes care
of passing mouse events down to WebCore when needed. For example,
when a button is pressed WebKit on Mac (<http://trac.webkit.org/browser/trunk/WebKit/mac/WebView/WebHTMLView.mm?rev=36685#L3132
>) calls into EventHandler::mouseDown (<http://trac.webkit.org/browser/trunk/WebCore/page/mac/EventHandlerMac.mm?rev=36685#L474
>), which then calls into the cross-platform
EventHandler::handleMousePressEvent (<http://trac.webkit.org/browser/trunk/WebCore/page/EventHandler.cpp?rev=36685#L317
>). EventHandler then takes care of the necessary text selection,
dispatch of DOM events, etc.
Hope this helps,
- Mark
More information about the webkit-dev
mailing list