OLD | NEW |
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 void scheduleHoverStateUpdate(); | 121 void scheduleHoverStateUpdate(); |
122 void scheduleCursorUpdate(); | 122 void scheduleCursorUpdate(); |
123 | 123 |
124 // Return whether a mouse cursor update is currently pending. Used for test
ing. | 124 // Return whether a mouse cursor update is currently pending. Used for test
ing. |
125 bool cursorUpdatePending(); | 125 bool cursorUpdatePending(); |
126 | 126 |
127 void setResizingFrameSet(HTMLFrameSetElement*); | 127 void setResizingFrameSet(HTMLFrameSetElement*); |
128 | 128 |
129 void resizeScrollableAreaDestroyed(); | 129 void resizeScrollableAreaDestroyed(); |
130 | 130 |
| 131 FloatSize unusedDeltaForTesting() const { return m_unusedDelta; } |
| 132 FloatSize accumulatedRootOverscrollForTesting() const { return m_accumulated
RootOverscroll; } |
| 133 |
131 IntPoint lastKnownMousePosition() const; | 134 IntPoint lastKnownMousePosition() const; |
132 | 135 |
133 // Attempts to scroll the DOM tree. If that fails, scrolls the view. | 136 // Attempts to scroll the DOM tree. If that fails, scrolls the view. |
134 // If the view can't be scrolled either, recursively bubble to the parent fr
ame. | 137 // If the view can't be scrolled either, recursively bubble to the parent fr
ame. |
135 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
nullptr); | 138 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
nullptr); |
136 | 139 |
137 bool handleMouseMoveEvent(const PlatformMouseEvent&); | 140 bool handleMouseMoveEvent(const PlatformMouseEvent&); |
138 void handleMouseLeaveEvent(const PlatformMouseEvent&); | 141 void handleMouseLeaveEvent(const PlatformMouseEvent&); |
139 | 142 |
140 bool handleMousePressEvent(const PlatformMouseEvent&); | 143 bool handleMousePressEvent(const PlatformMouseEvent&); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // False if we reached the root and couldn't scroll anything. | 257 // False if we reached the root and couldn't scroll anything. |
255 // direction - The direction to scroll in. If this is a logical direction, i
t will be | 258 // direction - The direction to scroll in. If this is a logical direction, i
t will be |
256 // converted to the physical direction based on a node's writing
mode. | 259 // converted to the physical direction based on a node's writing
mode. |
257 // granularity - The units that the scroll delta parameter is in. | 260 // granularity - The units that the scroll delta parameter is in. |
258 // startNode - The node to start bubbling the scroll from. If a node can't s
croll, | 261 // startNode - The node to start bubbling the scroll from. If a node can't s
croll, |
259 // the scroll bubbles up to the containing block. | 262 // the scroll bubbles up to the containing block. |
260 // stopNode - On input, if provided and non-null, the node at which we shoul
d stop bubbling on input. | 263 // stopNode - On input, if provided and non-null, the node at which we shoul
d stop bubbling on input. |
261 // On output, if provided and a node was scrolled stopNode will p
oint to that node. | 264 // On output, if provided and a node was scrolled stopNode will p
oint to that node. |
262 // delta - The delta to scroll by, in the units of the granularity parameter
. (e.g. pixels, lines, pages, etc.) | 265 // delta - The delta to scroll by, in the units of the granularity parameter
. (e.g. pixels, lines, pages, etc.) |
263 // absolutePoint - For wheel scrolls - the location, in absolute coordinates
, where the event occured. | 266 // absolutePoint - For wheel scrolls - the location, in absolute coordinates
, where the event occured. |
264 bool scroll(ScrollDirection, ScrollGranularity, Node* startNode = nullptr, N
ode** stopNode = nullptr, float delta = 1.0f, IntPoint absolutePoint = IntPoint(
)); | 267 ScrollResultOneDimensional scroll(ScrollDirection, ScrollGranularity, Node*
startNode = nullptr, Node** stopNode = nullptr, float delta = 1.0f, IntPoint abs
olutePoint = IntPoint()); |
| 268 |
| 269 void resetOverscroll(bool didScrollX, bool didScrollY); |
265 | 270 |
266 void customizedScroll(const Node& startNode, ScrollState&); | 271 void customizedScroll(const Node& startNode, ScrollState&); |
267 | 272 |
268 TouchAction intersectTouchAction(const TouchAction, const TouchAction); | 273 TouchAction intersectTouchAction(const TouchAction, const TouchAction); |
269 TouchAction computeEffectiveTouchAction(const Node&); | 274 TouchAction computeEffectiveTouchAction(const Node&); |
270 | 275 |
271 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); | 276 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); |
272 | 277 |
273 void invalidateClick(); | 278 void invalidateClick(); |
274 | 279 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 int m_clickCount; | 376 int m_clickCount; |
372 RefPtrWillBeMember<Node> m_clickNode; | 377 RefPtrWillBeMember<Node> m_clickNode; |
373 | 378 |
374 RefPtrWillBeMember<Node> m_dragTarget; | 379 RefPtrWillBeMember<Node> m_dragTarget; |
375 bool m_shouldOnlyFireDragOverEvent; | 380 bool m_shouldOnlyFireDragOverEvent; |
376 | 381 |
377 RefPtrWillBeMember<HTMLFrameSetElement> m_frameSetBeingResized; | 382 RefPtrWillBeMember<HTMLFrameSetElement> m_frameSetBeingResized; |
378 | 383 |
379 LayoutSize m_offsetFromResizeCorner; // In the coords of m_resizeScrollableA
rea. | 384 LayoutSize m_offsetFromResizeCorner; // In the coords of m_resizeScrollableA
rea. |
380 | 385 |
| 386 FloatSize m_unusedDelta; |
| 387 FloatSize m_accumulatedRootOverscroll; |
| 388 |
381 bool m_mousePositionIsUnknown; | 389 bool m_mousePositionIsUnknown; |
382 // The last mouse movement position this frame has seen in root frame coordi
nates. | 390 // The last mouse movement position this frame has seen in root frame coordi
nates. |
383 IntPoint m_lastKnownMousePosition; | 391 IntPoint m_lastKnownMousePosition; |
384 IntPoint m_lastKnownMouseGlobalPosition; | 392 IntPoint m_lastKnownMouseGlobalPosition; |
385 IntPoint m_mouseDownPos; // In our view's coords. | 393 IntPoint m_mouseDownPos; // In our view's coords. |
386 double m_mouseDownTimestamp; | 394 double m_mouseDownTimestamp; |
387 PlatformMouseEvent m_mouseDown; | 395 PlatformMouseEvent m_mouseDown; |
388 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; | 396 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; |
389 | 397 |
390 RefPtrWillBeMember<Node> m_latchedWheelEventNode; | 398 RefPtrWillBeMember<Node> m_latchedWheelEventNode; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 // scroll sequence in this frame, or any child frames. Only used | 433 // scroll sequence in this frame, or any child frames. Only used |
426 // with ScrollCustomization. If some delta has been consumed, a | 434 // with ScrollCustomization. If some delta has been consumed, a |
427 // scroll which shouldn't propagate can't cause any element to | 435 // scroll which shouldn't propagate can't cause any element to |
428 // scroll other than the |m_previousGestureScrolledNode|. | 436 // scroll other than the |m_previousGestureScrolledNode|. |
429 bool m_deltaConsumedForScrollSequence; | 437 bool m_deltaConsumedForScrollSequence; |
430 }; | 438 }; |
431 | 439 |
432 } // namespace blink | 440 } // namespace blink |
433 | 441 |
434 #endif // EventHandler_h | 442 #endif // EventHandler_h |
OLD | NEW |