Bug 80006 - geometry() function of QWebElement sometimes return the "incorrect" value?
Summary: geometry() function of QWebElement sometimes return the "incorrect" value?
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-29 23:16 PST by Li Dan
Modified: 2022-07-29 10:47 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Li Dan 2012-02-29 23:16:30 PST
I am using the demo browser provided by Qt source (qt-everywhere-opensource-src-4.8.0). I have modified the demo code a little to fetch the geometry of web elements in a html webpage. But when I am trying to use geometry() function of QWebElement, I found out that sometimes the return value is strange.
For example, when the html webpage like this:

<a href=""> this is a link</a>

The <a> element's geometry is QRect(8,8 80x18), this is reasonable.

However, I change the html webpage like this:

<a href=""> this is a link</a>
<img src="image.jpg" width="100" height="100"/>

The <a> element's geometry is QRect(8,8 80x103). The height of <a> element has been effected by the following <img> element, which has its geometry of QRect(92,8 100x100).

In my application, I want to paint the bounding rect of all <a> elements in the html webpage. The result really confused me. Can anybody tell me how to resolve this problem? Or this is a WebKit bug? Thanks for your help!
Comment 1 Alexey Proskuryakov 2022-07-29 10:47:45 PDT
The Qt port has been removed from WebKit, resolving.