| Index: ui/events/platform/platform_event_source.cc
|
| diff --git a/ui/events/platform/platform_event_source.cc b/ui/events/platform/platform_event_source.cc
|
| index a33562693abce3b5516a70848e7b9faa77316afa..dfab7fce76648ffdcc00fc592dbd262625eef83c 100644
|
| --- a/ui/events/platform/platform_event_source.cc
|
| +++ b/ui/events/platform/platform_event_source.cc
|
| @@ -75,12 +75,10 @@ uint32_t PlatformEventSource::DispatchEvent(PlatformEvent platform_event) {
|
| if (overridden_dispatcher_)
|
| action = overridden_dispatcher_->DispatchEvent(platform_event);
|
|
|
| - if ((action & POST_DISPATCH_PERFORM_DEFAULT) &&
|
| - dispatchers_.might_have_observers()) {
|
| - base::ObserverList<PlatformEventDispatcher>::Iterator iter(&dispatchers_);
|
| - while (PlatformEventDispatcher* dispatcher = iter.GetNext()) {
|
| - if (dispatcher->CanDispatchEvent(platform_event))
|
| - action = dispatcher->DispatchEvent(platform_event);
|
| + if (action & POST_DISPATCH_PERFORM_DEFAULT) {
|
| + for (PlatformEventDispatcher& dispatcher : dispatchers_) {
|
| + if (dispatcher.CanDispatchEvent(platform_event))
|
| + action = dispatcher.DispatchEvent(platform_event);
|
| if (action & POST_DISPATCH_STOP_PROPAGATION)
|
| break;
|
| }
|
|
|