Skip to content
  • commit-queue@webkit.org's avatar
    PopStateEvent.state should use the same object as history.state · 7a2b40f6
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=77493
    
    Patch by Pablo Flouret <pablof@motorola.com> on 2012-02-22
    Reviewed by Kentaro Hara.
    
    Source/WebCore:
    
    Tests: fast/loader/stateobjects/state-attribute-history-getter.html
           fast/loader/stateobjects/state-attribute-popstate-event.html
    
    * bindings/js/JSPopStateEventCustom.cpp:
    (WebCore):
    (WebCore::cacheState):
    (WebCore::JSPopStateEvent::state):
    * bindings/v8/V8HiddenPropertyName.h:
    (WebCore):
    * bindings/v8/custom/V8HistoryCustom.cpp:
    (WebCore::V8History::stateAccessorGetter):
    (WebCore::V8History::pushStateCallback):
    (WebCore::V8History::replaceStateCallback):
    * bindings/v8/custom/V8PopStateEventCustom.cpp:
    (WebCore):
    (WebCore::cacheState):
    (WebCore::V8PopStateEvent::stateAccessorGetter):
    * dom/Document.cpp:
    (WebCore::Document::enqueuePopstateEvent):
    * dom/PopStateEvent.cpp:
    (WebCore::PopStateEvent::PopStateEvent):
    (WebCore::PopStateEvent::create):
    * dom/PopStateEvent.h:
    (WebCore):
    (PopStateEvent):
    (WebCore::PopStateEvent::history):
    * dom/PopStateEvent.idl:
    * page/History.cpp:
    (WebCore::History::stateChanged):
    (WebCore):
    (WebCore::History::isSameAsCurrentState):
    * page/History.h:
    (History):
    
    LayoutTests:
    
    * fast/loader/stateobjects/state-attribute-history-getter-expected.txt: Added.
    * fast/loader/stateobjects/state-attribute-history-getter.html: Added.
    * fast/loader/stateobjects/state-attribute-only-one-deserialization-expected.txt:
    * fast/loader/stateobjects/state-attribute-only-one-deserialization.html:
    * fast/loader/stateobjects/state-attribute-popstate-event-expected.txt: Added.
    * fast/loader/stateobjects/state-attribute-popstate-event.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7a2b40f6