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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 } | 425 } |
426 | 426 |
427 // We don't do this at the start of mouse down handling, | 427 // We don't do this at the start of mouse down handling, |
428 // because we don't want to do it until we know we didn't hit a widget. | 428 // because we don't want to do it until we know we didn't hit a widget. |
429 if (singleClick) | 429 if (singleClick) |
430 focusDocumentView(); | 430 focusDocumentView(); |
431 | 431 |
432 Node* innerNode = event.innerNode(); | 432 Node* innerNode = event.innerNode(); |
433 | 433 |
434 m_mousePressNode = innerNode; | 434 m_mousePressNode = innerNode; |
| 435 m_frame->document()->setSequentialFocusNavigationStartingPoint(innerNode); |
435 m_dragStartPos = event.event().position(); | 436 m_dragStartPos = event.event().position(); |
436 | 437 |
437 bool swallowEvent = false; | 438 bool swallowEvent = false; |
438 m_mousePressed = true; | 439 m_mousePressed = true; |
439 | 440 |
440 if (event.event().clickCount() == 2) | 441 if (event.event().clickCount() == 2) |
441 swallowEvent = selectionController().handleMousePressEventDoubleClick(ev
ent); | 442 swallowEvent = selectionController().handleMousePressEventDoubleClick(ev
ent); |
442 else if (event.event().clickCount() >= 3) | 443 else if (event.event().clickCount() >= 3) |
443 swallowEvent = selectionController().handleMousePressEventTripleClick(ev
ent); | 444 swallowEvent = selectionController().handleMousePressEventTripleClick(ev
ent); |
444 else | 445 else |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 // when we dispatch the event. | 973 // when we dispatch the event. |
973 LayoutPoint documentPoint = contentPointFromRootFrame(m_frame, mouseEvent.po
sition()); | 974 LayoutPoint documentPoint = contentPointFromRootFrame(m_frame, mouseEvent.po
sition()); |
974 MouseEventWithHitTestResults mev = m_frame->document()->prepareMouseEvent(re
quest, documentPoint, mouseEvent); | 975 MouseEventWithHitTestResults mev = m_frame->document()->prepareMouseEvent(re
quest, documentPoint, mouseEvent); |
975 | 976 |
976 if (!mev.innerNode()) { | 977 if (!mev.innerNode()) { |
977 invalidateClick(); | 978 invalidateClick(); |
978 return WebInputEventResult::NotHandled; | 979 return WebInputEventResult::NotHandled; |
979 } | 980 } |
980 | 981 |
981 m_mousePressNode = mev.innerNode(); | 982 m_mousePressNode = mev.innerNode(); |
| 983 m_frame->document()->setSequentialFocusNavigationStartingPoint(mev.innerNode
()); |
982 | 984 |
983 RefPtrWillBeRawPtr<LocalFrame> subframe = subframeForHitTestResult(mev); | 985 RefPtrWillBeRawPtr<LocalFrame> subframe = subframeForHitTestResult(mev); |
984 if (subframe) { | 986 if (subframe) { |
985 WebInputEventResult result = passMousePressEventToSubframe(mev, subframe
.get()); | 987 WebInputEventResult result = passMousePressEventToSubframe(mev, subframe
.get()); |
986 // Start capturing future events for this frame. We only do this if we
didn't clear | 988 // Start capturing future events for this frame. We only do this if we
didn't clear |
987 // the m_mousePressed flag, which may happen if an AppKit widget entered
a modal event loop. | 989 // the m_mousePressed flag, which may happen if an AppKit widget entered
a modal event loop. |
988 // The capturing should be done only when the result indicates it | 990 // The capturing should be done only when the result indicates it |
989 // has been handled. See crbug.com/269917 | 991 // has been handled. See crbug.com/269917 |
990 m_capturesDragging = subframe->eventHandler().capturesDragging(); | 992 m_capturesDragging = subframe->eventHandler().capturesDragging(); |
991 if (m_mousePressed && m_capturesDragging) { | 993 if (m_mousePressed && m_capturesDragging) { |
(...skipping 2982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3974 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 3976 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
3975 { | 3977 { |
3976 #if OS(MACOSX) | 3978 #if OS(MACOSX) |
3977 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); | 3979 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo
rmEvent::AltKey); |
3978 #else | 3980 #else |
3979 return PlatformEvent::AltKey; | 3981 return PlatformEvent::AltKey; |
3980 #endif | 3982 #endif |
3981 } | 3983 } |
3982 | 3984 |
3983 } // namespace blink | 3985 } // namespace blink |
OLD | NEW |