[webkit-qt] New API for comments

Benjamin Poulain benjamin.poulain at nokia.com
Tue Mar 1 11:50:19 PST 2011


Hello,

Andreas and I were talking about the recuring problem of QWebElement 
being too simple to handle use cases with text.

We were thinking about what kind of simple change would get us out of 
those problems (text wrapping, selections, text + element as children, etc).


Given the following changes, anyone has comments?:

class QWebNode {
     enum Type { Element, Text };
     Type type() const;
     QWebElement parent() const;
     QWebElement document() const;
     QWebNode nextSibling() const;
     QWebNode previousSibling() const;
     QString toPlainText() const;
}

class QWebElement: public QWebNode {
}
So we could play with QWebNode of type Text for text.

(Yep, I think that is BC to change the parent class in this case :))


cheers,
Benjamin,


More information about the webkit-qt mailing list