[PATCH] propagate mouse events on widgets through the DOM

Tobias Anton TA at ESC-Electronics.de
Wed Jul 28 19:51:32 BST 2004


Hi,

attached is a patch that puts mouse and keyboard events for all form widgets 
under control of our DOM events API. With the current implementation, this 
works already for simple widgets, but it fails with file buttons, list boxes 
and textareas.

This patch is mainly needed for two reasons:
1. the QT focus and the KHTML focus can get out of sync, e.g. when clicking on 
the list box, the textarea or the file button in 
khtmltests/html/forms/forms.html.
2. mouse events that are targeted on listboxes or textareas can not be 
captured or evaluated with our current implementation, which violates the 
spec.

As a side effect, this patch removes two hack-classes: The "EventPropagator" 
in render_replaced.cpp and the "FocusHandleWidget" in html_formimpl.cpp.

It has become a bit long, but to remove the mentioned hacks, I had to derive 
new classes from QPushButton, QLineEdit, QCheckBox and QRadioButton. This was 
necessary to prevent them from propagating unhandled mouse and keyboard 
events up the parent chain by the QT API.

Comments, suggestions, flames?
Else, I'd like to commit soon.

Cheers
-- Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: form-widget-events-over-DOM-API.diff
Type: text/x-diff
Size: 28665 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20040728/3477a2b4/attachment.diff>


More information about the kfm-devel mailing list