summaryrefslogtreecommitdiffstats
path: root/WebKit/qt/Api/qwebframe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/qt/Api/qwebframe.cpp')
-rw-r--r--WebKit/qt/Api/qwebframe.cpp29
1 files changed, 25 insertions, 4 deletions
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 4b12545..7a28f83 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -55,6 +55,7 @@
#include "ScriptSourceCode.h"
#include "ScriptValue.h"
#include "Scrollbar.h"
+#include "Settings.h"
#include "SelectionController.h"
#include "SubstituteData.h"
#include "SVGSMILElement.h"
@@ -1079,7 +1080,11 @@ void QWebFrame::render(QPainter* painter)
*/
void QWebFrame::setTextSizeMultiplier(qreal factor)
{
- d->frame->setZoomFactor(factor, ZoomTextOnly);
+ FrameView* view = d->frame->view();
+ if (!view)
+ return;
+
+ view->setZoomFactor(factor, ZoomTextOnly);
}
/*!
@@ -1087,7 +1092,11 @@ void QWebFrame::setTextSizeMultiplier(qreal factor)
*/
qreal QWebFrame::textSizeMultiplier() const
{
- return d->frame->zoomFactor();
+ FrameView* view = d->frame->view();
+ if (!view)
+ return 1;
+
+ return view->zoomFactor();
}
/*!
@@ -1098,12 +1107,24 @@ qreal QWebFrame::textSizeMultiplier() const
void QWebFrame::setZoomFactor(qreal factor)
{
- d->frame->setZoomFactor(factor, d->frame->zoomMode());
+ Page* page = d->frame->page();
+ if (!page)
+ return;
+
+ FrameView* view = d->frame->view();
+ if (!view)
+ return;
+
+ view->setZoomFactor(factor, page->settings()->zoomMode());
}
qreal QWebFrame::zoomFactor() const
{
- return d->frame->zoomFactor();
+ FrameView* view = d->frame->view();
+ if (!view)
+ return 1;
+
+ return view->zoomFactor();
}
/*!