| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google 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 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 * | 24 * |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/dom/DocumentEventQueue.h" | 28 #include "core/dom/DocumentEventQueue.h" |
| 29 | 29 |
| 30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
| 31 #include "core/dom/Event.h" | 31 #include "core/dom/Event.h" |
| 32 #include "core/dom/EventNames.h" | 32 #include "core/dom/EventNames.h" |
| 33 #include "core/dom/ScriptExecutionContext.h" | |
| 34 #include "core/dom/WebCoreMemoryInstrumentation.h" | 33 #include "core/dom/WebCoreMemoryInstrumentation.h" |
| 35 #include "core/page/DOMWindow.h" | 34 #include "core/page/DOMWindow.h" |
| 36 #include "core/page/SuspendableTimer.h" | 35 #include "core/page/SuspendableTimer.h" |
| 37 #include <wtf/MemoryInstrumentationHashSet.h> | 36 #include <wtf/MemoryInstrumentationHashSet.h> |
| 38 #include <wtf/MemoryInstrumentationListHashSet.h> | 37 #include <wtf/MemoryInstrumentationListHashSet.h> |
| 39 | 38 |
| 40 namespace WebCore { | 39 namespace WebCore { |
| 41 | 40 |
| 42 class DocumentEventQueueTimer : public SuspendableTimer { | 41 class DocumentEventQueueTimer : public SuspendableTimer { |
| 43 WTF_MAKE_NONCOPYABLE(DocumentEventQueueTimer); | 42 WTF_MAKE_NONCOPYABLE(DocumentEventQueueTimer); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 void DocumentEventQueue::dispatchEvent(PassRefPtr<Event> event) | 155 void DocumentEventQueue::dispatchEvent(PassRefPtr<Event> event) |
| 157 { | 156 { |
| 158 EventTarget* eventTarget = event->target(); | 157 EventTarget* eventTarget = event->target(); |
| 159 if (eventTarget->toDOMWindow()) | 158 if (eventTarget->toDOMWindow()) |
| 160 eventTarget->toDOMWindow()->dispatchEvent(event, 0); | 159 eventTarget->toDOMWindow()->dispatchEvent(event, 0); |
| 161 else | 160 else |
| 162 eventTarget->dispatchEvent(event); | 161 eventTarget->dispatchEvent(event); |
| 163 } | 162 } |
| 164 | 163 |
| 165 } | 164 } |
| OLD | NEW |