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

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

Issue 920523003: Plumb WebTouchEvent::causesScrollingIfUncanceled to TouchEvent and (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/events/TouchEvent.cpp ('k') | Source/platform/PlatformTouchEvent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3770 matching lines...) Expand 10 before | Expand all | Expand 10 after
3781 if (!changedTouches[state].m_touches) 3781 if (!changedTouches[state].m_touches)
3782 continue; 3782 continue;
3783 3783
3784 const AtomicString& stateName(eventNameForTouchPointState(static_cast<Pl atformTouchPoint::State>(state))); 3784 const AtomicString& stateName(eventNameForTouchPointState(static_cast<Pl atformTouchPoint::State>(state)));
3785 const EventTargetSet& targetsForState = changedTouches[state].m_targets; 3785 const EventTargetSet& targetsForState = changedTouches[state].m_targets;
3786 for (const RefPtrWillBeMember<EventTarget>& eventTarget : targetsForStat e) { 3786 for (const RefPtrWillBeMember<EventTarget>& eventTarget : targetsForStat e) {
3787 EventTarget* touchEventTarget = eventTarget.get(); 3787 EventTarget* touchEventTarget = eventTarget.get();
3788 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create( 3788 RefPtrWillBeRawPtr<TouchEvent> touchEvent = TouchEvent::create(
3789 touches.get(), touchesByTarget.get(touchEventTarget), changedTou ches[state].m_touches.get(), 3789 touches.get(), touchesByTarget.get(touchEventTarget), changedTou ches[state].m_touches.get(),
3790 stateName, touchEventTarget->toNode()->document().domWindow(), 3790 stateName, touchEventTarget->toNode()->document().domWindow(),
3791 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey (), event.cancelable(), event.timestamp()); 3791 event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey (), event.cancelable(), event.causesScrollingIfUncanceled(), event.timestamp());
3792 touchEventTarget->toNode()->dispatchTouchEvent(touchEvent.get()); 3792 touchEventTarget->toNode()->dispatchTouchEvent(touchEvent.get());
3793 swallowedEvent = swallowedEvent || touchEvent->defaultPrevented() || touchEvent->defaultHandled(); 3793 swallowedEvent = swallowedEvent || touchEvent->defaultPrevented() || touchEvent->defaultHandled();
3794 } 3794 }
3795 } 3795 }
3796 3796
3797 return swallowedEvent; 3797 return swallowedEvent;
3798 } 3798 }
3799 3799
3800 TouchAction EventHandler::intersectTouchAction(TouchAction action1, TouchAction action2) 3800 TouchAction EventHandler::intersectTouchAction(TouchAction action1, TouchAction action2)
3801 { 3801 {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3906 unsigned EventHandler::accessKeyModifiers() 3906 unsigned EventHandler::accessKeyModifiers()
3907 { 3907 {
3908 #if OS(MACOSX) 3908 #if OS(MACOSX)
3909 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3909 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3910 #else 3910 #else
3911 return PlatformEvent::AltKey; 3911 return PlatformEvent::AltKey;
3912 #endif 3912 #endif
3913 } 3913 }
3914 3914
3915 } // namespace blink 3915 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/events/TouchEvent.cpp ('k') | Source/platform/PlatformTouchEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698