summaryrefslogtreecommitdiffstats
path: root/WebKit/qt/Api/qgraphicswebview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/qt/Api/qgraphicswebview.cpp')
-rw-r--r--WebKit/qt/Api/qgraphicswebview.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index 6d6acc5..8fbb8e2 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -73,6 +73,7 @@ public:
QGraphicsWebView* q;
QWebPage* page;
bool resizesToContents;
+ QSize deviceSize;
// Just a convenience to avoid using page->client->overlay always
QSharedPointer<QGraphicsItemOverlay> overlay;
@@ -549,6 +550,24 @@ QIcon QGraphicsWebView::icon() const
}
/*!
+ \property QGraphicsWebView::deviceSize
+ \brief the size of the device using the web view
+
+ The device size is used by the DOM window object methods
+ otherHeight(), otherWidth() as well as a page for the viewport
+ meta tag attributes device-width and device-height.
+*/
+void QGraphicsWebView::setDeviceSize(const QSize& size)
+{
+ d->deviceSize = size;
+}
+
+QSize QGraphicsWebView::deviceSize() const
+{
+ return d->deviceSize;
+}
+
+/*!
\property QGraphicsWebView::zoomFactor
\brief the zoom factor for the view
*/