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

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

Issue 2832073003: Send mouse events for disabled form controls. (Closed)
Patch Set: Fix nits Created 3 years, 7 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) 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
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 (const auto& context : node_event_contexts_) {
381 const 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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/EventPath.h ('k') | third_party/WebKit/Source/core/events/MouseEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698