| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 if (m_isClosed) | 89 if (m_isClosed) |
| 90 return false; | 90 return false; |
| 91 | 91 |
| 92 ASSERT(event->target()); | 92 ASSERT(event->target()); |
| 93 InspectorInstrumentation::didEnqueueEvent(event->target(), event.get()); | 93 InspectorInstrumentation::didEnqueueEvent(event->target(), event.get()); |
| 94 | 94 |
| 95 bool wasAdded = m_queuedEvents.add(event).isNewEntry; | 95 bool wasAdded = m_queuedEvents.add(event).isNewEntry; |
| 96 ASSERT_UNUSED(wasAdded, wasAdded); // It should not have already been in the
list. | 96 ASSERT_UNUSED(wasAdded, wasAdded); // It should not have already been in the
list. |
| 97 | 97 |
| 98 if (!m_pendingEventTimer->isActive()) | 98 if (!m_pendingEventTimer->isActive()) |
| 99 m_pendingEventTimer->startOneShot(0, FROM_HERE); | 99 m_pendingEventTimer->startOneShot(0, BLINK_FROM_HERE); |
| 100 | 100 |
| 101 return true; | 101 return true; |
| 102 } | 102 } |
| 103 | 103 |
| 104 bool DOMWindowEventQueue::cancelEvent(Event* event) | 104 bool DOMWindowEventQueue::cancelEvent(Event* event) |
| 105 { | 105 { |
| 106 WillBeHeapListHashSet<RefPtrWillBeMember<Event>, 16>::iterator it = m_queued
Events.find(event); | 106 WillBeHeapListHashSet<RefPtrWillBeMember<Event>, 16>::iterator it = m_queued
Events.find(event); |
| 107 bool found = it != m_queuedEvents.end(); | 107 bool found = it != m_queuedEvents.end(); |
| 108 if (found) { | 108 if (found) { |
| 109 InspectorInstrumentation::didRemoveEvent(event->target(), event); | 109 InspectorInstrumentation::didRemoveEvent(event->target(), event); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 void DOMWindowEventQueue::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) | 154 void DOMWindowEventQueue::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) |
| 155 { | 155 { |
| 156 EventTarget* eventTarget = event->target(); | 156 EventTarget* eventTarget = event->target(); |
| 157 if (eventTarget->toDOMWindow()) | 157 if (eventTarget->toDOMWindow()) |
| 158 eventTarget->toDOMWindow()->dispatchEvent(event, nullptr); | 158 eventTarget->toDOMWindow()->dispatchEvent(event, nullptr); |
| 159 else | 159 else |
| 160 eventTarget->dispatchEvent(event); | 160 eventTarget->dispatchEvent(event); |
| 161 } | 161 } |
| 162 | 162 |
| 163 } | 163 } |
| OLD | NEW |