[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
jorlow at chromium.org
jorlow at chromium.org
Wed Mar 17 18:27:48 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 9b720b45abb7306ce7df182e4fd5b5b1d76d0a7c
Author: jorlow at chromium.org <jorlow at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Mar 8 12:19:47 2010 +0000
2010-03-08 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Darin Fisher.
Pass the WebFrame into WebStorageArea::setItem so we can figure out the routing ID
https://bugs.webkit.org/show_bug.cgi?id=35758
This is necessary since setItem is sometimes blocked and the embedder might need
to display some piece of UI associated with such an event.
* public/WebStorageArea.h:
(WebKit::WebStorageArea::setItem):
* src/StorageAreaProxy.cpp:
(WebCore::StorageAreaProxy::setItem):
* src/WebStorageAreaImpl.cpp:
(WebKit::WebStorageAreaImpl::setItem):
* src/WebStorageAreaImpl.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 1f65edb..6bdb4ff 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,21 @@
+2010-03-08 Jeremy Orlow <jorlow at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Pass the WebFrame into WebStorageArea::setItem so we can figure out the routing ID
+ https://bugs.webkit.org/show_bug.cgi?id=35758
+
+ This is necessary since setItem is sometimes blocked and the embedder might need
+ to display some piece of UI associated with such an event.
+
+ * public/WebStorageArea.h:
+ (WebKit::WebStorageArea::setItem):
+ * src/StorageAreaProxy.cpp:
+ (WebCore::StorageAreaProxy::setItem):
+ * src/WebStorageAreaImpl.cpp:
+ (WebKit::WebStorageAreaImpl::setItem):
+ * src/WebStorageAreaImpl.h:
+
2010-03-07 Mark Rowe <mrowe at apple.com>
Chromium build fix.
diff --git a/WebKit/chromium/public/WebStorageArea.h b/WebKit/chromium/public/WebStorageArea.h
index 5e2c11c..86f708c 100644
--- a/WebKit/chromium/public/WebStorageArea.h
+++ b/WebKit/chromium/public/WebStorageArea.h
@@ -36,6 +36,7 @@
namespace WebKit {
+class WebFrame;
class WebURL;
// In WebCore, there's one distinct StorageArea per origin per StorageNamespace. This
@@ -66,18 +67,14 @@ public:
// Set the value that corresponds to a specific key. Result will either be ResultOK
// or some particular error. The value is NOT set when there's an error. url is the
// url that should be used if a storage event fires.
- virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, Result& result, WebString& oldValue)
+ virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, Result& result, WebString& oldValue, WebFrame*)
{
- bool quotaException = false;
- setItem(key, newValue, url, quotaException, oldValue);
- result = quotaException ? ResultBlockedByQuota : ResultOK;
+ setItem(key, newValue, url, result, oldValue);
}
// FIXME: Remove soon (once Chrome has rolled past this revision).
- virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, bool& quotaException, WebString& oldValue)
+ virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, Result& result, WebString& oldValue)
{
- Result result;
- setItem(key, newValue, url, result, oldValue);
- quotaException = result != ResultOK;
+ setItem(key, newValue, url, result, oldValue, 0);
}
// Remove the value associated with a particular key. url is the url that should be used
diff --git a/WebKit/chromium/src/StorageAreaProxy.cpp b/WebKit/chromium/src/StorageAreaProxy.cpp
index c9185fe..f82e907 100644
--- a/WebKit/chromium/src/StorageAreaProxy.cpp
+++ b/WebKit/chromium/src/StorageAreaProxy.cpp
@@ -40,6 +40,7 @@
#include "StorageAreaImpl.h"
#include "StorageEvent.h"
+#include "WebFrameImpl.h"
#include "WebStorageArea.h"
#include "WebString.h"
#include "WebURL.h"
@@ -73,12 +74,13 @@ String StorageAreaProxy::getItem(const String& key) const
String StorageAreaProxy::setItem(const String& key, const String& value, ExceptionCode& ec, Frame* frame)
{
- bool quotaException = false;
+ WebKit::WebStorageArea::Result result = WebKit::WebStorageArea::ResultOK;
WebKit::WebString oldValue;
- m_storageArea->setItem(key, value, frame->document()->url(), quotaException, oldValue);
- ec = quotaException ? QUOTA_EXCEEDED_ERR : 0;
+ WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame);
+ m_storageArea->setItem(key, value, frame->document()->url(), result, oldValue, webFrame);
+ ec = (result == WebKit::WebStorageArea::ResultOK) ? 0 : QUOTA_EXCEEDED_ERR;
String oldValueString = oldValue;
- if (oldValueString != value)
+ if (oldValueString != value && result == WebKit::WebStorageArea::ResultOK)
storageEvent(key, oldValue, value, m_storageType, frame->document()->securityOrigin(), frame);
return oldValue;
}
diff --git a/WebKit/chromium/src/WebStorageAreaImpl.cpp b/WebKit/chromium/src/WebStorageAreaImpl.cpp
index 9a7fd5c..2cecfe9 100644
--- a/WebKit/chromium/src/WebStorageAreaImpl.cpp
+++ b/WebKit/chromium/src/WebStorageAreaImpl.cpp
@@ -66,7 +66,7 @@ WebString WebStorageAreaImpl::getItem(const WebString& key)
return m_storageArea->getItem(key);
}
-void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue)
+void WebStorageAreaImpl::setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue, WebFrame*)
{
int exceptionCode = 0;
diff --git a/WebKit/chromium/src/WebStorageAreaImpl.h b/WebKit/chromium/src/WebStorageAreaImpl.h
index e9a11c2..2869fc9 100644
--- a/WebKit/chromium/src/WebStorageAreaImpl.h
+++ b/WebKit/chromium/src/WebStorageAreaImpl.h
@@ -45,7 +45,7 @@ public:
virtual unsigned length();
virtual WebString key(unsigned index);
virtual WebString getItem(const WebString& key);
- virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue);
+ virtual void setItem(const WebString& key, const WebString& value, const WebURL& url, Result& result, WebString& oldValue, WebFrame*);
virtual void removeItem(const WebString& key, const WebURL& url, WebString& oldValue);
virtual void clear(const WebURL& url, bool& somethingCleared);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list