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

Side by Side Diff: third_party/WebKit/Source/core/events/EventListenerMap.cpp

Issue 2394653003: reflow comments in core/events,core/fileapi (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 static bool removeListenerFromVector( 128 static bool removeListenerFromVector(
129 EventListenerVector* listenerVector, 129 EventListenerVector* listenerVector,
130 const EventListener* listener, 130 const EventListener* listener,
131 const EventListenerOptions& options, 131 const EventListenerOptions& options,
132 size_t* indexOfRemovedListener, 132 size_t* indexOfRemovedListener,
133 RegisteredEventListener* registeredListener) { 133 RegisteredEventListener* registeredListener) {
134 const auto begin = listenerVector->data(); 134 const auto begin = listenerVector->data();
135 const auto end = begin + listenerVector->size(); 135 const auto end = begin + listenerVector->size();
136 136
137 // Do a manual search for the matching RegisteredEventListener. It is not poss ible to create 137 // Do a manual search for the matching RegisteredEventListener. It is not
138 // a RegisteredEventListener on the stack because of the const on |listener|. 138 // possible to create a RegisteredEventListener on the stack because of the
139 // const on |listener|.
139 const auto it = std::find_if( 140 const auto it = std::find_if(
140 begin, end, [listener, options]( 141 begin, end, [listener, options](
141 const RegisteredEventListener& eventListener) -> bool { 142 const RegisteredEventListener& eventListener) -> bool {
142 return eventListener.matches(listener, options); 143 return eventListener.matches(listener, options);
143 }); 144 });
144 145
145 if (it == end) { 146 if (it == end) {
146 *indexOfRemovedListener = kNotFound; 147 *indexOfRemovedListener = kNotFound;
147 return false; 148 return false;
148 } 149 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 EventListenerVector& listeners = *m_map->m_entries[m_entryIndex].second; 224 EventListenerVector& listeners = *m_map->m_entries[m_entryIndex].second;
224 if (m_index < listeners.size()) 225 if (m_index < listeners.size())
225 return listeners[m_index++].listener(); 226 return listeners[m_index++].listener();
226 m_index = 0; 227 m_index = 0;
227 } 228 }
228 229
229 return nullptr; 230 return nullptr;
230 } 231 }
231 232
232 } // namespace blink 233 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/EventDispatcher.cpp ('k') | third_party/WebKit/Source/core/events/EventPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698