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

Unified Diff: third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp

Issue 2397723004: reflow comments in core/input (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/EventHandler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp
diff --git a/third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp b/third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp
index 126c8ad827718a9d64a82586b57c3d074e06ac53..c1cd91a7b3b8ea8ed08326a216adce6b06764ac8 100644
--- a/third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp
+++ b/third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp
@@ -74,17 +74,22 @@ void BoundaryEventDispatcher::sendBoundaryEvents(EventTarget* exitedTarget,
size_t exitedAncestorsCommonParentIndex = 0;
size_t enteredAncestorsCommonParentIndex = 0;
- // A note on mouseenter and mouseleave: These are non-bubbling events, and they are dispatched if there
- // is a capturing event handler on an ancestor or a normal event handler on the element itself. This special
- // handling is necessary to avoid O(n^2) capturing event handler checks.
+ // A note on mouseenter and mouseleave: These are non-bubbling events, and
+ // they are dispatched if there is a capturing event handler on an ancestor or
+ // a normal event handler on the element itself. This special handling is
+ // necessary to avoid O(n^2) capturing event handler checks.
//
- // Note, however, that this optimization can possibly cause some unanswered/missing/redundant mouseenter or
- // mouseleave events in certain contrived eventhandling scenarios, e.g., when:
- // - the mouseleave handler for a node sets the only capturing-mouseleave-listener in its ancestor, or
- // - DOM mods in any mouseenter/mouseleave handler changes the common ancestor of exited & entered nodes, etc.
- // We think the spec specifies a "frozen" state to avoid such corner cases (check the discussion on "candidate event
- // listeners" at http://www.w3.org/TR/uievents), but our code below preserves one such behavior from past only to
- // match Firefox and IE behavior.
+ // Note, however, that this optimization can possibly cause some
+ // unanswered/missing/redundant mouseenter or mouseleave events in certain
+ // contrived eventhandling scenarios, e.g., when:
+ // - the mouseleave handler for a node sets the only
+ // capturing-mouseleave-listener in its ancestor, or
+ // - DOM mods in any mouseenter/mouseleave handler changes the common ancestor
+ // of exited & entered nodes, etc.
+ // We think the spec specifies a "frozen" state to avoid such corner cases
+ // (check the discussion on "candidate event listeners" at
+ // http://www.w3.org/TR/uievents), but our code below preserves one such
+ // behavior from past only to match Firefox and IE behavior.
//
// TODO(mustaq): Confirm spec conformance, double-check with other browsers.
@@ -110,8 +115,8 @@ void BoundaryEventDispatcher::sendBoundaryEvents(EventTarget* exitedTarget,
if (isInDocument(enteredTarget))
dispatchOver(enteredTarget, exitedTarget);
- // Defer locating capturing enter listener until /after/ dispatching the leave events because
- // the leave handlers might set a capturing enter handler.
+ // Defer locating capturing enter listener until /after/ dispatching the leave
+ // events because the leave handlers might set a capturing enter handler.
bool enteredNodeHasCapturingAncestor = false;
const AtomicString& enterEvent = getEnterEvent();
for (size_t i = 0; i < enteredAncestors.size(); i++) {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/EventHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698