mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 04:36:34 +01:00
Fixed loading NYTimes Skimmer page.
https://www.nytimes.com/skimmer/#/Top+News Implemented applicationCacheQuotaExceeded and databaseQuotaExceeded slots that increases quotas.
This commit is contained in:
parent
2135ab8d13
commit
30719365ac
@ -12,6 +12,7 @@ Version 1.4.0
|
|||||||
* option to disable alt/ctrl + numbers shortcuts
|
* option to disable alt/ctrl + numbers shortcuts
|
||||||
* option to switch to tab from locationbar popup completer
|
* option to switch to tab from locationbar popup completer
|
||||||
* use .qupzilla/tmp instead of /tmp for temporary data
|
* use .qupzilla/tmp instead of /tmp for temporary data
|
||||||
|
* fixed loading NYTimes skimmer page
|
||||||
* fixed cookie domain handling according to RFC 6265
|
* fixed cookie domain handling according to RFC 6265
|
||||||
* fixed qvalue format in Accept-Language HTTP header
|
* fixed qvalue format in Accept-Language HTTP header
|
||||||
* fixed sorting files case insensitively in file scheme handler
|
* fixed sorting files case insensitively in file scheme handler
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -58,6 +58,7 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QWebFrame>
|
#include <QWebFrame>
|
||||||
|
#include <QWebSecurityOrigin>
|
||||||
|
|
||||||
QString WebPage::s_lastUploadLocation = QDir::homePath();
|
QString WebPage::s_lastUploadLocation = QDir::homePath();
|
||||||
QUrl WebPage::s_lastUnsupportedUrl;
|
QUrl WebPage::s_lastUnsupportedUrl;
|
||||||
@ -92,12 +93,26 @@ WebPage::WebPage(QupZilla* mainClass)
|
|||||||
connect(this, SIGNAL(downloadRequested(QNetworkRequest)), this, SLOT(downloadRequested(QNetworkRequest)));
|
connect(this, SIGNAL(downloadRequested(QNetworkRequest)), this, SLOT(downloadRequested(QNetworkRequest)));
|
||||||
connect(this, SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
|
connect(this, SIGNAL(windowCloseRequested()), this, SLOT(windowCloseRequested()));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(databaseQuotaExceeded(QWebFrame*, QString)),
|
||||||
|
this, SLOT(dbQuotaExceeded(QWebFrame*)));
|
||||||
|
|
||||||
connect(mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(addJavaScriptObject()));
|
connect(mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(addJavaScriptObject()));
|
||||||
|
|
||||||
#if QTWEBKIT_FROM_2_2
|
#if QTWEBKIT_FROM_2_2
|
||||||
connect(this, SIGNAL(featurePermissionRequested(QWebFrame*, QWebPage::Feature)), this, SLOT(featurePermissionRequested(QWebFrame*, QWebPage::Feature)));
|
connect(this, SIGNAL(featurePermissionRequested(QWebFrame*, QWebPage::Feature)),
|
||||||
|
this, SLOT(featurePermissionRequested(QWebFrame*, QWebPage::Feature)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if QTWEBKIT_FROM_2_3
|
||||||
|
connect(this, SIGNAL(applicationCacheQuotaExceeded(QWebSecurityOrigin*, quint64, quint64)),
|
||||||
|
this, SLOT(appCacheQuotaExceeded(QWebSecurityOrigin*, quint64)));
|
||||||
|
#else
|
||||||
|
connect(this, SIGNAL(applicationCacheQuotaExceeded(QWebSecurityOrigin*, quint64)),
|
||||||
|
this, SLOT(appCacheQuotaExceeded(QWebSecurityOrigin*, quint64)));
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
s_livingPages.append(this);
|
s_livingPages.append(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -392,6 +407,27 @@ void WebPage::windowCloseRequested()
|
|||||||
webView->closeView();
|
webView->closeView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WebPage::dbQuotaExceeded(QWebFrame* frame)
|
||||||
|
{
|
||||||
|
if (!frame) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QWebSecurityOrigin &origin = frame->securityOrigin();
|
||||||
|
const qint64 oldQuota = origin.databaseQuota();
|
||||||
|
|
||||||
|
frame->securityOrigin().setDatabaseQuota(oldQuota * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebPage::appCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 originalQuota)
|
||||||
|
{
|
||||||
|
if (!origin) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
origin->setApplicationCacheQuota(originalQuota * 2);
|
||||||
|
}
|
||||||
|
|
||||||
#if QTWEBKIT_FROM_2_2
|
#if QTWEBKIT_FROM_2_2
|
||||||
void WebPage::featurePermissionRequested(QWebFrame* frame, const QWebPage::Feature &feature)
|
void WebPage::featurePermissionRequested(QWebFrame* frame, const QWebPage::Feature &feature)
|
||||||
{
|
{
|
||||||
@ -504,7 +540,8 @@ QWebPage* WebPage::createWindow(QWebPage::WebWindowType type)
|
|||||||
return new PopupWebPage(type, p_QupZilla);
|
return new PopupWebPage(type, p_QupZilla);
|
||||||
}
|
}
|
||||||
|
|
||||||
QObject* WebPage::createPlugin(const QString &classid, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues)
|
QObject* WebPage::createPlugin(const QString &classid, const QUrl &url,
|
||||||
|
const QStringList ¶mNames, const QStringList ¶mValues)
|
||||||
{
|
{
|
||||||
Q_UNUSED(url)
|
Q_UNUSED(url)
|
||||||
Q_UNUSED(paramNames)
|
Q_UNUSED(paramNames)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -96,6 +96,9 @@ private slots:
|
|||||||
void downloadRequested(const QNetworkRequest &request);
|
void downloadRequested(const QNetworkRequest &request);
|
||||||
void windowCloseRequested();
|
void windowCloseRequested();
|
||||||
|
|
||||||
|
void dbQuotaExceeded(QWebFrame* frame);
|
||||||
|
void appCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 originalQuota);
|
||||||
|
|
||||||
#ifdef USE_QTWEBKIT_2_2
|
#ifdef USE_QTWEBKIT_2_2
|
||||||
void featurePermissionRequested(QWebFrame* frame, const QWebPage::Feature &feature);
|
void featurePermissionRequested(QWebFrame* frame, const QWebPage::Feature &feature);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user