summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-30 12:48:17 +0200
commit881da28418d380042aa95a97f0cbd42560a64f7c (patch)
treea794dff3274695e99c651902dde93d934ea7a5af /Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
parent7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff)
parent0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff)
downloadqtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp')
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp b/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
index edca4c901..cead3f7c2 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp
@@ -20,10 +20,12 @@
#include "config.h"
#include "qwebpreferences_p.h"
+#include "WebPageGroup.h"
#include "qquickwebview_p_p.h"
#include "qwebpreferences_p_p.h"
+#include <WKPageConfigurationRef.h>
#include <WKPageGroup.h>
-#include <WKPreferences.h>
+#include <WKPreferencesRef.h>
#include <WKRetainPtr.h>
#include <WKStringQt.h>
@@ -37,7 +39,7 @@ QWebPreferences* QWebPreferencesPrivate::createPreferences(QQuickWebViewPrivate*
bool QWebPreferencesPrivate::testAttribute(QWebPreferencesPrivate::WebAttribute attr) const
{
- WKPreferencesRef preferencesRef = WKPageGroupGetPreferences(webViewPrivate->pageGroup.get());
+ WKPreferencesRef preferencesRef = toAPI(&webViewPrivate->webPageProxy->pageGroup().preferences());
switch (attr) {
case AutoLoadImages:
return WKPreferencesGetLoadsImagesAutomatically(preferencesRef);
@@ -95,7 +97,7 @@ bool QWebPreferencesPrivate::testAttribute(QWebPreferencesPrivate::WebAttribute
void QWebPreferencesPrivate::setAttribute(QWebPreferencesPrivate::WebAttribute attr, bool enable)
{
- WKPreferencesRef preferencesRef = WKPageGroupGetPreferences(webViewPrivate->pageGroup.get());
+ WKPreferencesRef preferencesRef = toAPI(&webViewPrivate->webPageProxy->pageGroup().preferences());
switch (attr) {
case AutoLoadImages:
WKPreferencesSetLoadsImagesAutomatically(preferencesRef, enable);
@@ -196,7 +198,7 @@ void QWebPreferencesPrivate::initializeDefaultFontSettings()
void QWebPreferencesPrivate::setFontFamily(QWebPreferencesPrivate::FontFamily which, const QString& family)
{
- WKPreferencesRef preferencesRef = WKPageGroupGetPreferences(webViewPrivate->pageGroup.get());
+ WKPreferencesRef preferencesRef = toAPI(&webViewPrivate->webPageProxy->pageGroup().preferences());
WKRetainPtr<WKStringRef> familyRef = adoptWK(WKStringCreateWithQString(family));
switch (which) {
case StandardFont:
@@ -224,7 +226,7 @@ void QWebPreferencesPrivate::setFontFamily(QWebPreferencesPrivate::FontFamily wh
QString QWebPreferencesPrivate::fontFamily(QWebPreferencesPrivate::FontFamily which) const
{
- WKPreferencesRef preferencesRef = WKPageGroupGetPreferences(webViewPrivate->pageGroup.get());
+ WKPreferencesRef preferencesRef = toAPI(&webViewPrivate->webPageProxy->pageGroup().preferences());
switch (which) {
case StandardFont:
return adoptToQString(WKPreferencesCopyStandardFontFamily(preferencesRef));
@@ -244,8 +246,8 @@ QString QWebPreferencesPrivate::fontFamily(QWebPreferencesPrivate::FontFamily wh
}
void QWebPreferencesPrivate::setFontSize(QWebPreferencesPrivate::FontSizeType type, unsigned size)
-{
- WKPreferencesRef preferencesRef = WKPageGroupGetPreferences(webViewPrivate->pageGroup.get());
+{
+ WKPreferencesRef preferencesRef = toAPI(&webViewPrivate->webPageProxy->pageGroup().preferences());
switch (type) {
case MinimumFontSize:
WKPreferencesSetMinimumFontSize(preferencesRef, static_cast<uint32_t>(size));
@@ -263,7 +265,7 @@ void QWebPreferencesPrivate::setFontSize(QWebPreferencesPrivate::FontSizeType ty
unsigned QWebPreferencesPrivate::fontSize(QWebPreferencesPrivate::FontSizeType type) const
{
- WKPreferencesRef preferencesRef = WKPageGroupGetPreferences(webViewPrivate->pageGroup.get());
+ WKPreferencesRef preferencesRef = toAPI(&webViewPrivate->webPageProxy->pageGroup().preferences());
switch (type) {
case MinimumFontSize:
return static_cast<unsigned>(WKPreferencesGetMinimumFontSize(preferencesRef));