| OLD | NEW |
| 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 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 void EventHandler::setCapturingMouseEventsNode(Node* n) { | 1183 void EventHandler::setCapturingMouseEventsNode(Node* n) { |
| 1184 m_capturingMouseEventsNode = n; | 1184 m_capturingMouseEventsNode = n; |
| 1185 m_eventHandlerWillResetCapturingMouseEventsNode = false; | 1185 m_eventHandlerWillResetCapturingMouseEventsNode = false; |
| 1186 } | 1186 } |
| 1187 | 1187 |
| 1188 Node* EventHandler::updateMouseEventTargetNode(Node* targetNode) { | 1188 Node* EventHandler::updateMouseEventTargetNode(Node* targetNode) { |
| 1189 Node* newNodeUnderMouse = targetNode; | 1189 Node* newNodeUnderMouse = targetNode; |
| 1190 | 1190 |
| 1191 // If we're capturing, we always go right to that node. | 1191 if (m_capturingMouseEventsNode) { |
| 1192 if (EventTarget* mousePointerCapturingNode = | |
| 1193 m_pointerEventManager->getMouseCapturingNode()) { | |
| 1194 newNodeUnderMouse = mousePointerCapturingNode->toNode(); | |
| 1195 DCHECK(newNodeUnderMouse); | |
| 1196 } else if (m_capturingMouseEventsNode) { | |
| 1197 newNodeUnderMouse = m_capturingMouseEventsNode.get(); | 1192 newNodeUnderMouse = m_capturingMouseEventsNode.get(); |
| 1198 } else { | 1193 } else { |
| 1199 // If the target node is a text node, dispatch on the parent node - | 1194 // If the target node is a text node, dispatch on the parent node - |
| 1200 // rdar://4196646 | 1195 // rdar://4196646 |
| 1201 if (newNodeUnderMouse && newNodeUnderMouse->isTextNode()) | 1196 if (newNodeUnderMouse && newNodeUnderMouse->isTextNode()) |
| 1202 newNodeUnderMouse = FlatTreeTraversal::parent(*newNodeUnderMouse); | 1197 newNodeUnderMouse = FlatTreeTraversal::parent(*newNodeUnderMouse); |
| 1203 } | 1198 } |
| 1204 return newNodeUnderMouse; | 1199 return newNodeUnderMouse; |
| 1205 } | 1200 } |
| 1206 | 1201 |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 } | 2124 } |
| 2130 | 2125 |
| 2131 FrameHost* EventHandler::frameHost() const { | 2126 FrameHost* EventHandler::frameHost() const { |
| 2132 if (!m_frame->page()) | 2127 if (!m_frame->page()) |
| 2133 return nullptr; | 2128 return nullptr; |
| 2134 | 2129 |
| 2135 return &m_frame->page()->frameHost(); | 2130 return &m_frame->page()->frameHost(); |
| 2136 } | 2131 } |
| 2137 | 2132 |
| 2138 } // namespace blink | 2133 } // namespace blink |
| OLD | NEW |