action(QWebPage::ToggleUnderline) does not work as expected
I’m trying to embed WebKit as a simple HTML editor via QWebView. I made it editable and it works OK, except for underline.
I use this code for “bold” setting:
and it works OK. Same for italic.
Similarly I use this code for underline:
As you can see, nothing really changes.
The problem is that when I call
I checked the source roughly, and I saw that they do not use exactly the same sequence in EditorCommand.cpp, “bold” and “italic” use uses executeToggleStyle(…) and “underline” creates a CSSPrimitiveValue and uses it with a call to executeToggleStyleInList(…).
If this is one of the reasons it does not work as I expect, I suspect “StrikeThrough” and other similar features to have the same problem, although I didn’t try because I don’t need them for the moment.
It souds like a bug.
I suggest you to create the smalest application possible to reproduce the bug, and open a bug report on bugzilla: https://bugs.webkit.org/ [bugs.webkit.org] (component WebKit Qt in this case).
Once you created the bug, you can give the link here for future reference.
[edit: fixed hyperlink / $chetankjain]
I’ve written a test case, simplified, and the behavior is not exactly the same while still buggy. Please see https://bugs.webkit.org/show_bug.cgi?id=45499 [bugs.webkit.org]
Well.. I tried the same source code (not the one in my bug report but the one in the first post of this topic) against Qt 524379030503600bbca1a8e2b5889b91b0798203, and now it works ok… Go figure… ;-)
Anyway, the bug reported here [bugs.webkit.org] is still valid and is not quite the same.
Edited 2010-09-11 17:24 UTC:
Sorry, my bad, my fault, behavior did not change :-(
Please ignore this post.