[Qt][WK2] WebPreferences are impossible to use in QML.
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Oct 2011 12:29:23 +0000 (12:29 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Oct 2011 12:29:23 +0000 (12:29 +0000)
commita46edf9e3a11509d8897eb354aa396e669f929ad
treeab42a9d03abbadc095089151459680c73bb811eb
parent4321633cbd3112cb8db8e4fbddbf35bf11ba57ef
[Qt][WK2] WebPreferences are impossible to use in QML.
https://bugs.webkit.org/show_bug.cgi?id=70141

Reviewed by Kenneth Rohde Christiansen.

Make it possible to use qwkpreferences in QML. Renamed it
to follow our new style regarding class names. This class is
now a QObject that is exposed as a property of the view.
The tests give an idea of the usage.

* UIProcess/API/qt/WKView.h:
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebView::preferences):
* UIProcess/API/qt/qdesktopwebview.h:
* UIProcess/API/qt/qmlplugin/plugin.cpp:
(WebKit2QmlPlugin::registerTypes):
* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPage::preferences):
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qwebpreferences.cpp: Added.
(QWebPreferencesPrivate::createPreferences):
(QWebPreferencesPrivate::testAttribute):
(QWebPreferencesPrivate::setAttribute):
(QWebPreferencesPrivate::setFontFamily):
(QWebPreferencesPrivate::fontFamily):
(QWebPreferencesPrivate::setFontSize):
(QWebPreferencesPrivate::fontSize):
(QWebPreferences::QWebPreferences):
(QWebPreferences::~QWebPreferences):
(QWebPreferences::autoLoadImages):
(QWebPreferences::setAutoLoadImages):
(QWebPreferences::javascriptEnabled):
(QWebPreferences::setJavascriptEnabled):
(QWebPreferences::pluginsEnabled):
(QWebPreferences::setPluginsEnabled):
(QWebPreferences::offlineWebApplicationCacheEnabled):
(QWebPreferences::setOfflineWebApplicationCacheEnabled):
(QWebPreferences::localStorageEnabled):
(QWebPreferences::setLocalStorageEnabled):
(QWebPreferences::XSSAuditingEnabled):
(QWebPreferences::setXSSAuditingEnabled):
(QWebPreferences::privateBrowsingEnabled):
(QWebPreferences::setPrivateBrowsingEnabled):
(QWebPreferences::dnsPrefetchEnabled):
(QWebPreferences::setDnsPrefetchEnabled):
(QWebPreferences::standardFontFamily):
(QWebPreferences::setStandardFontFamily):
(QWebPreferences::fixedFontFamily):
(QWebPreferences::setFixedFontFamily):
(QWebPreferences::serifFontFamily):
(QWebPreferences::setSerifFontFamily):
(QWebPreferences::sansSerifFontFamily):
(QWebPreferences::setSansSerifFontFamily):
(QWebPreferences::cursiveFontFamily):
(QWebPreferences::setCursiveFontFamily):
(QWebPreferences::fantasyFontFamily):
(QWebPreferences::setFantasyFontFamily):
(QWebPreferences::minimumFontSize):
(QWebPreferences::setMinimumFontSize):
(QWebPreferences::defaultFontSize):
(QWebPreferences::setDefaultFontSize):
(QWebPreferences::defaultFixedFontSize):
(QWebPreferences::setDefaultFixedFontSize):
* UIProcess/API/qt/qwebpreferences.h: Added.
* UIProcess/API/qt/qwebpreferences_p.h: Added.
* UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/javascript.html: Added.
* UIProcess/API/qt/tests/qmltests/common/localStorage.html: Added.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::preferences):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/qwkpreferences.cpp: Removed.
* UIProcess/qt/qwkpreferences.h: Removed.
* UIProcess/qt/qwkpreferences_p.h: Removed.
* WebKit2.pro:
* WebKit2API.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/WKView.h
Source/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp
Source/WebKit2/UIProcess/API/qt/qdesktopwebview.h
Source/WebKit2/UIProcess/API/qt/qmlplugin/plugin.cpp
Source/WebKit2/UIProcess/API/qt/qtouchwebpage.cpp
Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h
Source/WebKit2/UIProcess/API/qt/qwebpreferences.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/qt/qwebpreferences.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/qt/qwebpreferences_p.h [moved from Source/WebKit2/UIProcess/qt/qwkpreferences.h with 73% similarity]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_preferences.qml [new file with mode: 0644]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/javascript.html [new file with mode: 0644]
Source/WebKit2/UIProcess/API/qt/tests/qmltests/common/localStorage.html [new file with mode: 0644]
Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp
Source/WebKit2/UIProcess/qt/QtWebPageProxy.h
Source/WebKit2/UIProcess/qt/qwkpreferences.cpp [deleted file]
Source/WebKit2/UIProcess/qt/qwkpreferences_p.h [deleted file]
Source/WebKit2/WebKit2.pro
Source/WebKit2/WebKit2API.pri