Chromium Code Reviews| 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 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1624 WebInputEventResult EventHandler::dispatchMouseEvent(const AtomicString& eventTy pe, Node* targetNode, int clickCount, const PlatformMouseEvent& mouseEvent) | 1624 WebInputEventResult EventHandler::dispatchMouseEvent(const AtomicString& eventTy pe, Node* targetNode, int clickCount, const PlatformMouseEvent& mouseEvent) |
| 1625 { | 1625 { |
| 1626 updateMouseEventTargetNode(targetNode, mouseEvent); | 1626 updateMouseEventTargetNode(targetNode, mouseEvent); |
| 1627 if (!m_nodeUnderMouse) | 1627 if (!m_nodeUnderMouse) |
| 1628 return WebInputEventResult::NotHandled; | 1628 return WebInputEventResult::NotHandled; |
| 1629 | 1629 |
| 1630 RefPtrWillBeRawPtr<MouseEvent> event = MouseEvent::create(eventType, m_nodeU nderMouse->document().domWindow(), mouseEvent, clickCount, nullptr); | 1630 RefPtrWillBeRawPtr<MouseEvent> event = MouseEvent::create(eventType, m_nodeU nderMouse->document().domWindow(), mouseEvent, clickCount, nullptr); |
| 1631 return toWebInputEventResult(m_nodeUnderMouse->dispatchEvent(event)); | 1631 return toWebInputEventResult(m_nodeUnderMouse->dispatchEvent(event)); |
| 1632 } | 1632 } |
| 1633 | 1633 |
| 1634 bool EventHandler::isPointerEventActive(int pointerId) | |
| 1635 { | |
| 1636 return m_pointerEventManager.isActive(pointerId); | |
| 1637 } | |
| 1638 | |
| 1639 void EventHandler::setPointerCapture(int pointerId, EventTarget* target) | |
| 1640 { | |
| 1641 m_pointerEventManager.setPointerCapture(pointerId, target); | |
|
Rick Byers
2016/03/01 16:58:34
As discussed offline, I think keeping this state p
Navid Zolghadr
2016/03/01 20:46:05
I will file that bug but I believe the TODO belong
Rick Byers
2016/03/03 16:35:45
Sure, that's fine. I expect this all to change re
| |
| 1642 } | |
| 1643 | |
| 1644 void EventHandler::releasePointerCapture(int pointerId, EventTarget* target) | |
| 1645 { | |
| 1646 m_pointerEventManager.releasePointerCapture(pointerId, target); | |
| 1647 } | |
| 1648 | |
| 1649 void EventHandler::elementRemoved(EventTarget* target) | |
| 1650 { | |
| 1651 m_pointerEventManager.elementRemoved(target); | |
| 1652 } | |
| 1653 | |
| 1634 // TODO(mustaq): Make PE drive ME dispatch & bookkeeping in EventHandler. | 1654 // TODO(mustaq): Make PE drive ME dispatch & bookkeeping in EventHandler. |
| 1635 WebInputEventResult EventHandler::updatePointerTargetAndDispatchEvents(const Ato micString& mouseEventType, Node* targetNode, int clickCount, const PlatformMouse Event& mouseEvent) | 1655 WebInputEventResult EventHandler::updatePointerTargetAndDispatchEvents(const Ato micString& mouseEventType, Node* targetNode, int clickCount, const PlatformMouse Event& mouseEvent) |
| 1636 { | 1656 { |
| 1637 ASSERT(mouseEventType == EventTypeNames::mousedown | 1657 ASSERT(mouseEventType == EventTypeNames::mousedown |
| 1638 || mouseEventType == EventTypeNames::mousemove | 1658 || mouseEventType == EventTypeNames::mousemove |
| 1639 || mouseEventType == EventTypeNames::mouseup); | 1659 || mouseEventType == EventTypeNames::mouseup); |
| 1640 | 1660 |
| 1641 updateMouseEventTargetNode(targetNode, mouseEvent); | 1661 updateMouseEventTargetNode(targetNode, mouseEvent); |
| 1642 if (!m_nodeUnderMouse) | 1662 if (!m_nodeUnderMouse) |
| 1643 return WebInputEventResult::NotHandled; | 1663 return WebInputEventResult::NotHandled; |
| (...skipping 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3982 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() | 4002 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() |
| 3983 { | 4003 { |
| 3984 #if OS(MACOSX) | 4004 #if OS(MACOSX) |
| 3985 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); | 4005 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); |
| 3986 #else | 4006 #else |
| 3987 return PlatformEvent::AltKey; | 4007 return PlatformEvent::AltKey; |
| 3988 #endif | 4008 #endif |
| 3989 } | 4009 } |
| 3990 | 4010 |
| 3991 } // namespace blink | 4011 } // namespace blink |
| OLD | NEW |