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

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 727593003: Implement MouseEvent buttons attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 1633
1634 // FIXME: We might want to dispatch a dragleave even if the view is gone. 1634 // FIXME: We might want to dispatch a dragleave even if the view is gone.
1635 if (!view) 1635 if (!view)
1636 return false; 1636 return false;
1637 1637
1638 RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType, 1638 RefPtrWillBeRawPtr<MouseEvent> me = MouseEvent::create(eventType,
1639 true, true, m_frame->document()->domWindow(), 1639 true, true, m_frame->document()->domWindow(),
1640 0, event.globalPosition().x(), event.globalPosition().y(), event.positio n().x(), event.position().y(), 1640 0, event.globalPosition().x(), event.globalPosition().y(), event.positio n().x(), event.position().y(),
1641 event.movementDelta().x(), event.movementDelta().y(), 1641 event.movementDelta().x(), event.movementDelta().y(),
1642 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 1642 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(),
1643 0, nullptr, dataTransfer); 1643 0, 0, nullptr, dataTransfer);
Rick Byers 2014/11/14 19:48:09 This looks like a bug too. DragEvent is a MouseEv
zino 2014/11/18 14:19:35 I left a FIXME comment. This seems to be non-trivi
Rick Byers 2014/11/18 20:29:18 Ok. Thanks for adding the RuntimeEnabledFeature -
1644 1644
1645 dragTarget->dispatchEvent(me.get(), IGNORE_EXCEPTION); 1645 dragTarget->dispatchEvent(me.get(), IGNORE_EXCEPTION);
1646 return me->defaultPrevented(); 1646 return me->defaultPrevented();
1647 } 1647 }
1648 1648
1649 static bool targetIsFrame(Node* target, LocalFrame*& frame) 1649 static bool targetIsFrame(Node* target, LocalFrame*& frame)
1650 { 1650 {
1651 if (!isHTMLFrameElementBase(target)) 1651 if (!isHTMLFrameElementBase(target))
1652 return false; 1652 return false;
1653 1653
(...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after
3871 unsigned EventHandler::accessKeyModifiers() 3871 unsigned EventHandler::accessKeyModifiers()
3872 { 3872 {
3873 #if OS(MACOSX) 3873 #if OS(MACOSX)
3874 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3874 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3875 #else 3875 #else
3876 return PlatformEvent::AltKey; 3876 return PlatformEvent::AltKey;
3877 #endif 3877 #endif
3878 } 3878 }
3879 3879
3880 } // namespace blink 3880 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698