2010-01-22 Jeremy Orlow <jorlow@chromium.org>
authorjorlow@chromium.org <jorlow@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jan 2010 06:23:35 +0000 (06:23 +0000)
committerjorlow@chromium.org <jorlow@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Jan 2010 06:23:35 +0000 (06:23 +0000)
commite145cef1b9a2333c2ea7024e9a11fb4737cd3a5a
treeb4268c72423a5b87a48a1eb16795f3afd1e0188a
parent19f18c927206e2c43c7d1a23ec01cf11749368f7
2010-01-22  Jeremy Orlow  <jorlow@chromium.org>

        Reviewed by Darin Adler.

        Make storage events match the spec.
        https://bugs.webkit.org/show_bug.cgi?id=30546

        Update the storageEvent algorithm to match the change in WebCore.

        * src/StorageAreaProxy.cpp:
        (WebCore::StorageAreaProxy::storageEvent):
2010-01-22  Jeremy Orlow  <jorlow@chromium.org>

        Reviewed by Darin Adler.

        Make storage events match the spec.
        https://bugs.webkit.org/show_bug.cgi?id=30546

        This meat of the patch I just posted is very simple.  It's just making events
        asynchronous, not posting them to the frame that generated them, passing a null
        for the key when issuing a clear storage event, and making the events
        non-cancelable/non-bubbleable...all of which are clearly stated in the spec.

        The asynchronous and not posting to the frame that generated them forced me to
        re-write all the layout tests that dealt with storage events.  There's a lot of
        code there, but I tried to be fairly careful to ensure that test coverage did
        not shrink in any area.

        Tests: storage/domstorage/events/basic-body-attribute.html
               storage/domstorage/events/basic-setattribute.html
               storage/domstorage/events/basic.html
               storage/domstorage/events/case-sensitive.html
               storage/domstorage/events/documentURI.html

        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::enqueueStorageEvent):
        (WebCore::Document::storageEventTimerFired):
        * dom/Document.h:
        * storage/StorageEvent.cpp:
        (WebCore::StorageEvent::StorageEvent):
        * storage/StorageEvent.idl:
        * storage/StorageEventDispatcher.cpp:
        (WebCore::StorageEventDispatcher::dispatch):
2010-01-22  Jeremy Orlow  <jorlow@chromium.org>

        Reviewed by Darin Adler.

        Make storage events match the spec.
        https://bugs.webkit.org/show_bug.cgi?id=30546

        This meat of the patch I just posted is very simple.  It's just making events
        asynchronous, not posting them to the frame that generated them, passing a null
        for the key when issuing a clear storage event, and making the events
        non-cancelable/non-bubbleable...all of which are clearly stated in the spec.

        The asynchronous and not posting to the frame that generated them forced me to
        re-write all the layout tests that dealt with storage events.  There's a lot of
        code there, but I tried to be fairly careful to ensure that test coverage did
        not shrink in any area.

        * storage/domstorage/complex-values-expected.txt:
        * storage/domstorage/documentURI-expected.txt: Removed.
        * storage/domstorage/documentURI.html: Removed.
        * storage/domstorage/events: Added.
        * storage/domstorage/events/basic-body-attribute-expected.txt: Added.
        * storage/domstorage/events/basic-body-attribute.html: Added.
        * storage/domstorage/events/basic-expected.txt: Added.
        * storage/domstorage/events/basic-setattribute-expected.txt: Added.
        * storage/domstorage/events/basic-setattribute.html: Added.
        * storage/domstorage/events/basic.html: Added.
        * storage/domstorage/events/case-sensitive-expected.txt: Added.
        * storage/domstorage/events/case-sensitive.html: Added.
        * storage/domstorage/events/documentURI-expected.txt: Added.
        * storage/domstorage/events/documentURI.html: Added.
        * storage/domstorage/events/resources: Added.
        * storage/domstorage/events/resources/body-event-handler.html: Added.
        * storage/domstorage/events/resources/eventTestHarness.js: Added.
        * storage/domstorage/events/resources/setattribute-event-handler.html: Added.
        * storage/domstorage/events/script-tests: Added.
        * storage/domstorage/events/script-tests/TEMPLATE.html: Copied from LayoutTests/storage/domstorage/script-tests/TEMPLATE.html.
        * storage/domstorage/events/script-tests/basic-body-attribute.js: Added.
        * storage/domstorage/events/script-tests/basic-setattribute.js: Added.
        * storage/domstorage/events/script-tests/basic.js: Added.
        * storage/domstorage/events/script-tests/case-sensitive.js: Added.
        * storage/domstorage/events/script-tests/documentURI.js: Added.
        * storage/domstorage/localstorage/iframe-events-expected.txt: Removed.
        * storage/domstorage/localstorage/iframe-events.html: Removed.
        * storage/domstorage/localstorage/index-get-and-set-expected.txt:
        * storage/domstorage/localstorage/index-get-and-set.html:
        * storage/domstorage/localstorage/onstorage-attribute-markup-expected.txt: Removed.
        * storage/domstorage/localstorage/onstorage-attribute-markup.html: Removed.
        * storage/domstorage/localstorage/onstorage-attribute-setattribute-expected.txt: Removed.
        * storage/domstorage/localstorage/onstorage-attribute-setattribute.html: Removed.
        * storage/domstorage/localstorage/onstorage-attribute-setwindow-expected.txt: Removed.
        * storage/domstorage/localstorage/onstorage-attribute-setwindow.html: Removed.
        * storage/domstorage/localstorage/simple-events-expected.txt: Removed.
        * storage/domstorage/localstorage/simple-events.html: Removed.
        * storage/domstorage/script-tests/complex-values.js:
        * storage/domstorage/script-tests/documentURI.js: Removed.
        * storage/domstorage/sessionstorage/iframe-events-expected.txt: Removed.
        * storage/domstorage/sessionstorage/iframe-events.html: Removed.
        * storage/domstorage/sessionstorage/index-get-and-set-expected.txt:
        * storage/domstorage/sessionstorage/index-get-and-set.html:
        * storage/domstorage/sessionstorage/onstorage-attribute-markup-expected.txt: Removed.
        * storage/domstorage/sessionstorage/onstorage-attribute-markup.html: Removed.
        * storage/domstorage/sessionstorage/onstorage-attribute-setattribute-expected.txt: Removed.
        * storage/domstorage/sessionstorage/onstorage-attribute-setattribute.html: Removed.
        * storage/domstorage/sessionstorage/onstorage-attribute-setwindow-expected.txt: Removed.
        * storage/domstorage/sessionstorage/onstorage-attribute-setwindow.html: Removed.
        * storage/domstorage/sessionstorage/simple-events-expected.txt: Removed.
        * storage/domstorage/sessionstorage/simple-events.html: Removed.
        * storage/domstorage/window-attributes-exist-expected.txt:
        * storage/domstorage/window-attributes-exist.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@53840 268f45cc-cd09-0410-ab3c-d52691b4dbfc
58 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/domstorage/complex-values-expected.txt
LayoutTests/storage/domstorage/documentURI.html [deleted file]
LayoutTests/storage/domstorage/events/basic-body-attribute-expected.txt [new file with mode: 0644]
LayoutTests/storage/domstorage/events/basic-body-attribute.html [new file with mode: 0644]
LayoutTests/storage/domstorage/events/basic-expected.txt [new file with mode: 0644]
LayoutTests/storage/domstorage/events/basic-setattribute-expected.txt [new file with mode: 0644]
LayoutTests/storage/domstorage/events/basic-setattribute.html [new file with mode: 0644]
LayoutTests/storage/domstorage/events/basic.html [new file with mode: 0644]
LayoutTests/storage/domstorage/events/case-sensitive-expected.txt [new file with mode: 0644]
LayoutTests/storage/domstorage/events/case-sensitive.html [new file with mode: 0644]
LayoutTests/storage/domstorage/events/documentURI-expected.txt [moved from LayoutTests/storage/domstorage/documentURI-expected.txt with 61% similarity]
LayoutTests/storage/domstorage/events/documentURI.html [new file with mode: 0644]
LayoutTests/storage/domstorage/events/resources/body-event-handler.html [new file with mode: 0644]
LayoutTests/storage/domstorage/events/resources/eventTestHarness.js [new file with mode: 0644]
LayoutTests/storage/domstorage/events/resources/setattribute-event-handler.html [new file with mode: 0644]
LayoutTests/storage/domstorage/events/script-tests/TEMPLATE.html [new file with mode: 0644]
LayoutTests/storage/domstorage/events/script-tests/basic-body-attribute.js [new file with mode: 0644]
LayoutTests/storage/domstorage/events/script-tests/basic-setattribute.js [new file with mode: 0644]
LayoutTests/storage/domstorage/events/script-tests/basic.js [new file with mode: 0644]
LayoutTests/storage/domstorage/events/script-tests/case-sensitive.js [new file with mode: 0644]
LayoutTests/storage/domstorage/events/script-tests/documentURI.js [new file with mode: 0644]
LayoutTests/storage/domstorage/localstorage/iframe-events-expected.txt [deleted file]
LayoutTests/storage/domstorage/localstorage/iframe-events.html [deleted file]
LayoutTests/storage/domstorage/localstorage/index-get-and-set-expected.txt
LayoutTests/storage/domstorage/localstorage/index-get-and-set.html
LayoutTests/storage/domstorage/localstorage/onstorage-attribute-markup-expected.txt [deleted file]
LayoutTests/storage/domstorage/localstorage/onstorage-attribute-markup.html [deleted file]
LayoutTests/storage/domstorage/localstorage/onstorage-attribute-setattribute-expected.txt [deleted file]
LayoutTests/storage/domstorage/localstorage/onstorage-attribute-setattribute.html [deleted file]
LayoutTests/storage/domstorage/localstorage/onstorage-attribute-setwindow-expected.txt [deleted file]
LayoutTests/storage/domstorage/localstorage/onstorage-attribute-setwindow.html [deleted file]
LayoutTests/storage/domstorage/localstorage/simple-events-expected.txt [deleted file]
LayoutTests/storage/domstorage/localstorage/simple-events.html [deleted file]
LayoutTests/storage/domstorage/script-tests/complex-values.js
LayoutTests/storage/domstorage/script-tests/documentURI.js [deleted file]
LayoutTests/storage/domstorage/sessionstorage/iframe-events-expected.txt [deleted file]
LayoutTests/storage/domstorage/sessionstorage/iframe-events.html [deleted file]
LayoutTests/storage/domstorage/sessionstorage/index-get-and-set-expected.txt
LayoutTests/storage/domstorage/sessionstorage/index-get-and-set.html
LayoutTests/storage/domstorage/sessionstorage/onstorage-attribute-markup-expected.txt [deleted file]
LayoutTests/storage/domstorage/sessionstorage/onstorage-attribute-markup.html [deleted file]
LayoutTests/storage/domstorage/sessionstorage/onstorage-attribute-setattribute-expected.txt [deleted file]
LayoutTests/storage/domstorage/sessionstorage/onstorage-attribute-setattribute.html [deleted file]
LayoutTests/storage/domstorage/sessionstorage/onstorage-attribute-setwindow-expected.txt [deleted file]
LayoutTests/storage/domstorage/sessionstorage/onstorage-attribute-setwindow.html [deleted file]
LayoutTests/storage/domstorage/sessionstorage/simple-events-expected.txt [deleted file]
LayoutTests/storage/domstorage/sessionstorage/simple-events.html [deleted file]
LayoutTests/storage/domstorage/window-attributes-exist-expected.txt
LayoutTests/storage/domstorage/window-attributes-exist.html
WebCore/ChangeLog
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/storage/StorageEvent.cpp
WebCore/storage/StorageEvent.idl
WebCore/storage/StorageEventDispatcher.cpp
WebKit/chromium/ChangeLog
WebKit/chromium/src/StorageAreaProxy.cpp