summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-10-12 10:40:35 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-10-12 09:06:30 +0000
commit9da7d9234dbeebb20b9980155179bc0f7936a6cf (patch)
treef6ae1d6c904cc486413979bfde89ad866c5f3a69 /src/core/web_contents_adapter.cpp
parent8ce1b9e5d67f1789a45d8d73960a892f77f34b06 (diff)
Add contentsSize API
Adds API to read contentsSize to go with scrollPosition. This property used to be in QWebFrame in QtWebKit. Change-Id: I498075e4c0ad916e5c96dbfb02101ce8a0c298ee Task-number: QTBUG-48323 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r--src/core/web_contents_adapter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 8f69fb92c..aa9a2cf10 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -837,6 +837,14 @@ QPointF WebContentsAdapter::lastScrollOffset() const
return QPointF();
}
+QSizeF WebContentsAdapter::lastContentsSize() const
+{
+ Q_D(const WebContentsAdapter);
+ if (RenderWidgetHostViewQt *rwhv = static_cast<RenderWidgetHostViewQt *>(d->webContents->GetRenderWidgetHostView()))
+ return toQt(rwhv->lastContentsSize());
+ return QSizeF();
+}
+
void WebContentsAdapter::grantMediaAccessPermission(const QUrl &securityOrigin, WebContentsAdapterClient::MediaRequestFlags flags)
{
Q_D(WebContentsAdapter);