Bug 72628 - QWebSettings::setOfflineStorageDefaultQuota has no effect
Summary: QWebSettings::setOfflineStorageDefaultQuota has no effect
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2011-11-17 09:53 PST by Bernhard Rosenkraenzer
Modified: 2014-02-03 03:50 PST (History)
1 user (show)

See Also:


Attachments
Proposed patch (638 bytes, patch)
2011-11-17 10:12 PST, Bernhard Rosenkraenzer
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Rosenkraenzer 2011-11-17 09:53:48 PST
After trying to increase available localStorage using QWebSettings::setOfflineStorageDefaultQuota(0xffffffff);, localStorage is still limited to 5 MB.

The problem is that lower level WebKit respects the limits set with Settings::setLocalStorageQuota - which isn't accessible through the Qt API layer.
IMO the fix is for QWebSettings::setOfflineStorageDefaultQuota(x) to call Settings::setLocalStorageQuota(x). Note, however, that the former takes a 64bit value while the latter takes a 32bit value.
Comment 1 Bernhard Rosenkraenzer 2011-11-17 10:12:49 PST
Created attachment 115613 [details]
Proposed patch
Comment 2 Bernhard Rosenkraenzer 2011-11-18 02:24:29 PST
Actually the proposed patch isn't going to work with the current version anymore (it was against the version of QtWebkit shipped with Qt 4.7.4) because the localStorage quota has moved to GroupSettings, which isn't accessible to global QWebSettings.

The most reasonable thing to do seems to be adding a setLocalStorageQuota API to QWebPage - the only thing to do without breaking the existing API that I can think of would be doing d->page->group().groupSettings()->setLocalStorageQuotaBytes(QWebSettings::globalSettings()->offlineStorageDefaultQuota()) in the QWebPage constructor
Comment 3 Chen Zhixiang 2013-07-12 03:47:09 PDT
I have recently encouter the similar problem, my fix is:

1) Change the QWebSettings ctor, & make an empty WebCore::Settings object:

QWebSettings::QWebSettings()
    //: d(new QWebSettingsPrivate)
    : d(new QWebSettingsPrivate(WebCore::Settings::create(0).leakPtr()))
{
    ...

2) Change WebCore/page/Settings.cpp, add NULL-check to every m_page->xxx calls.
Comment 4 Jocelyn Turcotte 2014-02-03 03:50:52 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.