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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2525973002: Remove the pointer event capturing flag (Closed)
Patch Set: Created 4 years 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) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 1169
1170 void EventHandler::setCapturingMouseEventsNode(Node* n) { 1170 void EventHandler::setCapturingMouseEventsNode(Node* n) {
1171 m_capturingMouseEventsNode = n; 1171 m_capturingMouseEventsNode = n;
1172 m_eventHandlerWillResetCapturingMouseEventsNode = false; 1172 m_eventHandlerWillResetCapturingMouseEventsNode = false;
1173 } 1173 }
1174 1174
1175 Node* EventHandler::updateMouseEventTargetNode(Node* targetNode) { 1175 Node* EventHandler::updateMouseEventTargetNode(Node* targetNode) {
1176 Node* newNodeUnderMouse = targetNode; 1176 Node* newNodeUnderMouse = targetNode;
1177 1177
1178 // If we're capturing, we always go right to that node. 1178 // If we're capturing, we always go right to that node.
1179 EventTarget* mousePointerCapturingNode = 1179 if (EventTarget* mousePointerCapturingNode =
1180 m_pointerEventManager->getMouseCapturingNode(); 1180 m_pointerEventManager->getMouseCapturingNode()) {
mustaq 2016/11/23 17:14:08 Nit: fix indentation.
Navid Zolghadr 2016/11/23 17:24:34 This is correct I believe. I used "git cl format"
1181 if (mousePointerCapturingNode &&
1182 !RuntimeEnabledFeatures::pointerEventV1SpecCapturingEnabled()) {
1183 newNodeUnderMouse = mousePointerCapturingNode->toNode(); 1181 newNodeUnderMouse = mousePointerCapturingNode->toNode();
1184 DCHECK(newNodeUnderMouse); 1182 DCHECK(newNodeUnderMouse);
1185 } else if (m_capturingMouseEventsNode) { 1183 } else if (m_capturingMouseEventsNode) {
1186 newNodeUnderMouse = m_capturingMouseEventsNode.get(); 1184 newNodeUnderMouse = m_capturingMouseEventsNode.get();
1187 } else { 1185 } else {
1188 // If the target node is a text node, dispatch on the parent node - 1186 // If the target node is a text node, dispatch on the parent node -
1189 // rdar://4196646 1187 // rdar://4196646
1190 if (newNodeUnderMouse && newNodeUnderMouse->isTextNode()) 1188 if (newNodeUnderMouse && newNodeUnderMouse->isTextNode())
1191 newNodeUnderMouse = FlatTreeTraversal::parent(*newNodeUnderMouse); 1189 newNodeUnderMouse = FlatTreeTraversal::parent(*newNodeUnderMouse);
1192 } 1190 }
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 } 2104 }
2107 2105
2108 FrameHost* EventHandler::frameHost() const { 2106 FrameHost* EventHandler::frameHost() const {
2109 if (!m_frame->page()) 2107 if (!m_frame->page())
2110 return nullptr; 2108 return nullptr;
2111 2109
2112 return &m_frame->page()->frameHost(); 2110 return &m_frame->page()->frameHost();
2113 } 2111 }
2114 2112
2115 } // namespace blink 2113 } // namespace blink
OLDNEW
« no previous file with comments | « content/public/common/content_features.cc ('k') | third_party/WebKit/Source/core/input/PointerEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698