[webkit-qt] QtWebKit QWebForm API extension

Allan Sandfeld Jensen kde at carewolf.com
Thu Oct 25 05:48:18 PDT 2012

Hello everybody

I took a look at how some of the other platforms solved similar problems with 
form-elements, and chromium turned out to have two specialized WebElement 
classes called WebFormElement and WebFormControlElement. This seemed like a 
viable solution so I have implemented a similar API for QWebElement, and 
attached the result below.

The API is a bit special though, because it avoids virtual methods and adding 
data to QWebElement. So the way to use the extra method is create a new 
QFormElement based on the QWebElement.

if (element.isFormElement()) {
  QWebFormElement formElemnt(element);


This makes it possible to make this extension without changing neither API nor 
ABI of the existing classes.

Any comments?

Best regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QWebForm-API.diff
Type: text/x-patch
Size: 15863 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20121025/d24ac132/attachment.bin>

More information about the webkit-qt mailing list