[webkit-dev] How WebCore receives Mouse events?

Tau After aftertau at yahoo.com
Sun Sep 21 03:34:40 PDT 2008


Mark,
Thanks a lot. I'm still wondering how the Mouse/Key events are associated with the Render Tree? i.e, how thoses events are routed to every render node?
I saw there is a "Widget" class implemented for different platforms, and also RenderWidget. seems there is something (specific to mouse events) happening while building up the render tree?   

Thnaks!
-Tau


----- Original Message ----
From: Mark Rowe <mrowe at apple.com>
To: Tau After <aftertau at yahoo.com>
Cc: webkit-dev at lists.webkit.org
Sent: Sunday, September 21, 2008 1:16:28 PM
Subject: Re: [webkit-dev] How WebCore receives Mouse events?


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


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080921/d0861dae/attachment.html 


More information about the webkit-dev mailing list