OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
8 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) | 8 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) |
9 * | 9 * |
10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 | 68 |
69 bool EventListenerMap::contains(const AtomicString& eventType) const | 69 bool EventListenerMap::contains(const AtomicString& eventType) const |
70 { | 70 { |
71 for (unsigned i = 0; i < m_entries.size(); ++i) { | 71 for (unsigned i = 0; i < m_entries.size(); ++i) { |
72 if (m_entries[i].first == eventType) | 72 if (m_entries[i].first == eventType) |
73 return true; | 73 return true; |
74 } | 74 } |
75 return false; | 75 return false; |
76 } | 76 } |
77 | 77 |
78 bool EventListenerMap::containsCapturing(const AtomicString& eventType) const | |
79 { | |
80 for (unsigned i = 0; i < m_entries.size(); ++i) { | |
81 if (m_entries[i].first == eventType) { | |
82 const EventListenerVector* vector = m_entries[i].second.get(); | |
83 for (unsigned j = 0; j < vector->size(); ++j) { | |
84 if (vector->at(j).useCapture) | |
85 return true; | |
86 } | |
87 } | |
esprehn
2013/07/10 02:13:56
This is identical to:
const EventListenerVector*
| |
88 } | |
89 return false; | |
90 } | |
91 | |
78 void EventListenerMap::clear() | 92 void EventListenerMap::clear() |
79 { | 93 { |
80 assertNoActiveIterators(); | 94 assertNoActiveIterators(); |
81 | 95 |
82 m_entries.clear(); | 96 m_entries.clear(); |
83 } | 97 } |
84 | 98 |
85 Vector<AtomicString> EventListenerMap::eventTypes() const | 99 Vector<AtomicString> EventListenerMap::eventTypes() const |
86 { | 100 { |
87 Vector<AtomicString> types; | 101 Vector<AtomicString> types; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
249 EventListenerVector& listeners = *m_map->m_entries[m_entryIndex].second; | 263 EventListenerVector& listeners = *m_map->m_entries[m_entryIndex].second; |
250 if (m_index < listeners.size()) | 264 if (m_index < listeners.size()) |
251 return listeners[m_index++].listener.get(); | 265 return listeners[m_index++].listener.get(); |
252 m_index = 0; | 266 m_index = 0; |
253 } | 267 } |
254 | 268 |
255 return 0; | 269 return 0; |
256 } | 270 } |
257 | 271 |
258 } // namespace WebCore | 272 } // namespace WebCore |
OLD | NEW |