OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 if (initializer.hasNewValue()) | 74 if (initializer.hasNewValue()) |
75 m_newValue = initializer.newValue(); | 75 m_newValue = initializer.newValue(); |
76 if (initializer.hasURL()) | 76 if (initializer.hasURL()) |
77 m_url = initializer.url(); | 77 m_url = initializer.url(); |
78 if (initializer.hasStorageArea()) | 78 if (initializer.hasStorageArea()) |
79 m_storageArea = initializer.storageArea(); | 79 m_storageArea = initializer.storageArea(); |
80 } | 80 } |
81 | 81 |
82 void StorageEvent::initStorageEvent(const AtomicString& type, bool canBubble, bo
ol cancelable, const String& key, const String& oldValue, const String& newValue
, const String& url, Storage* storageArea) | 82 void StorageEvent::initStorageEvent(const AtomicString& type, bool canBubble, bo
ol cancelable, const String& key, const String& oldValue, const String& newValue
, const String& url, Storage* storageArea) |
83 { | 83 { |
84 if (dispatched()) | 84 if (isBeingDispatched()) |
85 return; | 85 return; |
86 | 86 |
87 initEvent(type, canBubble, cancelable); | 87 initEvent(type, canBubble, cancelable); |
88 | 88 |
89 m_key = key; | 89 m_key = key; |
90 m_oldValue = oldValue; | 90 m_oldValue = oldValue; |
91 m_newValue = newValue; | 91 m_newValue = newValue; |
92 m_url = url; | 92 m_url = url; |
93 m_storageArea = storageArea; | 93 m_storageArea = storageArea; |
94 } | 94 } |
95 | 95 |
96 const AtomicString& StorageEvent::interfaceName() const | 96 const AtomicString& StorageEvent::interfaceName() const |
97 { | 97 { |
98 return EventNames::StorageEvent; | 98 return EventNames::StorageEvent; |
99 } | 99 } |
100 | 100 |
101 DEFINE_TRACE(StorageEvent) | 101 DEFINE_TRACE(StorageEvent) |
102 { | 102 { |
103 visitor->trace(m_storageArea); | 103 visitor->trace(m_storageArea); |
104 Event::trace(visitor); | 104 Event::trace(visitor); |
105 } | 105 } |
106 | 106 |
107 } // namespace blink | 107 } // namespace blink |
OLD | NEW |