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 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1625 // The return value means 'continue default handling.' | 1625 // The return value means 'continue default handling.' |
1626 bool EventHandler::dispatchMouseEvent(const AtomicString& eventType, Node* targe
tNode, int clickCount, const PlatformMouseEvent& mouseEvent) | 1626 bool EventHandler::dispatchMouseEvent(const AtomicString& eventType, Node* targe
tNode, int clickCount, const PlatformMouseEvent& mouseEvent) |
1627 { | 1627 { |
1628 updateMouseEventTargetNode(targetNode, mouseEvent); | 1628 updateMouseEventTargetNode(targetNode, mouseEvent); |
1629 return !m_nodeUnderMouse || m_nodeUnderMouse->dispatchMouseEvent(mouseEvent,
eventType, clickCount); | 1629 return !m_nodeUnderMouse || m_nodeUnderMouse->dispatchMouseEvent(mouseEvent,
eventType, clickCount); |
1630 } | 1630 } |
1631 | 1631 |
1632 // The return value means 'swallow event' (was handled), as for other handle* fu
nctions. | 1632 // The return value means 'swallow event' (was handled), as for other handle* fu
nctions. |
1633 bool EventHandler::handleMouseFocus(const MouseEventWithHitTestResults& targeted
Event, InputDeviceCapabilities* sourceCapabilities) | 1633 bool EventHandler::handleMouseFocus(const MouseEventWithHitTestResults& targeted
Event, InputDeviceCapabilities* sourceCapabilities) |
1634 { | 1634 { |
1635 const PlatformMouseEvent& mouseEvent = targetedEvent.event(); | |
1636 | |
1637 // If clicking on a frame scrollbar, do not mess up with content focus. | 1635 // If clicking on a frame scrollbar, do not mess up with content focus. |
1638 if (FrameView* view = m_frame->view()) { | 1636 if (targetedEvent.hitTestResult().scrollbar() && m_frame->contentLayoutObjec
t()) { |
1639 if (view->scrollbarAtRootFramePoint(mouseEvent.position())) | 1637 if (targetedEvent.hitTestResult().scrollbar()->scrollableArea() == m_fra
me->contentLayoutObject()->scrollableArea()) |
1640 return false; | 1638 return false; |
1641 } | 1639 } |
1642 | 1640 |
1643 // The layout needs to be up to date to determine if an element is focusable
. | 1641 // The layout needs to be up to date to determine if an element is focusable
. |
1644 m_frame->document()->updateLayoutIgnorePendingStylesheets(); | 1642 m_frame->document()->updateLayoutIgnorePendingStylesheets(); |
1645 | 1643 |
1646 Element* element = nullptr; | 1644 Element* element = nullptr; |
1647 if (m_nodeUnderMouse) | 1645 if (m_nodeUnderMouse) |
1648 element = m_nodeUnderMouse->isElementNode() ? toElement(m_nodeUnderMouse
) : m_nodeUnderMouse->parentOrShadowHostElement(); | 1646 element = m_nodeUnderMouse->isElementNode() ? toElement(m_nodeUnderMouse
) : m_nodeUnderMouse->parentOrShadowHostElement(); |
1649 for (; element; element = element->parentOrShadowHostElement()) { | 1647 for (; element; element = element->parentOrShadowHostElement()) { |
(...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4038 unsigned EventHandler::accessKeyModifiers() | 4036 unsigned EventHandler::accessKeyModifiers() |
4039 { | 4037 { |
4040 #if OS(MACOSX) | 4038 #if OS(MACOSX) |
4041 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 4039 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
4042 #else | 4040 #else |
4043 return PlatformEvent::AltKey; | 4041 return PlatformEvent::AltKey; |
4044 #endif | 4042 #endif |
4045 } | 4043 } |
4046 | 4044 |
4047 } // namespace blink | 4045 } // namespace blink |
OLD | NEW |