RESOLVED INVALID 72628
QWebSettings::setOfflineStorageDefaultQuota has no effect
https://bugs.webkit.org/show_bug.cgi?id=72628
Summary QWebSettings::setOfflineStorageDefaultQuota has no effect
Bernhard Rosenkraenzer
Reported 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.
Attachments
Proposed patch (638 bytes, patch)
2011-11-17 10:12 PST, Bernhard Rosenkraenzer
no flags
Bernhard Rosenkraenzer
Comment 1 2011-11-17 10:12:49 PST
Created attachment 115613 [details] Proposed patch
Bernhard Rosenkraenzer
Comment 2 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
Chen Zhixiang
Comment 3 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.
Jocelyn Turcotte
Comment 4 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.
Note You need to log in before you can comment on or make changes to this bug.