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
Created attachment 26321 [details] Adds API to QWebFrame for visibleContents Adds the required API
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 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.
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)
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?