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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.h

Issue 1738243002: Removed main-thread one dimensional scrolling paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@removeStepFromUserScroll
Patch Set: Removed TODO that was already fixed Created 4 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
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 bool cursorUpdatePending(); 128 bool cursorUpdatePending();
129 129
130 void setResizingFrameSet(HTMLFrameSetElement*); 130 void setResizingFrameSet(HTMLFrameSetElement*);
131 131
132 void resizeScrollableAreaDestroyed(); 132 void resizeScrollableAreaDestroyed();
133 133
134 IntPoint lastKnownMousePosition() const; 134 IntPoint lastKnownMousePosition() const;
135 135
136 IntPoint dragDataTransferLocationForTesting(); 136 IntPoint dragDataTransferLocationForTesting();
137 137
138 // Attempts to scroll the DOM tree. If that fails, scrolls the view. 138 // Performs a logical scroll that bubbles, crossing frames, starting from
139 // If the view can't be scrolled either, recursively bubble to the parent fr ame. 139 // the given node or a reasonable default (focus/last clicked).
140 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode = nullptr); 140 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode = nullptr);
141 141
142 WebInputEventResult handleMouseMoveEvent(const PlatformMouseEvent&); 142 WebInputEventResult handleMouseMoveEvent(const PlatformMouseEvent&);
143 void handleMouseLeaveEvent(const PlatformMouseEvent&); 143 void handleMouseLeaveEvent(const PlatformMouseEvent&);
144 144
145 WebInputEventResult handleMousePressEvent(const PlatformMouseEvent&); 145 WebInputEventResult handleMousePressEvent(const PlatformMouseEvent&);
146 WebInputEventResult handleMouseReleaseEvent(const PlatformMouseEvent&); 146 WebInputEventResult handleMouseReleaseEvent(const PlatformMouseEvent&);
147 WebInputEventResult handleWheelEvent(const PlatformWheelEvent&); 147 WebInputEventResult handleWheelEvent(const PlatformWheelEvent&);
148 void defaultWheelEventHandler(Node*, WheelEvent*); 148 void defaultWheelEventHandler(Node*, WheelEvent*);
149 149
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 void cursorUpdateTimerFired(Timer<EventHandler>*); 258 void cursorUpdateTimerFired(Timer<EventHandler>*);
259 void activeIntervalTimerFired(Timer<EventHandler>*); 259 void activeIntervalTimerFired(Timer<EventHandler>*);
260 260
261 void fakeMouseMoveEventTimerFired(Timer<EventHandler>*); 261 void fakeMouseMoveEventTimerFired(Timer<EventHandler>*);
262 void cancelFakeMouseMoveEvent(); 262 void cancelFakeMouseMoveEvent();
263 bool isCursorVisible() const; 263 bool isCursorVisible() const;
264 void updateCursor(); 264 void updateCursor();
265 265
266 ScrollableArea* associatedScrollableArea(const PaintLayer*) const; 266 ScrollableArea* associatedScrollableArea(const PaintLayer*) const;
267 267
268 // Scrolls the elements of the DOM tree. Returns true if a node was scrolled . 268 // Performs a bubbling scroll, within a *single* frame, starting from a
tdresser 2016/02/29 14:53:43 I'd prefer if we used the terms "bubble" and "chai
bokan 2016/03/01 05:56:24 I've updated the comments. I'd like to remove bubb
269 // False if we reached the root and couldn't scroll anything. 269 // given node and optionally stopping on a given node. Does *not* attempt
270 // direction - The direction to scroll in. If this is a logical direction, i t will be 270 // to scroll the layout view.
271 // converted to the physical direction based on a node's writing mode.
272 // granularity - The units that the scroll delta parameter is in. 271 // granularity - The units that the scroll delta parameter is in.
273 // startNode - The node to start bubbling the scroll from. If a node can't s croll, 272 // delta - The delta to scroll by, in the units of the granularity param
274 // the scroll bubbles up to the containing block. 273 // (e.g. pixels, lines, pages, etc.). These are in a physical
275 // stopNode - On input, if provided and non-null, the node at which we shoul d stop bubbling on input. 274 // direction. i.e. Positive is down and right.
276 // On output, if provided and a node was scrolled stopNode will p oint to that node. 275 // startNode - The node to start bubbling the scroll from.
277 // delta - The delta to scroll by, in the units of the granularity parameter . (e.g. pixels, lines, pages, etc.) 276 // stopNode - On input, if provided and non-null, the node at which we
278 ScrollResultOneDimensional scroll(ScrollDirection, ScrollGranularity, Node* startNode = nullptr, Node** stopNode = nullptr, float delta = 1.0f); 277 // should stop bubbling. On output, if provided and a node was
278 // scrolled, stopNode will point to that node.
279 ScrollResult physicalScroll(ScrollGranularity, const FloatSize& delta, Node* startNode, Node** stopNode = nullptr);
280
281 // Performs a bubbling logical scroll, within a *single* frame, starting
282 // from either a provided starting node or a default based on focus/clicked.
tdresser 2016/02/29 14:53:43 "based on focus/clicked" Can this be a bit more p
bokan 2016/03/01 05:56:24 Done.
283 // Returns true if the scroll was consumed.
284 // direction - The logical direction to scroll in. This will be converted to
285 // a physical direction for each LayoutBox we try to scroll
286 // based on that box's writing mode.
skobes 2016/02/29 18:52:47 Is this behavior covered by any spec? It seems a
bokan 2016/03/01 05:56:24 I'm not sure about a spec, but this is just descri
287 // granularity - The size of the scroll.
288 // startNode - Optional. If provided, start bubbling from the given node.
289 // If not, use the current focus or last clicked node.
290 bool logicalScroll(ScrollDirection, ScrollGranularity, Node* startNode = nul lptr);
279 291
280 void resetOverscroll(bool didScrollX, bool didScrollY); 292 void resetOverscroll(bool didScrollX, bool didScrollY);
281 void handleOverscroll(const ScrollResult&, const FloatPoint& position = Floa tPoint(), const FloatSize& velocity = FloatSize()); 293 void handleOverscroll(const ScrollResult&, const FloatPoint& position = Floa tPoint(), const FloatSize& velocity = FloatSize());
282 294
283 void customizedScroll(const Node& startNode, ScrollState&); 295 void customizedScroll(const Node& startNode, ScrollState&);
284 296
285 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest:: Active); 297 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest:: Active);
286 298
287 void invalidateClick(); 299 void invalidateClick();
288 300
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 // scroll which shouldn't propagate can't cause any element to 470 // scroll which shouldn't propagate can't cause any element to
459 // scroll other than the |m_previousGestureScrolledNode|. 471 // scroll other than the |m_previousGestureScrolledNode|.
460 bool m_deltaConsumedForScrollSequence; 472 bool m_deltaConsumedForScrollSequence;
461 }; 473 };
462 474
463 } // namespace blink 475 } // namespace blink
464 476
465 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); 477 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo);
466 478
467 #endif // EventHandler_h 479 #endif // EventHandler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698