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

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

Issue 988823003: Use scroll customization primitives for touch scrolling (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address rbyers' nit. Created 5 years, 9 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
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/page/EventHandler.cpp » ('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, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class LocalFrame; 67 class LocalFrame;
68 class Node; 68 class Node;
69 class OptionalCursor; 69 class OptionalCursor;
70 class PlatformGestureEvent; 70 class PlatformGestureEvent;
71 class PlatformKeyboardEvent; 71 class PlatformKeyboardEvent;
72 class PlatformTouchEvent; 72 class PlatformTouchEvent;
73 class PlatformWheelEvent; 73 class PlatformWheelEvent;
74 class LayoutObject; 74 class LayoutObject;
75 class ScrollableArea; 75 class ScrollableArea;
76 class Scrollbar; 76 class Scrollbar;
77 class ScrollState;
77 class TextEvent; 78 class TextEvent;
78 class VisibleSelection; 79 class VisibleSelection;
79 class WheelEvent; 80 class WheelEvent;
80 class Widget; 81 class Widget;
81 82
82 enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTraili ngWhitespace }; 83 enum AppendTrailingWhitespace { ShouldAppendTrailingWhitespace, DontAppendTraili ngWhitespace };
83 enum class DragInitiator; 84 enum class DragInitiator;
84 85
85 class EventHandler : public NoBaseWillBeGarbageCollectedFinalized<EventHandler> { 86 class EventHandler : public NoBaseWillBeGarbageCollectedFinalized<EventHandler> {
86 WTF_MAKE_NONCOPYABLE(EventHandler); 87 WTF_MAKE_NONCOPYABLE(EventHandler);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 239
239 void fakeMouseMoveEventTimerFired(Timer<EventHandler>*); 240 void fakeMouseMoveEventTimerFired(Timer<EventHandler>*);
240 void cancelFakeMouseMoveEvent(); 241 void cancelFakeMouseMoveEvent();
241 bool isCursorVisible() const; 242 bool isCursorVisible() const;
242 void updateCursor(); 243 void updateCursor();
243 244
244 ScrollableArea* associatedScrollableArea(const DeprecatedPaintLayer*) const; 245 ScrollableArea* associatedScrollableArea(const DeprecatedPaintLayer*) const;
245 246
246 // Scrolls the elements of the DOM tree. Returns true if a node was scrolled . 247 // Scrolls the elements of the DOM tree. Returns true if a node was scrolled .
247 // False if we reached the root and couldn't scroll anything. 248 // False if we reached the root and couldn't scroll anything.
248 // direction - The direction to scroll in. If this is a logicl direction, it will be 249 // direction - The direction to scroll in. If this is a logical direction, i t will be
249 // converted to the physical direction based on a node's writing mode. 250 // converted to the physical direction based on a node's writing mode.
250 // granularity - The units that the scroll delta parameter is in. 251 // granularity - The units that the scroll delta parameter is in.
251 // startNode - The node to start bubbling the scroll from. If a node can't s croll, 252 // startNode - The node to start bubbling the scroll from. If a node can't s croll,
252 // the scroll bubbles up to the containing block. 253 // the scroll bubbles up to the containing block.
253 // stopNode - On input, if provided and non-null, the node at which we shoul d stop bubbling on input. 254 // stopNode - On input, if provided and non-null, the node at which we shoul d stop bubbling on input.
254 // On output, if provided and a node was scrolled stopNode will p oint to that node. 255 // On output, if provided and a node was scrolled stopNode will p oint to that node.
255 // delta - The delta to scroll by, in the units of the granularity parameter . (e.g. pixels, lines, pages, etc.) 256 // delta - The delta to scroll by, in the units of the granularity parameter . (e.g. pixels, lines, pages, etc.)
256 // absolutePoint - For wheel scrolls - the location, in absolute coordinates , where the event occured. 257 // absolutePoint - For wheel scrolls - the location, in absolute coordinates , where the event occured.
257 bool scroll(ScrollDirection, ScrollGranularity, Node* startNode = nullptr, N ode** stopNode = nullptr, float delta = 1.0f, IntPoint absolutePoint = IntPoint( )); 258 bool scroll(ScrollDirection, ScrollGranularity, Node* startNode = nullptr, N ode** stopNode = nullptr, float delta = 1.0f, IntPoint absolutePoint = IntPoint( ));
258 259
260 void customizedScroll(const Node& startNode, ScrollState&);
261
259 TouchAction intersectTouchAction(const TouchAction, const TouchAction); 262 TouchAction intersectTouchAction(const TouchAction, const TouchAction);
260 TouchAction computeEffectiveTouchAction(const Node&); 263 TouchAction computeEffectiveTouchAction(const Node&);
261 264
262 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest:: Active); 265 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest:: Active);
263 266
264 void invalidateClick(); 267 void invalidateClick();
265 268
266 void updateMouseEventTargetNode(Node*, const PlatformMouseEvent&, bool fireM ouseOverOut); 269 void updateMouseEventTargetNode(Node*, const PlatformMouseEvent&, bool fireM ouseOverOut);
267 270
268 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const PlatformMouseEvent&); 271 MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const PlatformMouseEvent&);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 TouchTargetMap m_targetForTouchID; 385 TouchTargetMap m_targetForTouchID;
383 386
384 // If set, the document of the active touch sequence. Unset if no touch sequ ence active. 387 // If set, the document of the active touch sequence. Unset if no touch sequ ence active.
385 RefPtrWillBeMember<Document> m_touchSequenceDocument; 388 RefPtrWillBeMember<Document> m_touchSequenceDocument;
386 RefPtr<UserGestureToken> m_touchSequenceUserGestureToken; 389 RefPtr<UserGestureToken> m_touchSequenceUserGestureToken;
387 390
388 bool m_touchPressed; 391 bool m_touchPressed;
389 392
390 RefPtrWillBeMember<Node> m_scrollGestureHandlingNode; 393 RefPtrWillBeMember<Node> m_scrollGestureHandlingNode;
391 bool m_lastGestureScrollOverWidget; 394 bool m_lastGestureScrollOverWidget;
395 // The most recent element to scroll natively during this scroll
396 // sequence. Null if no native element has scrolled this scroll
397 // sequence, or if the most recent element to scroll used scroll
398 // customization.
392 RefPtrWillBeMember<Node> m_previousGestureScrolledNode; 399 RefPtrWillBeMember<Node> m_previousGestureScrolledNode;
393 RefPtrWillBeMember<Scrollbar> m_scrollbarHandlingScrollGesture; 400 RefPtrWillBeMember<Scrollbar> m_scrollbarHandlingScrollGesture;
394 401
395 double m_maxMouseMovedDuration; 402 double m_maxMouseMovedDuration;
396 403
397 bool m_longTapShouldInvokeContextMenu; 404 bool m_longTapShouldInvokeContextMenu;
398 405
399 Timer<EventHandler> m_activeIntervalTimer; 406 Timer<EventHandler> m_activeIntervalTimer;
400 double m_lastShowPressTimestamp; 407 double m_lastShowPressTimestamp;
401 RefPtrWillBeMember<Element> m_lastDeferredTapElement; 408 RefPtrWillBeMember<Element> m_lastDeferredTapElement;
409
410 // Only used with the ScrollCustomization runtime enabled feature.
411 WillBeHeapDeque<RefPtrWillBeMember<Element>> m_currentScrollChain;
412 // True iff some of the delta has been consumed for the current
413 // scroll sequence in this frame, or any child frames. Only used
414 // with ScrollCustomization. If some delta has been consumed, a
415 // scroll which shouldn't propagate can't cause any element to
416 // scroll other than the |m_previousGestureScrolledNode|.
417 bool m_deltaConsumedForScrollSequence;
402 }; 418 };
403 419
404 } // namespace blink 420 } // namespace blink
405 421
406 #endif // EventHandler_h 422 #endif // EventHandler_h
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698