diff options
Diffstat (limited to 'WebCore/storage/SessionStorageArea.cpp')
-rw-r--r-- | WebCore/storage/SessionStorageArea.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/WebCore/storage/SessionStorageArea.cpp b/WebCore/storage/SessionStorageArea.cpp index 884208e..168c493 100644 --- a/WebCore/storage/SessionStorageArea.cpp +++ b/WebCore/storage/SessionStorageArea.cpp @@ -31,9 +31,11 @@ #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 { @@ -80,11 +82,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 |