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

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

Issue 2769433002: Revert of Add use count for click retargeting due to capture (Closed)
Patch Set: Created 3 years, 9 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
Index: third_party/WebKit/Source/core/input/MouseEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/MouseEventManager.cpp b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
index 561b4d8e1daf88ed7a9c7bf4cd446b393b3e9749..924c1066419b7bcd970de57087f80315b6cc55e1 100644
--- a/third_party/WebKit/Source/core/input/MouseEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/MouseEventManager.cpp
@@ -234,8 +234,7 @@ WebInputEventResult MouseEventManager::setMousePositionAndDispatchMouseEvent(
WebInputEventResult MouseEventManager::dispatchMouseClickIfNeeded(
Node* target,
const WebMouseEvent& mouseEvent,
- const String& canvasRegionId,
- Node* targetWithoutCapture) {
+ const String& canvasRegionId) {
// We only prevent click event when the click may cause contextmenu to popup.
// However, we always send auxclick.
bool contextMenuEvent =
@@ -269,23 +268,6 @@ WebInputEventResult MouseEventManager::dispatchMouseClickIfNeeded(
clickTargetNode = target->commonAncestor(
*m_clickNode, EventHandlingUtil::parentForClickEvent);
}
-
- // This block is only for the purpose of gathering the metric and can be
- // removed as soon as we don't need the metric.
- if (targetWithoutCapture != target) {
- Node* alternativeClickTargetNode = nullptr;
- if (m_clickNode == targetWithoutCapture) {
- alternativeClickTargetNode = m_clickNode;
- } else if (m_clickNode->document() == targetWithoutCapture->document()) {
- alternativeClickTargetNode = targetWithoutCapture->commonAncestor(
- *m_clickNode, EventHandlingUtil::parentForClickEvent);
- }
- if (alternativeClickTargetNode != clickTargetNode) {
- UseCounter::count(m_frame,
- UseCounter::PointerEventClickRetargetCausedByCapture);
- }
- }
-
if (clickTargetNode) {
clickEventResult = dispatchMouseEvent(
clickTargetNode,
« no previous file with comments | « third_party/WebKit/Source/core/input/MouseEventManager.h ('k') | third_party/WebKit/Source/core/input/PointerEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698