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 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1873 HitTestRequest request(HitTestRequest::Release); | 1873 HitTestRequest request(HitTestRequest::Release); |
1874 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent); | 1874 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent); |
1875 Frame* subframe = m_capturingMouseEventsNode.get() ? subframeForTargetNode(m
_capturingMouseEventsNode.get()) : subframeForHitTestResult(mev); | 1875 Frame* subframe = m_capturingMouseEventsNode.get() ? subframeForTargetNode(m
_capturingMouseEventsNode.get()) : subframeForHitTestResult(mev); |
1876 if (m_eventHandlerWillResetCapturingMouseEventsNode) | 1876 if (m_eventHandlerWillResetCapturingMouseEventsNode) |
1877 m_capturingMouseEventsNode = 0; | 1877 m_capturingMouseEventsNode = 0; |
1878 if (subframe && passMouseReleaseEventToSubframe(mev, subframe)) | 1878 if (subframe && passMouseReleaseEventToSubframe(mev, subframe)) |
1879 return true; | 1879 return true; |
1880 | 1880 |
1881 bool swallowMouseUpEvent = dispatchMouseEvent(eventNames().mouseupEvent, tar
getNode(mev), true, m_clickCount, mouseEvent, false); | 1881 bool swallowMouseUpEvent = dispatchMouseEvent(eventNames().mouseupEvent, tar
getNode(mev), true, m_clickCount, mouseEvent, false); |
1882 | 1882 |
1883 bool swallowClickEvent = m_clickCount > 0 && mouseEvent.button() != RightBut
ton && targetNode(mev) == m_clickNode && dispatchMouseEvent(eventNames().clickEv
ent, targetNode(mev), true, m_clickCount, mouseEvent, true); | 1883 Node* clickTarget = targetNode(mev); |
| 1884 if (clickTarget) |
| 1885 clickTarget = clickTarget->shadowAncestorNode(); |
| 1886 Node* adjustedClickNode = m_clickNode ? m_clickNode->shadowAncestorNode() :
0; |
| 1887 |
| 1888 bool swallowClickEvent = m_clickCount > 0 && mouseEvent.button() != RightBut
ton && clickTarget == adjustedClickNode && dispatchMouseEvent(eventNames().click
Event, targetNode(mev), true, m_clickCount, mouseEvent, true); |
1884 | 1889 |
1885 if (m_resizeLayer) { | 1890 if (m_resizeLayer) { |
1886 m_resizeLayer->setInResizeMode(false); | 1891 m_resizeLayer->setInResizeMode(false); |
1887 m_resizeLayer = 0; | 1892 m_resizeLayer = 0; |
1888 } | 1893 } |
1889 | 1894 |
1890 bool swallowMouseReleaseEvent = false; | 1895 bool swallowMouseReleaseEvent = false; |
1891 if (!swallowMouseUpEvent) | 1896 if (!swallowMouseUpEvent) |
1892 swallowMouseReleaseEvent = handleMouseReleaseEvent(mev); | 1897 swallowMouseReleaseEvent = handleMouseReleaseEvent(mev); |
1893 | 1898 |
(...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3633 if (eventType == PlatformEvent::MouseMoved && !m_touchPressed) | 3638 if (eventType == PlatformEvent::MouseMoved && !m_touchPressed) |
3634 return false; | 3639 return false; |
3635 | 3640 |
3636 SyntheticSingleTouchEvent touchEvent(event); | 3641 SyntheticSingleTouchEvent touchEvent(event); |
3637 return handleTouchEvent(touchEvent); | 3642 return handleTouchEvent(touchEvent); |
3638 } | 3643 } |
3639 | 3644 |
3640 #endif | 3645 #endif |
3641 | 3646 |
3642 } | 3647 } |
OLD | NEW |