summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp73
1 files changed, 7 insertions, 66 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
index ff86e1f..b637d04 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
@@ -62,8 +62,6 @@ public:
QString localStoragePath;
QString offlineWebApplicationCachePath;
qint64 offlineStorageDefaultQuota;
- float printingMinimumShrinkFactor;
- float printingMaximumShrinkFactor;
void apply();
WebCore::Settings* settings;
@@ -176,12 +174,6 @@ void QWebSettingsPrivate::apply()
QString storagePath = !localStoragePath.isEmpty() ? localStoragePath : global->localStoragePath;
settings->setLocalStorageDatabasePath(storagePath);
- float minimumShrinkFactor = printingMinimumShrinkFactor > 0.0f ? printingMinimumShrinkFactor : global->printingMinimumShrinkFactor;
- settings->setPrintingMinimumShrinkFactor(minimumShrinkFactor);
-
- float maximumShrinkFactor = printingMaximumShrinkFactor > 0.0f ? printingMaximumShrinkFactor : global->printingMaximumShrinkFactor;
- settings->setPrintingMaximumShrinkFactor(maximumShrinkFactor);
-
value = attributes.value(QWebSettings::ZoomTextOnly,
global->attributes.value(QWebSettings::ZoomTextOnly));
settings->setZoomsTextOnly(value);
@@ -206,6 +198,7 @@ void QWebSettingsPrivate::apply()
value = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls,
global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls));
settings->setAllowUniversalAccessFromFileURLs(value);
+ settings->setUsesPageCache(WebCore::pageCache()->capacity());
} else {
QList<QWebSettingsPrivate*> settings = *::allSettings();
for (int i = 0; i < settings.count(); ++i)
@@ -269,7 +262,7 @@ QWebSettings* QWebSettings::globalSettings()
setOfflineStoragePath() with an appropriate file path, and can limit the quota
for each application by calling setOfflineStorageDefaultQuota().
- \sa QWebPage::settings(), QWebView::settings(), {Browser}
+ \sa QWebPage::settings(), QWebView::settings(), {Web Browser}
*/
/*!
@@ -346,6 +339,8 @@ QWebSettings* QWebSettings::globalSettings()
web application cache feature is enabled or not. Disabled by default.
\value LocalStorageEnabled Specifies whether support for the HTML 5
local storage feature is enabled or not. Disabled by default.
+ \value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use
+ QWebSettings::LocalStorageEnabled instead.
\value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls.
*/
@@ -379,8 +374,6 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false);
d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
d->defaultTextEncoding = QLatin1String("iso-8859-1");
- d->printingMinimumShrinkFactor = 0.0f;
- d->printingMaximumShrinkFactor = 0.0f;
}
/*!
@@ -495,60 +488,6 @@ QString QWebSettings::defaultTextEncoding() const
}
/*!
- \since 4.7
- Specifies minimum shrink fator allowed for printing. If set to 0 a
- default value is used.
-
- When printing, content will be shrunk to reduce page usage, it
- will reduced by a factor between printingMinimumShrinkFactor and
- printingMaximumShrinkFactor.
-
- \sa printingMinimumShrinkFactor()
- \sa setPrintingMaximumShrinkFactor()
- \sa printingMaximumShrinkFactor()
-*/
-void QWebSettings::setPrintingMinimumShrinkFactor(float printingMinimumShrinkFactor)
-{
- d->printingMinimumShrinkFactor = printingMinimumShrinkFactor;
- d->apply();
-}
-
-/*!
- \since 4.7
- returns the minimum shrink factor used for printing.
-
- \sa setPrintingMinimumShrinkFactor()
-*/
-float QWebSettings::printingMinimumShrinkFactor() const
-{
- return d->printingMinimumShrinkFactor;
-}
-
-/*!
- \since 4.7
- Specifies maximum shrink fator allowed for printing. If set to 0 a
- default value is used.
-
- \sa setPrintingMinimumShrinkFactor()
-*/
-void QWebSettings::setPrintingMaximumShrinkFactor(float printingMaximumShrinkFactor)
-{
- d->printingMaximumShrinkFactor = printingMaximumShrinkFactor;
- d->apply();
-}
-
-/*!
- \since 4.7
- returns the maximum shrink factor used for printing.
-
- \sa setPrintingMinimumShrinkFactor()
-*/
-float QWebSettings::printingMaximumShrinkFactor() const
-{
- return d->printingMaximumShrinkFactor;
-}
-
-/*!
Sets the path of the icon database to \a path. The icon database is used
to store "favicons" associated with web sites.
@@ -618,7 +557,7 @@ QIcon QWebSettings::iconForUrl(const QUrl& url)
return* icon;
}
-/*!
+/*
Returns the plugin database object.
QWebPluginDatabase *QWebSettings::pluginDatabase()
@@ -704,7 +643,9 @@ void QWebSettings::clearMemoryCaches()
*/
void QWebSettings::setMaximumPagesInCache(int pages)
{
+ QWebSettingsPrivate* global = QWebSettings::globalSettings()->d;
WebCore::pageCache()->setCapacity(qMax(0, pages));
+ global->apply();
}
/*!