| 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 14 matching lines...) Expand all Loading... |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "core/events/PopStateEvent.h" | 27 #include "core/events/PopStateEvent.h" |
| 28 | 28 |
| 29 #include "bindings/core/v8/SerializedScriptValue.h" | 29 #include "bindings/core/v8/SerializedScriptValue.h" |
| 30 #include "core/frame/History.h" | 30 #include "core/frame/History.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 PopStateEvent::PopStateEvent() | 34 PopStateEvent::PopStateEvent() |
| 35 : Event(EventTypeNames::popstate, false, true), | 35 : m_serializedState(nullptr), m_history(nullptr) {} |
| 36 m_serializedState(nullptr), | |
| 37 m_history(nullptr) {} | |
| 38 | 36 |
| 39 PopStateEvent::PopStateEvent(const AtomicString& type, | 37 PopStateEvent::PopStateEvent(const AtomicString& type, |
| 40 const PopStateEventInit& initializer) | 38 const PopStateEventInit& initializer) |
| 41 : Event(type, initializer), m_history(nullptr) { | 39 : Event(type, initializer), m_history(nullptr) { |
| 42 if (initializer.hasState()) | 40 if (initializer.hasState()) |
| 43 m_state = initializer.state(); | 41 m_state = initializer.state(); |
| 44 } | 42 } |
| 45 | 43 |
| 46 PopStateEvent::PopStateEvent(PassRefPtr<SerializedScriptValue> serializedState, | 44 PopStateEvent::PopStateEvent(PassRefPtr<SerializedScriptValue> serializedState, |
| 47 History* history) | 45 History* history) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 69 const AtomicString& PopStateEvent::interfaceName() const { | 67 const AtomicString& PopStateEvent::interfaceName() const { |
| 70 return EventNames::PopStateEvent; | 68 return EventNames::PopStateEvent; |
| 71 } | 69 } |
| 72 | 70 |
| 73 DEFINE_TRACE(PopStateEvent) { | 71 DEFINE_TRACE(PopStateEvent) { |
| 74 visitor->trace(m_history); | 72 visitor->trace(m_history); |
| 75 Event::trace(visitor); | 73 Event::trace(visitor); |
| 76 } | 74 } |
| 77 | 75 |
| 78 } // namespace blink | 76 } // namespace blink |
| OLD | NEW |