Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 1635863006: Pointerevent capture APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 WebInputEventResult EventHandler::dispatchMouseEvent(const AtomicString& eventTy pe, Node* targetNode, int clickCount, const PlatformMouseEvent& mouseEvent) 1655 WebInputEventResult EventHandler::dispatchMouseEvent(const AtomicString& eventTy pe, Node* targetNode, int clickCount, const PlatformMouseEvent& mouseEvent)
1656 { 1656 {
1657 updateMouseEventTargetNode(targetNode, mouseEvent); 1657 updateMouseEventTargetNode(targetNode, mouseEvent);
1658 if (!m_nodeUnderMouse) 1658 if (!m_nodeUnderMouse)
1659 return WebInputEventResult::NotHandled; 1659 return WebInputEventResult::NotHandled;
1660 1660
1661 RefPtrWillBeRawPtr<MouseEvent> event = MouseEvent::create(eventType, m_nodeU nderMouse->document().domWindow(), mouseEvent, clickCount, nullptr); 1661 RefPtrWillBeRawPtr<MouseEvent> event = MouseEvent::create(eventType, m_nodeU nderMouse->document().domWindow(), mouseEvent, clickCount, nullptr);
1662 return toWebInputEventResult(m_nodeUnderMouse->dispatchEvent(event)); 1662 return toWebInputEventResult(m_nodeUnderMouse->dispatchEvent(event));
1663 } 1663 }
1664 1664
1665 bool EventHandler::isPointerEventActive(int pointerId)
1666 {
1667 return m_pointerEventManager.isActive(pointerId);
1668 }
1669
1670 void EventHandler::setPointerCapture(int pointerId, EventTarget* target)
1671 {
1672 // TODO(crbug.com/591387): This functionality should be per page not per fra me.
1673 m_pointerEventManager.setPointerCapture(pointerId, target);
1674 }
1675
1676 void EventHandler::releasePointerCapture(int pointerId, EventTarget* target)
1677 {
1678 m_pointerEventManager.releasePointerCapture(pointerId, target);
1679 }
1680
1681 void EventHandler::elementRemoved(EventTarget* target)
1682 {
1683 m_pointerEventManager.elementRemoved(target);
1684 }
1685
1665 // TODO(mustaq): Make PE drive ME dispatch & bookkeeping in EventHandler. 1686 // TODO(mustaq): Make PE drive ME dispatch & bookkeeping in EventHandler.
1666 WebInputEventResult EventHandler::updatePointerTargetAndDispatchEvents(const Ato micString& mouseEventType, Node* targetNode, int clickCount, const PlatformMouse Event& mouseEvent) 1687 WebInputEventResult EventHandler::updatePointerTargetAndDispatchEvents(const Ato micString& mouseEventType, Node* targetNode, int clickCount, const PlatformMouse Event& mouseEvent)
1667 { 1688 {
1668 ASSERT(mouseEventType == EventTypeNames::mousedown 1689 ASSERT(mouseEventType == EventTypeNames::mousedown
1669 || mouseEventType == EventTypeNames::mousemove 1690 || mouseEventType == EventTypeNames::mousemove
1670 || mouseEventType == EventTypeNames::mouseup); 1691 || mouseEventType == EventTypeNames::mouseup);
1671 1692
1672 updateMouseEventTargetNode(targetNode, mouseEvent); 1693 updateMouseEventTargetNode(targetNode, mouseEvent);
1673 if (!m_nodeUnderMouse) 1694 if (!m_nodeUnderMouse)
1674 return WebInputEventResult::NotHandled; 1695 return WebInputEventResult::NotHandled;
(...skipping 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after
3994 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() 4015 PlatformEvent::Modifiers EventHandler::accessKeyModifiers()
3995 { 4016 {
3996 #if OS(MACOSX) 4017 #if OS(MACOSX)
3997 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); 4018 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey);
3998 #else 4019 #else
3999 return PlatformEvent::AltKey; 4020 return PlatformEvent::AltKey;
4000 #endif 4021 #endif
4001 } 4022 }
4002 4023
4003 } // namespace blink 4024 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.h ('k') | third_party/WebKit/Source/core/input/PointerEventManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698