[webkit-dev] Creating a new MouseEvent type

Sergiy Byelozyorov byelozyorov at cs.uni-saarland.de
Sat Jul 9 09:19:35 PDT 2011


Dear developers,

I am experimenting with a new event type that will contain additional
information compared to MouseEvent. In particular since the event is
generated for 3D content, there will be 3D hitpoint position and normal.
However I am little confused with event generation system and picking.
Please let me explain in more detail.

I have a number of new element types that I have introduced into WebKit. The
only element that has a renderer is 3D scene root element
(XML3DXml3dElement). Renderer overrides RenderBox::nodeAtPoint, which
returns the node that corresponds to the actual element in the DOM that is
under the mouse. Now I need to create XML3DMouseEvent instead of MouseEvent
somewhere. I have tried to figure out how the mouse events are generated by
stepping through the code. I have learned that for mouse move events
WebKit::WebKitImpl::mouseMove starts picking process (that reaches
XML3DRenderer::nodeAtPoint at some point), then generates and dispatches the
event in Node::dispatchMouseEvent.

Should I override Node::dispatchMouseEvent? How can I pass the extra
information that I need to put into event from RenderBox::nodeAtPoint to
Node::displayMouseEvent? Do I need to extend PlatformMouseEvent class?

Thank you for your answers.

Sergiy Byelozyorov
Computer Graphics Chair
Universitat des Saarlandes
Tel.: +49 (681) 302-3837
Web: http://graphics.cs.uni-saarland.de/sbyelozyorov/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110709/ac4fe1ce/attachment.html>


More information about the webkit-dev mailing list