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

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: Rebase 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
« no previous file with comments | « no previous file | Source/platform/PlatformGestureEvent.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 2447 matching lines...) Expand 10 before | Expand all | Expand 10 after
2458 return sendScrollEventToView(gestureEvent, delta); 2458 return sendScrollEventToView(gestureEvent, delta);
2459 2459
2460 // Ignore this event if the targeted node does not have a valid renderer. 2460 // Ignore this event if the targeted node does not have a valid renderer.
2461 RenderObject* renderer = node->renderer(); 2461 RenderObject* renderer = node->renderer();
2462 if (!renderer) 2462 if (!renderer)
2463 return false; 2463 return false;
2464 2464
2465 RefPtrWillBeRawPtr<FrameView> protector(m_frame->view()); 2465 RefPtrWillBeRawPtr<FrameView> protector(m_frame->view());
2466 2466
2467 Node* stopNode = nullptr; 2467 Node* stopNode = nullptr;
2468 bool scrollShouldNotPropagate = gestureEvent.type() == PlatformEvent::Gestur eScrollUpdateWithoutPropagation; 2468 bool scrollShouldNotPropagate = gestureEvent.type() == PlatformEvent::Gestur eScrollUpdateWithoutPropagation
2469 || (gestureEvent.type() == PlatformEvent::GestureScrollUpdate && gesture Event.preventPropagation());
2469 2470
2470 // Try to send the event to the correct view. 2471 // Try to send the event to the correct view.
2471 if (passScrollGestureEventToWidget(gestureEvent, renderer)) { 2472 if (passScrollGestureEventToWidget(gestureEvent, renderer)) {
2472 if(scrollShouldNotPropagate) 2473 if(scrollShouldNotPropagate)
2473 m_previousGestureScrolledNode = m_scrollGestureHandlingNode; 2474 m_previousGestureScrolledNode = m_scrollGestureHandlingNode;
2474 2475
2475 return true; 2476 return true;
2476 } 2477 }
2477 2478
2478 if (scrollShouldNotPropagate) 2479 if (scrollShouldNotPropagate)
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
3867 unsigned EventHandler::accessKeyModifiers() 3868 unsigned EventHandler::accessKeyModifiers()
3868 { 3869 {
3869 #if OS(MACOSX) 3870 #if OS(MACOSX)
3870 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3871 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3871 #else 3872 #else
3872 return PlatformEvent::AltKey; 3873 return PlatformEvent::AltKey;
3873 #endif 3874 #endif
3874 } 3875 }
3875 3876
3876 } // namespace blink 3877 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/PlatformGestureEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698