https://bugs.webkit.org/show_bug.cgi?id=83253
Patch by Jonathan Dong <jonathan.dong@torchmobile.com.cn> on 2012-04-05
Reviewed by Rob Buis.
.:
RIM PR: #146871
Added a manual test case to test the behavior when press
button "Clear Local Storage" from browser settings.
It has to be a manual test as it requires user interaction.
* ManualTests/blackberry/clear-localstorage.html: Added.
Source/WebKit/blackberry:
RIM PR: #146871
Cleared the local storage namespace of a WebPage's PageGroup
when WebPage::clearLocalStorage() get called.
Also deleted unused global function clearLocalStorage().
* Api/BlackBerryGlobal.cpp:
* Api/BlackBerryGlobal.h:
(WebKit):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::clearLocalStorage):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@113309
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-04-05 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] Clear local storage won't take effect until browser exit and relaunch
+ https://bugs.webkit.org/show_bug.cgi?id=83253
+
+ Reviewed by Rob Buis.
+
+ RIM PR: #146871
+ Added a manual test case to test the behavior when press
+ button "Clear Local Storage" from browser settings.
+ It has to be a manual test as it requires user interaction.
+
+ * ManualTests/blackberry/clear-localstorage.html: Added.
+
2012-04-04 Kent Tamura <tkent@chromium.org>
Add JavaScript and CSS code for the calendar picker implementation
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <body>
+ <p>This test case is used to test the function of clear local storage by clicking "Clear Local Storage" button
+ from Settings -> Privacy & Security. This is for <a href="https://bugs.webkit.org/show_bug.cgi?id=83253">https://bugs.webkit.org/show_bug.cgi?id=83253</a></p>
+ <div>
+ <script type="text/javascript">
+ if (!sessionStorage.getItem("key")) {
+ // initialize test case
+ document.write("Status: <span style='color:yellow'>Initial</span>");
+ sessionStorage.setItem("key", "value");
+ localStorage.setItem("key", "value");
+
+ // notify to clear the local storage and refresh the page.
+ document.write("<p>Please clear the local storage from Settings -> Privacy & Security by pressing \"Clear Local Storage\" button, then reload this page to see the result.</p>");
+ } else {
+ document.write("Result: ");
+ if (!localStorage.getItem("key")) {
+ // success
+ document.write("<span style='color:green'>PASS</span>");
+ } else {
+ // fail
+ document.write("<span style='color:red'>FAIL</span>");
+ }
+ document.write("<p>If you want to run this test case again, please restart the browser.</p>");
+ }
+ </script>
+ </div>
+ </body>
+</html>
cacheStorage().empty();
}
-void clearLocalStorage(const WebString& pageGroupName)
-{
-}
-
void clearDatabase(const WebString& pageGroupName)
{
}
void clearAppCache(const WebString& pageGroupName);
void reopenAllAppCaches();
void closeAllAppCaches();
-void clearLocalStorage(const WebString& pageGroupName);
-void closeAllLocalStorages();
void clearDatabase(const WebString& pageGroupName);
void reopenAllTrackerDatabases();
void closeAllTrackerDatabases();
void WebPage::clearLocalStorage()
{
- BlackBerry::WebKit::clearLocalStorage(d->m_page->groupName());
- clearDatabase(d->m_page->groupName());
+ if (PageGroup* group = d->m_page->groupPtr()) {
+ if (StorageNamespace* storage = group->localStorage())
+ storage->clearAllOriginsForDeletion();
+ }
}
void WebPage::clearCredentials()
+2012-04-05 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] Clear local storage won't take effect until browser exit and relaunch
+ https://bugs.webkit.org/show_bug.cgi?id=83253
+
+ Reviewed by Rob Buis.
+
+ RIM PR: #146871
+ Cleared the local storage namespace of a WebPage's PageGroup
+ when WebPage::clearLocalStorage() get called.
+ Also deleted unused global function clearLocalStorage().
+
+ * Api/BlackBerryGlobal.cpp:
+ * Api/BlackBerryGlobal.h:
+ (WebKit):
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPage::clearLocalStorage):
+
2012-04-04 Rob Buis <rbuis@rim.com>
[BlackBerry] Make the switch statement in WebPage::notifyAppActivationStateChange() stronger