| 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 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1541 LayoutPoint documentPoint = documentPointForWindowPoint(m_frame, mouseEvent.
position()); | 1541 LayoutPoint documentPoint = documentPointForWindowPoint(m_frame, mouseEvent.
position()); |
| 1542 MouseEventWithHitTestResults mev = m_frame->document()->prepareMouseEvent(re
quest, documentPoint, mouseEvent); | 1542 MouseEventWithHitTestResults mev = m_frame->document()->prepareMouseEvent(re
quest, documentPoint, mouseEvent); |
| 1543 | 1543 |
| 1544 if (!mev.targetNode()) { | 1544 if (!mev.targetNode()) { |
| 1545 invalidateClick(); | 1545 invalidateClick(); |
| 1546 return false; | 1546 return false; |
| 1547 } | 1547 } |
| 1548 | 1548 |
| 1549 m_mousePressNode = mev.targetNode(); | 1549 m_mousePressNode = mev.targetNode(); |
| 1550 | 1550 |
| 1551 Frame* subframe = subframeForHitTestResult(mev); | 1551 RefPtr<Frame> subframe = subframeForHitTestResult(mev); |
| 1552 if (subframe && passMousePressEventToSubframe(mev, subframe)) { | 1552 if (subframe && passMousePressEventToSubframe(mev, subframe.get())) { |
| 1553 // Start capturing future events for this frame. We only do this if we
didn't clear | 1553 // Start capturing future events for this frame. We only do this if we
didn't clear |
| 1554 // the m_mousePressed flag, which may happen if an AppKit widget entered
a modal event loop. | 1554 // the m_mousePressed flag, which may happen if an AppKit widget entered
a modal event loop. |
| 1555 m_capturesDragging = subframe->eventHandler()->capturesDragging(); | 1555 m_capturesDragging = subframe->eventHandler()->capturesDragging(); |
| 1556 if (m_mousePressed && m_capturesDragging) { | 1556 if (m_mousePressed && m_capturesDragging) { |
| 1557 m_capturingMouseEventsNode = mev.targetNode(); | 1557 m_capturingMouseEventsNode = mev.targetNode(); |
| 1558 m_eventHandlerWillResetCapturingMouseEventsNode = true; | 1558 m_eventHandlerWillResetCapturingMouseEventsNode = true; |
| 1559 } | 1559 } |
| 1560 invalidateClick(); | 1560 invalidateClick(); |
| 1561 return true; | 1561 return true; |
| 1562 } | 1562 } |
| (...skipping 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3835 if (eventType == PlatformEvent::MouseMoved && !m_touchPressed) | 3835 if (eventType == PlatformEvent::MouseMoved && !m_touchPressed) |
| 3836 return false; | 3836 return false; |
| 3837 | 3837 |
| 3838 SyntheticSingleTouchEvent touchEvent(event); | 3838 SyntheticSingleTouchEvent touchEvent(event); |
| 3839 return handleTouchEvent(touchEvent); | 3839 return handleTouchEvent(touchEvent); |
| 3840 } | 3840 } |
| 3841 | 3841 |
| 3842 #endif | 3842 #endif |
| 3843 | 3843 |
| 3844 } | 3844 } |
| OLD | NEW |