Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(716)

Unified Diff: Source/core/dom/EventListenerMap.cpp

Issue 18836002: Implement 'mouseenter' and 'mouseleave' from DOM Level 3 Events. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: new tests + esprehn is smart. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/EventListenerMap.cpp
diff --git a/Source/core/dom/EventListenerMap.cpp b/Source/core/dom/EventListenerMap.cpp
index 1bc86909db7dbddee090d8775435ed32528ded08..ad0b72b8288fd441bcc85bdcc2e12c3541b058ac 100644
--- a/Source/core/dom/EventListenerMap.cpp
+++ b/Source/core/dom/EventListenerMap.cpp
@@ -75,6 +75,20 @@ bool EventListenerMap::contains(const AtomicString& eventType) const
return false;
}
+bool EventListenerMap::containsCapturing(const AtomicString& eventType) const
+{
+ for (unsigned i = 0; i < m_entries.size(); ++i) {
+ if (m_entries[i].first == eventType) {
+ const EventListenerVector* vector = m_entries[i].second.get();
+ for (unsigned j = 0; j < vector->size(); ++j) {
+ if (vector->at(j).useCapture)
+ return true;
+ }
+ }
esprehn 2013/07/10 02:13:56 This is identical to: const EventListenerVector*
+ }
+ return false;
+}
+
void EventListenerMap::clear()
{
assertNoActiveIterators();

Powered by Google App Engine
This is Rietveld 408576698