OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 19 matching lines...) Expand all Loading... | |
30 #include "bindings/v8/SerializedScriptValue.h" | 30 #include "bindings/v8/SerializedScriptValue.h" |
31 #include "core/dom/EventNames.h" | 31 #include "core/dom/EventNames.h" |
32 #include "core/page/History.h" | 32 #include "core/page/History.h" |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 PopStateEventInit::PopStateEventInit() | 36 PopStateEventInit::PopStateEventInit() |
37 { | 37 { |
38 } | 38 } |
39 | 39 |
40 PopStateEvent::PopStateEvent() | 40 PopStateEvent::PopStateEvent() |
adamk
2013/06/27 00:15:04
Need to initialize m_stateIsSet here too.
jww
2013/06/27 04:35:35
Getting rid of m_stateisset.
| |
41 : Event(eventNames().popstateEvent, false, true) | 41 : Event(eventNames().popstateEvent, false, true) |
42 , m_serializedState(0) | 42 , m_serializedState(0) |
43 , m_history(0) | 43 , m_history(0) |
44 { | 44 { |
45 ScriptWrappable::init(this); | 45 ScriptWrappable::init(this); |
46 } | 46 } |
47 | 47 |
48 PopStateEvent::PopStateEvent(const AtomicString& type, const PopStateEventInit& initializer) | 48 PopStateEvent::PopStateEvent(const AtomicString& type, const PopStateEventInit& initializer) |
49 : Event(type, initializer) | 49 : Event(type, initializer) |
50 , m_state(initializer.state) | |
51 , m_serializedState(0) | 50 , m_serializedState(0) |
52 , m_history(0) | 51 , m_history(0) |
52 , m_stateIsSet(initializer.stateIsSet) | |
53 { | 53 { |
54 ScriptWrappable::init(this); | 54 ScriptWrappable::init(this); |
55 } | 55 } |
56 | 56 |
57 PopStateEvent::PopStateEvent(PassRefPtr<SerializedScriptValue> serializedState, PassRefPtr<History> history) | 57 PopStateEvent::PopStateEvent(PassRefPtr<SerializedScriptValue> serializedState, PassRefPtr<History> history) |
58 : Event(eventNames().popstateEvent, false, true) | 58 : Event(eventNames().popstateEvent, false, true) |
59 , m_serializedState(serializedState) | 59 , m_serializedState(serializedState) |
60 , m_history(history) | 60 , m_history(history) |
61 , m_stateIsSet(false) | |
61 { | 62 { |
62 ScriptWrappable::init(this); | 63 ScriptWrappable::init(this); |
63 } | 64 } |
64 | 65 |
65 PopStateEvent::~PopStateEvent() | 66 PopStateEvent::~PopStateEvent() |
66 { | 67 { |
67 } | 68 } |
68 | 69 |
69 PassRefPtr<PopStateEvent> PopStateEvent::create() | 70 PassRefPtr<PopStateEvent> PopStateEvent::create() |
70 { | 71 { |
71 return adoptRef(new PopStateEvent); | 72 return adoptRef(new PopStateEvent); |
72 } | 73 } |
73 | 74 |
74 PassRefPtr<PopStateEvent> PopStateEvent::create(PassRefPtr<SerializedScriptValue > serializedState, PassRefPtr<History> history) | 75 PassRefPtr<PopStateEvent> PopStateEvent::create(PassRefPtr<SerializedScriptValue > serializedState, PassRefPtr<History> history) |
75 { | 76 { |
76 return adoptRef(new PopStateEvent(serializedState, history)); | 77 return adoptRef(new PopStateEvent(serializedState, history)); |
77 } | 78 } |
78 | 79 |
79 PassRefPtr<PopStateEvent> PopStateEvent::create(const AtomicString& type, const PopStateEventInit& initializer) | 80 PassRefPtr<PopStateEvent> PopStateEvent::create(const AtomicString& type, const PopStateEventInit& initializer) |
80 { | 81 { |
81 return adoptRef(new PopStateEvent(type, initializer)); | 82 return adoptRef(new PopStateEvent(type, initializer)); |
82 } | 83 } |
83 | 84 |
84 const AtomicString& PopStateEvent::interfaceName() const | 85 const AtomicString& PopStateEvent::interfaceName() const |
85 { | 86 { |
86 return eventNames().interfaceForPopStateEvent; | 87 return eventNames().interfaceForPopStateEvent; |
87 } | 88 } |
88 | 89 |
89 } // namespace WebCore | 90 } // namespace WebCore |
OLD | NEW |