Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (121254 => 121255)
--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-06-26 12:10:58 UTC (rev 121254)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-06-26 12:17:41 UTC (rev 121255)
@@ -6312,6 +6312,7 @@
coreSettings->setOfflineWebApplicationCacheEnabled(webSettings->isAppCacheEnabled());
m_page->group().groupSettings()->setLocalStorageQuotaBytes(webSettings->localStorageQuota());
+ coreSettings->setSessionStorageQuota(webSettings->sessionStorageQuota());
coreSettings->setUsesPageCache(webSettings->maximumPagesInCache());
coreSettings->setFrameFlatteningEnabled(webSettings->isFrameFlatteningEnabled());
#endif
Modified: trunk/Source/WebKit/blackberry/Api/WebSettings.cpp (121254 => 121255)
--- trunk/Source/WebKit/blackberry/Api/WebSettings.cpp 2012-06-26 12:10:58 UTC (rev 121254)
+++ trunk/Source/WebKit/blackberry/Api/WebSettings.cpp 2012-06-26 12:17:41 UTC (rev 121255)
@@ -76,6 +76,7 @@
DEFINE_STATIC_LOCAL(String, WebKitLocalStorageEnabled, ("WebKitLocalStorageEnabled"));
DEFINE_STATIC_LOCAL(String, WebKitLocalStoragePath, ("WebKitLocalStoragePath"));
DEFINE_STATIC_LOCAL(String, WebKitLocalStorageQuota, ("WebKitLocalStorageQuota"));
+DEFINE_STATIC_LOCAL(String, WebKitSessionStorageQuota, ("WebKitSessionStorageQuota"));
DEFINE_STATIC_LOCAL(String, WebKitMaximumPagesInCache, ("WebKitMaximumPagesInCache"));
DEFINE_STATIC_LOCAL(String, WebKitMinimumFontSize, ("WebKitMinimumFontSize"));
DEFINE_STATIC_LOCAL(String, WebKitOfflineWebApplicationCacheEnabled, ("WebKitOfflineWebApplicationCacheEnabled"));
@@ -180,6 +181,7 @@
settings->m_private->setBoolean(WebKitJavaScriptEnabled, true);
settings->m_private->setBoolean(WebKitLoadsImagesAutomatically, true);
settings->m_private->setUnsignedLongLong(WebKitLocalStorageQuota, 5 * 1024 * 1024);
+ settings->m_private->setUnsignedLongLong(WebKitSessionStorageQuota, 5 * 1024 * 1024);
settings->m_private->setInteger(WebKitMaximumPagesInCache, 0);
settings->m_private->setInteger(WebKitMinimumFontSize, 8);
settings->m_private->setBoolean(WebKitWebSocketsEnabled, true);
@@ -599,6 +601,16 @@
m_private->setUnsignedLongLong(WebKitLocalStorageQuota, quota);
}
+unsigned long long WebSettings::sessionStorageQuota() const
+{
+ return m_private->getUnsignedLongLong(WebKitSessionStorageQuota);
+}
+
+void WebSettings::setSessionStorageQuota(unsigned long long quota)
+{
+ m_private->setUnsignedLongLong(WebKitSessionStorageQuota, quota);
+}
+
int WebSettings::maximumPagesInCache() const
{
// FIXME: We shouldn't be calling into WebCore from here. This class should just be a state store.
Modified: trunk/Source/WebKit/blackberry/Api/WebSettings.h (121254 => 121255)
--- trunk/Source/WebKit/blackberry/Api/WebSettings.h 2012-06-26 12:10:58 UTC (rev 121254)
+++ trunk/Source/WebKit/blackberry/Api/WebSettings.h 2012-06-26 12:17:41 UTC (rev 121255)
@@ -168,6 +168,8 @@
unsigned long long localStorageQuota() const;
void setLocalStorageQuota(unsigned long long);
+ unsigned long long sessionStorageQuota() const;
+ void setSessionStorageQuota(unsigned long long);
// Page cache
void setMaximumPagesInCache(int);
Modified: trunk/Source/WebKit/blackberry/ChangeLog (121254 => 121255)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-06-26 12:10:58 UTC (rev 121254)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-06-26 12:17:41 UTC (rev 121255)
@@ -1,3 +1,23 @@
+2012-06-26 Jonathan Dong <[email protected]>
+
+ [BlackBerry] Limit session storage quota to 5MB by default
+ https://bugs.webkit.org/show_bug.cgi?id=89941
+
+ Reviewed by Rob Buis.
+
+ Limit session storage quota to 5MB by default for BlackBerry
+ porting.
+ Internally reviewed by George Staikos.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
+ * Api/WebSettings.cpp:
+ (WebKit):
+ (BlackBerry::WebKit::WebSettings::standardSettings):
+ (BlackBerry::WebKit::WebSettings::sessionStorageQuota):
+ (BlackBerry::WebKit::WebSettings::setSessionStorageQuota):
+ * Api/WebSettings.h:
+
2012-06-26 Charles Wei <[email protected]>
[BlackBerry] Use gesture SwipeDown to exit fullscreen for both video and plugin.