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

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

Issue 225903009: Migrate touch events to EventHandlerRegistry (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix indendation problems (added by meld?) Created 6 years, 4 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 | Annotate | Revision Log
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "core/editing/TextIterator.h" 44 #include "core/editing/TextIterator.h"
45 #include "core/editing/htmlediting.h" 45 #include "core/editing/htmlediting.h"
46 #include "core/events/DOMWindowEventQueue.h" 46 #include "core/events/DOMWindowEventQueue.h"
47 #include "core/events/EventPath.h" 47 #include "core/events/EventPath.h"
48 #include "core/events/KeyboardEvent.h" 48 #include "core/events/KeyboardEvent.h"
49 #include "core/events/MouseEvent.h" 49 #include "core/events/MouseEvent.h"
50 #include "core/events/TextEvent.h" 50 #include "core/events/TextEvent.h"
51 #include "core/events/TouchEvent.h" 51 #include "core/events/TouchEvent.h"
52 #include "core/events/WheelEvent.h" 52 #include "core/events/WheelEvent.h"
53 #include "core/fetch/ImageResource.h" 53 #include "core/fetch/ImageResource.h"
54 #include "core/frame/EventHandlerRegistry.h"
54 #include "core/frame/FrameView.h" 55 #include "core/frame/FrameView.h"
55 #include "core/frame/LocalFrame.h" 56 #include "core/frame/LocalFrame.h"
56 #include "core/frame/Settings.h" 57 #include "core/frame/Settings.h"
57 #include "core/html/HTMLDialogElement.h" 58 #include "core/html/HTMLDialogElement.h"
58 #include "core/html/HTMLFrameElementBase.h" 59 #include "core/html/HTMLFrameElementBase.h"
59 #include "core/html/HTMLFrameSetElement.h" 60 #include "core/html/HTMLFrameSetElement.h"
60 #include "core/html/HTMLInputElement.h" 61 #include "core/html/HTMLInputElement.h"
61 #include "core/inspector/InspectorController.h" 62 #include "core/inspector/InspectorController.h"
62 #include "core/loader/FrameLoader.h" 63 #include "core/loader/FrameLoader.h"
63 #include "core/loader/FrameLoaderClient.h" 64 #include "core/loader/FrameLoaderClient.h"
(...skipping 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after
3578 if (effectiveTouchAction != TouchActionAuto) 3579 if (effectiveTouchAction != TouchActionAuto)
3579 m_frame->page()->chrome().client().setTouchAction(effectiveTouch Action); 3580 m_frame->page()->chrome().client().setTouchAction(effectiveTouch Action);
3580 } 3581 }
3581 } 3582 }
3582 3583
3583 m_touchPressed = !allTouchReleased; 3584 m_touchPressed = !allTouchReleased;
3584 3585
3585 // If there's no document receiving touch events, or no handlers on the 3586 // If there's no document receiving touch events, or no handlers on the
3586 // document set to receive the events, then we can skip all the rest of 3587 // document set to receive the events, then we can skip all the rest of
3587 // this work. 3588 // this work.
3588 if (!m_touchSequenceDocument || !m_touchSequenceDocument->hasTouchEventHandl ers() || !m_touchSequenceDocument->frame()) { 3589 if (!m_touchSequenceDocument || !m_touchSequenceDocument->frameHost() || !m_ touchSequenceDocument->frameHost()->eventHandlerRegistry().hasEventHandlers(Even tHandlerRegistry::TouchEvent) || !m_touchSequenceDocument->frame()) {
3589 if (allTouchReleased) { 3590 if (allTouchReleased) {
3590 m_touchSequenceDocument.clear(); 3591 m_touchSequenceDocument.clear();
3591 m_touchSequenceUserGestureToken.clear(); 3592 m_touchSequenceUserGestureToken.clear();
3592 } 3593 }
3593 return false; 3594 return false;
3594 } 3595 }
3595 3596
3596 // Build up the lists to use for the 'touches', 'targetTouches' and 3597 // Build up the lists to use for the 'touches', 'targetTouches' and
3597 // 'changedTouches' attributes in the JS event. See 3598 // 'changedTouches' attributes in the JS event. See
3598 // http://www.w3.org/TR/touch-events/#touchevent-interface for how these 3599 // http://www.w3.org/TR/touch-events/#touchevent-interface for how these
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
3852 unsigned EventHandler::accessKeyModifiers() 3853 unsigned EventHandler::accessKeyModifiers()
3853 { 3854 {
3854 #if OS(MACOSX) 3855 #if OS(MACOSX)
3855 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3856 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3856 #else 3857 #else
3857 return PlatformEvent::AltKey; 3858 return PlatformEvent::AltKey;
3858 #endif 3859 #endif
3859 } 3860 }
3860 3861
3861 } // namespace blink 3862 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698