[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 17:50:45 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 87ff4dcb157bed6cda524a377bd5712af0395b77
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 1 12:03:53 2010 +0000
2010-12-01 Anton D'Auria <adauria at apple.com>
Reviewed by Kevin Decker.
Private browsing denies read access to local and session storage,
so updating expected test results.
https://bugs.webkit.org/show_bug.cgi?id=49329
* storage/domstorage/localstorage/private-browsing-affects-storage-expected.txt:
* storage/domstorage/sessionstorage/private-browsing-affects-storage-expected.txt:
2010-12-01 Anton D'Auria <adauria at apple.com>
Reviewed by Kevin Decker.
Deny access to local and session storage in private browsing mode.
https://bugs.webkit.org/show_bug.cgi?id=49329
* storage/Storage.cpp:
(WebCore::Storage::length):
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::contains):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c5cad48..653a2e9 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-01 Anton D'Auria <adauria at apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Private browsing denies read access to local and session storage,
+ so updating expected test results.
+
+ https://bugs.webkit.org/show_bug.cgi?id=49329
+
+ * storage/domstorage/localstorage/private-browsing-affects-storage-expected.txt:
+ * storage/domstorage/sessionstorage/private-browsing-affects-storage-expected.txt:
+
2010-12-01 Hayato Ito <hayato at chromium.org>
Unreviewed trivial fix.
diff --git a/LayoutTests/storage/domstorage/localstorage/private-browsing-affects-storage-expected.txt b/LayoutTests/storage/domstorage/localstorage/private-browsing-affects-storage-expected.txt
index 6de4296..2fea061 100644
--- a/LayoutTests/storage/domstorage/localstorage/private-browsing-affects-storage-expected.txt
+++ b/LayoutTests/storage/domstorage/localstorage/private-browsing-affects-storage-expected.txt
@@ -1,7 +1,7 @@
This is a test to make sure that when private browsing is on any attempt to change the localStorage area fail.
-Initial value of testItem is: InitialValue
+Initial value of testItem is: null
Caught exception trying to change item: Error: QUOTA_EXCEEDED_ERR: DOM Exception 22
-After change attempt, testItem is: InitialValue
-After remove attempt, testItem is: InitialValue
-After clear attempt, testItem is: InitialValue
+After change attempt, testItem is: null
+After remove attempt, testItem is: null
+After clear attempt, testItem is: null
diff --git a/LayoutTests/storage/domstorage/sessionstorage/private-browsing-affects-storage-expected.txt b/LayoutTests/storage/domstorage/sessionstorage/private-browsing-affects-storage-expected.txt
index ed2017a..58c99f2 100644
--- a/LayoutTests/storage/domstorage/sessionstorage/private-browsing-affects-storage-expected.txt
+++ b/LayoutTests/storage/domstorage/sessionstorage/private-browsing-affects-storage-expected.txt
@@ -1,7 +1,7 @@
This is a test to make sure that when private browsing is on any attempt to change the sessionStorage area fail.
-Initial value of testItem is: InitialValue
+Initial value of testItem is: null
Caught exception trying to change item: Error: QUOTA_EXCEEDED_ERR: DOM Exception 22
-After change attempt, testItem is: InitialValue
-After remove attempt, testItem is: InitialValue
-After clear attempt, testItem is: InitialValue
+After change attempt, testItem is: null
+After remove attempt, testItem is: null
+After clear attempt, testItem is: null
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9fe856f..5267fca 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-01 Anton D'Auria <adauria at apple.com>
+
+ Reviewed by Kevin Decker.
+
+ Deny access to local and session storage in private browsing mode.
+ https://bugs.webkit.org/show_bug.cgi?id=49329
+
+ * storage/Storage.cpp:
+ (WebCore::Storage::length):
+ (WebCore::Storage::key):
+ (WebCore::Storage::getItem):
+ (WebCore::Storage::contains):
+
2010-12-01 Philippe Normand <pnormand at igalia.com>
Reviewed by Martin Robinson.
diff --git a/WebCore/storage/Storage.cpp b/WebCore/storage/Storage.cpp
index 0a8eed7..0259ca4 100644
--- a/WebCore/storage/Storage.cpp
+++ b/WebCore/storage/Storage.cpp
@@ -28,6 +28,9 @@
#if ENABLE(DOM_STORAGE)
+#include "Frame.h"
+#include "Page.h"
+#include "Settings.h"
#include "StorageArea.h"
#include "PlatformString.h"
#include <wtf/PassRefPtr.h>
@@ -53,7 +56,7 @@ Storage::~Storage()
unsigned Storage::length() const
{
- if (!m_frame)
+ if (!m_frame || !m_frame->page() || m_frame->page()->settings()->privateBrowsingEnabled())
return 0;
return m_storageArea->length();
@@ -61,7 +64,7 @@ unsigned Storage::length() const
String Storage::key(unsigned index) const
{
- if (!m_frame)
+ if (!m_frame || !m_frame->page() || m_frame->page()->settings()->privateBrowsingEnabled())
return String();
return m_storageArea->key(index);
@@ -69,7 +72,7 @@ String Storage::key(unsigned index) const
String Storage::getItem(const String& key) const
{
- if (!m_frame)
+ if (!m_frame || !m_frame->page() || m_frame->page()->settings()->privateBrowsingEnabled())
return String();
return m_storageArea->getItem(key);
@@ -102,7 +105,7 @@ void Storage::clear()
bool Storage::contains(const String& key) const
{
- if (!m_frame)
+ if (!m_frame || !m_frame->page() || m_frame->page()->settings()->privateBrowsingEnabled())
return false;
return m_storageArea->contains(key);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list