From 5f1ab04193ad0130ca8204aadaceae083aca9881 Mon Sep 17 00:00:00 2001 From: Feng Qian Date: Wed, 17 Jun 2009 12:12:20 -0700 Subject: Get WebKit r44544. --- WebCore/storage/SessionStorageArea.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'WebCore/storage/SessionStorageArea.cpp') diff --git a/WebCore/storage/SessionStorageArea.cpp b/WebCore/storage/SessionStorageArea.cpp index 285922e..60c9501 100644 --- a/WebCore/storage/SessionStorageArea.cpp +++ b/WebCore/storage/SessionStorageArea.cpp @@ -26,12 +26,15 @@ #include "config.h" #include "SessionStorageArea.h" +#include "DOMWindow.h" #include "EventNames.h" #include "Frame.h" #include "FrameTree.h" +#include "HTMLElement.h" #include "Page.h" #include "PlatformString.h" #include "SecurityOrigin.h" +#include "StorageEvent.h" #include "StorageMap.h" namespace WebCore { @@ -78,11 +81,9 @@ void SessionStorageArea::dispatchStorageEvent(const String& key, const String& o if (frame->document()->securityOrigin()->equal(securityOrigin())) frames.append(frame); } - - for (unsigned i = 0; i < frames.size(); ++i) { - if (HTMLElement* body = frames[i]->document()->body()) - body->dispatchStorageEvent(eventNames().storageEvent, key, oldValue, newValue, sourceFrame); - } + + for (unsigned i = 0; i < frames.size(); ++i) + frames[i]->document()->dispatchWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->documentURI(), sourceFrame->domWindow(), frames[i]->domWindow()->sessionStorage())); } } // namespace WebCore -- cgit v1.1