Bug 23041 - Add new API for visibleContents() to QWebFrame
Summary: Add new API for visibleContents() to QWebFrame
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-30 13:11 PST by Adam Treat
Modified: 2009-01-06 10:10 PST (History)
2 users (show)

See Also:


Attachments
Adds API to QWebFrame for visibleContents (1.73 KB, patch)
2008-12-30 13:12 PST, Adam Treat
no flags Details | Formatted Diff | Diff
Revised patch which adds it as a read only property too (2.14 KB, patch)
2008-12-31 13:36 PST, Adam Treat
staikos: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Treat 2008-12-30 13:11:12 PST
Hi,

Currently, QtWebKit lacks available API for determining the actual size of visible contents in a QWebFrame.  This is important for certain cases where the size and placement of the scrollbars can become important especially when the content is zoomed.

Attached is a patch which rectifies this by introduce a 'visibleContents()' method which simply returns the QSize of the visible contents currently displayed in the QWebFrame sans the scrollbars.

Cheers,

Adam
Comment 1 Adam Treat 2008-12-30 13:12:24 PST
Created attachment 26321 [details]
Adds API to QWebFrame for visibleContents

Adds the required API
Comment 2 Adam Treat 2008-12-31 13:36:55 PST
Created attachment 26338 [details]
Revised patch which adds it as a read only property too

Revised the patch to make it a read only property too
Comment 3 George Staikos 2009-01-02 10:10:57 PST
Comment on attachment 26338 [details]
Revised patch which adds it as a read only property too

I think the API name is very un-Qt-like.  Maybe visibleContentSize()?  Otherwise the patch is correct.
Comment 4 Simon Hausmann 2009-01-05 05:38:07 PST
Can you elaborate a bit more what the visible content rect is in comparison to the frame's geometry? Is it excluding the scrollbars?

(This may help for finding a better name)
Comment 5 Adam Treat 2009-01-05 06:46:47 PST
Indeed.  It is the geometry excluding the scrollbars.  I'm thinking more and more that perhaps it would be better to have getters that return the geometry of the scrollbars for the frame.  Then the 'visibleContents' can be calculated by the client quite easily.  Thoughts?