[Okular-devel] Epub - webkit, getting text bounds

Jaydeep Solanki jaydp17 at gmail.com
Sun Jun 2 20:22:04 UTC 2013


Hi,
While working on getting text bounds work I discovered that
QWebFrame::hitTestContent(QPoint()) hits the outermost element, inside body.

Consider the below HTML,

<section>
<p id="p1">some text...</p>
<div>...</div>
<p id="p2">some other text..</p>
</section>

Now we have two QPoints;
QPoint pt1 => which points somewhere within p1
QPoint pt2 => which points somewhere within p2

var ht1 = QWebFrame::hitTestContent(pt1);
var ht2 = QWebFrame::hitTestContent(pt2);

Analysing ht1 & ht2 turns out that both of them point to the section
element, which seems to be a little problem. I'm searching for other ways
to do it. If you have any idea to get it work, please share.

Cheers,
Jaydeep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20130603/f9ff2232/attachment.html>


More information about the Okular-devel mailing list