Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1377 | 1377 |
| 1378 return m_frame->document()->prepareMouseEvent(request, contentPointFromRootF rame(m_frame, mev.position()), mev); | 1378 return m_frame->document()->prepareMouseEvent(request, contentPointFromRootF rame(m_frame, mev.position()), mev); |
| 1379 } | 1379 } |
| 1380 | 1380 |
| 1381 Node* EventHandler::updateMouseEventTargetNode(Node* targetNode, | 1381 Node* EventHandler::updateMouseEventTargetNode(Node* targetNode, |
| 1382 const PlatformMouseEvent& mouseEvent) | 1382 const PlatformMouseEvent& mouseEvent) |
| 1383 { | 1383 { |
| 1384 Node* newNodeUnderMouse = targetNode; | 1384 Node* newNodeUnderMouse = targetNode; |
| 1385 | 1385 |
| 1386 // If we're capturing, we always go right to that node. | 1386 // If we're capturing, we always go right to that node. |
| 1387 if (EventTarget* mousePointerCapturingNode = m_pointerEventManager->getMouse CapturingNode()) { | 1387 if (m_pointerEventManager->getMouseCapturingNode() |
|
dtapuska
2016/09/09 16:01:07
I think it is cleaner to store the mousePointerCap
Navid Zolghadr
2016/09/09 16:03:38
Then I have to store it outside the scope of the i
| |
| 1388 && !RuntimeEnabledFeatures::pointerEventV1SpecCapturingEnabled()) { | |
| 1389 EventTarget* mousePointerCapturingNode = m_pointerEventManager->getMouse CapturingNode(); | |
| 1388 newNodeUnderMouse = mousePointerCapturingNode->toNode(); | 1390 newNodeUnderMouse = mousePointerCapturingNode->toNode(); |
| 1389 DCHECK(newNodeUnderMouse); | 1391 DCHECK(newNodeUnderMouse); |
| 1390 } else if (m_capturingMouseEventsNode) { | 1392 } else if (m_capturingMouseEventsNode) { |
| 1391 newNodeUnderMouse = m_capturingMouseEventsNode.get(); | 1393 newNodeUnderMouse = m_capturingMouseEventsNode.get(); |
| 1392 } else { | 1394 } else { |
| 1393 // If the target node is a text node, dispatch on the parent node - rdar ://4196646 | 1395 // If the target node is a text node, dispatch on the parent node - rdar ://4196646 |
| 1394 if (newNodeUnderMouse && newNodeUnderMouse->isTextNode()) | 1396 if (newNodeUnderMouse && newNodeUnderMouse->isTextNode()) |
| 1395 newNodeUnderMouse = FlatTreeTraversal::parent(*newNodeUnderMouse); | 1397 newNodeUnderMouse = FlatTreeTraversal::parent(*newNodeUnderMouse); |
| 1396 } | 1398 } |
| 1397 Node* lastNodeUnderMouse = m_nodeUnderMouse; | 1399 Node* lastNodeUnderMouse = m_nodeUnderMouse; |
| (...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2558 | 2560 |
| 2559 FrameHost* EventHandler::frameHost() const | 2561 FrameHost* EventHandler::frameHost() const |
| 2560 { | 2562 { |
| 2561 if (!m_frame->page()) | 2563 if (!m_frame->page()) |
| 2562 return nullptr; | 2564 return nullptr; |
| 2563 | 2565 |
| 2564 return &m_frame->page()->frameHost(); | 2566 return &m_frame->page()->frameHost(); |
| 2565 } | 2567 } |
| 2566 | 2568 |
| 2567 } // namespace blink | 2569 } // namespace blink |
| OLD | NEW |