Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 369 | 369 |
| 370 RelatedTargetMap related_node_map; | 370 RelatedTargetMap related_node_map; |
| 371 BuildRelatedNodeMap(*target_node, related_node_map); | 371 BuildRelatedNodeMap(*target_node, related_node_map); |
| 372 for (size_t j = 0; j < tree_scopes.size(); ++j) { | 372 for (size_t j = 0; j < tree_scopes.size(); ++j) { |
| 373 adjusted_touch_list[j]->Append(touch.CloneWithNewTarget( | 373 adjusted_touch_list[j]->Append(touch.CloneWithNewTarget( |
| 374 FindRelatedNode(*tree_scopes[j], related_node_map))); | 374 FindRelatedNode(*tree_scopes[j], related_node_map))); |
| 375 } | 375 } |
| 376 } | 376 } |
| 377 } | 377 } |
| 378 | 378 |
| 379 bool EventPath::DisabledFormControlExistsInPath() const { | |
| 380 for (auto& context : node_event_contexts_) { | |
|
jbroman
2017/04/24 19:50:32
super-nit: prefer "const auto&" to "auto&", here a
dtapuska
2017/04/24 19:59:29
Done.
| |
| 381 Node* target_node = context.GetNode(); | |
| 382 if (target_node && IsDisabledFormControl(target_node)) | |
| 383 return true; | |
| 384 } | |
| 385 return false; | |
| 386 } | |
| 387 | |
| 379 NodeEventContext& EventPath::TopNodeEventContext() { | 388 NodeEventContext& EventPath::TopNodeEventContext() { |
| 380 DCHECK(!IsEmpty()); | 389 DCHECK(!IsEmpty()); |
| 381 return Last(); | 390 return Last(); |
| 382 } | 391 } |
| 383 | 392 |
| 384 void EventPath::EnsureWindowEventContext() { | 393 void EventPath::EnsureWindowEventContext() { |
| 385 DCHECK(event_); | 394 DCHECK(event_); |
| 386 if (!window_event_context_) | 395 if (!window_event_context_) |
| 387 window_event_context_ = | 396 window_event_context_ = |
| 388 new WindowEventContext(*event_, TopNodeEventContext()); | 397 new WindowEventContext(*event_, TopNodeEventContext()); |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 403 | 412 |
| 404 DEFINE_TRACE(EventPath) { | 413 DEFINE_TRACE(EventPath) { |
| 405 visitor->Trace(node_event_contexts_); | 414 visitor->Trace(node_event_contexts_); |
| 406 visitor->Trace(node_); | 415 visitor->Trace(node_); |
| 407 visitor->Trace(event_); | 416 visitor->Trace(event_); |
| 408 visitor->Trace(tree_scope_event_contexts_); | 417 visitor->Trace(tree_scope_event_contexts_); |
| 409 visitor->Trace(window_event_context_); | 418 visitor->Trace(window_event_context_); |
| 410 } | 419 } |
| 411 | 420 |
| 412 } // namespace blink | 421 } // namespace blink |
| OLD | NEW |