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

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

Issue 703983002: Add preventPropagation bit to GestureScrollUpdate event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Revert some unnecessary whitespace change 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 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 return sendScrollEventToView(gestureEvent, delta); 2438 return sendScrollEventToView(gestureEvent, delta);
2439 2439
2440 // Ignore this event if the targeted node does not have a valid renderer. 2440 // Ignore this event if the targeted node does not have a valid renderer.
2441 RenderObject* renderer = node->renderer(); 2441 RenderObject* renderer = node->renderer();
2442 if (!renderer) 2442 if (!renderer)
2443 return false; 2443 return false;
2444 2444
2445 RefPtrWillBeRawPtr<FrameView> protector(m_frame->view()); 2445 RefPtrWillBeRawPtr<FrameView> protector(m_frame->view());
2446 2446
2447 Node* stopNode = nullptr; 2447 Node* stopNode = nullptr;
2448 bool scrollShouldNotPropagate = gestureEvent.type() == PlatformEvent::Gestur eScrollUpdateWithoutPropagation; 2448 bool scrollShouldNotPropagate = gestureEvent.type() == PlatformEvent::Gestur eScrollUpdateWithoutPropagation
2449 || (gestureEvent.type() == PlatformEvent::GestureScrollUpdate && gesture Event.preventPropagation());
2449 2450
2450 // Try to send the event to the correct view. 2451 // Try to send the event to the correct view.
2451 if (passScrollGestureEventToWidget(gestureEvent, renderer)) { 2452 if (passScrollGestureEventToWidget(gestureEvent, renderer)) {
2452 if(scrollShouldNotPropagate) 2453 if(scrollShouldNotPropagate)
2453 m_previousGestureScrolledNode = m_scrollGestureHandlingNode; 2454 m_previousGestureScrolledNode = m_scrollGestureHandlingNode;
2454 2455
2455 return true; 2456 return true;
2456 } 2457 }
2457 2458
2458 if (scrollShouldNotPropagate) 2459 if (scrollShouldNotPropagate)
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
3885 unsigned EventHandler::accessKeyModifiers() 3886 unsigned EventHandler::accessKeyModifiers()
3886 { 3887 {
3887 #if OS(MACOSX) 3888 #if OS(MACOSX)
3888 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3889 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3889 #else 3890 #else
3890 return PlatformEvent::AltKey; 3891 return PlatformEvent::AltKey;
3891 #endif 3892 #endif
3892 } 3893 }
3893 3894
3894 } // namespace blink 3895 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/PlatformGestureEvent.h » ('j') | Source/web/tests/WebInputEventConversionTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698