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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 bool performDragAndDrop(const PlatformMouseEvent&, DataTransfer*); | 118 bool performDragAndDrop(const PlatformMouseEvent&, DataTransfer*); |
119 void updateDragStateAfterEditDragIfNeeded(Element* rootEditableElement); | 119 void updateDragStateAfterEditDragIfNeeded(Element* rootEditableElement); |
120 | 120 |
121 void scheduleHoverStateUpdate(); | 121 void scheduleHoverStateUpdate(); |
122 void scheduleCursorUpdate(); | 122 void scheduleCursorUpdate(); |
123 | 123 |
124 void setResizingFrameSet(HTMLFrameSetElement*); | 124 void setResizingFrameSet(HTMLFrameSetElement*); |
125 | 125 |
126 void resizeScrollableAreaDestroyed(); | 126 void resizeScrollableAreaDestroyed(); |
127 | 127 |
| 128 IntPoint unusedDelta() const; |
| 129 IntPoint accumaltedRootOverScroll() const; |
| 130 void resetOverScrollParams(); |
| 131 |
128 IntPoint lastKnownMousePosition() const; | 132 IntPoint lastKnownMousePosition() const; |
129 Cursor currentMouseCursor() const { return m_currentMouseCursor; } | 133 Cursor currentMouseCursor() const { return m_currentMouseCursor; } |
130 | 134 |
131 // Attempts to scroll the DOM tree. If that fails, scrolls the view. | 135 // Attempts to scroll the DOM tree. If that fails, scrolls the view. |
132 // If the view can't be scrolled either, recursively bubble to the parent fr
ame. | 136 // If the view can't be scrolled either, recursively bubble to the parent fr
ame. |
133 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
nullptr); | 137 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
nullptr); |
134 | 138 |
135 bool handleMouseMoveEvent(const PlatformMouseEvent&); | 139 bool handleMouseMoveEvent(const PlatformMouseEvent&); |
136 void handleMouseLeaveEvent(const PlatformMouseEvent&); | 140 void handleMouseLeaveEvent(const PlatformMouseEvent&); |
137 | 141 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 // False if we reached the root and couldn't scroll anything. | 253 // False if we reached the root and couldn't scroll anything. |
250 // direction - The direction to scroll in. If this is a logical direction, i
t will be | 254 // direction - The direction to scroll in. If this is a logical direction, i
t will be |
251 // converted to the physical direction based on a node's writing
mode. | 255 // converted to the physical direction based on a node's writing
mode. |
252 // granularity - The units that the scroll delta parameter is in. | 256 // granularity - The units that the scroll delta parameter is in. |
253 // startNode - The node to start bubbling the scroll from. If a node can't s
croll, | 257 // startNode - The node to start bubbling the scroll from. If a node can't s
croll, |
254 // the scroll bubbles up to the containing block. | 258 // the scroll bubbles up to the containing block. |
255 // stopNode - On input, if provided and non-null, the node at which we shoul
d stop bubbling on input. | 259 // stopNode - On input, if provided and non-null, the node at which we shoul
d stop bubbling on input. |
256 // On output, if provided and a node was scrolled stopNode will p
oint to that node. | 260 // On output, if provided and a node was scrolled stopNode will p
oint to that node. |
257 // delta - The delta to scroll by, in the units of the granularity parameter
. (e.g. pixels, lines, pages, etc.) | 261 // delta - The delta to scroll by, in the units of the granularity parameter
. (e.g. pixels, lines, pages, etc.) |
258 // absolutePoint - For wheel scrolls - the location, in absolute coordinates
, where the event occured. | 262 // absolutePoint - For wheel scrolls - the location, in absolute coordinates
, where the event occured. |
259 bool scroll(ScrollDirection, ScrollGranularity, Node* startNode = nullptr, N
ode** stopNode = nullptr, float delta = 1.0f, IntPoint absolutePoint = IntPoint(
)); | 263 bool scroll(ScrollDirection, ScrollGranularity, Node* startNode = nullptr, N
ode** stopNode = nullptr, float delta = 1.0f, IntPoint absolutePoint = IntPoint(
), int* unusedDelta = nullptr); |
260 | 264 |
261 void customizedScroll(const Node& startNode, ScrollState&); | 265 void customizedScroll(const Node& startNode, ScrollState&); |
262 | 266 |
263 TouchAction intersectTouchAction(const TouchAction, const TouchAction); | 267 TouchAction intersectTouchAction(const TouchAction, const TouchAction); |
264 TouchAction computeEffectiveTouchAction(const Node&); | 268 TouchAction computeEffectiveTouchAction(const Node&); |
265 | 269 |
266 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); | 270 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); |
267 | 271 |
268 void invalidateClick(); | 272 void invalidateClick(); |
269 | 273 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 RefPtrWillBeMember<Node> m_clickNode; | 369 RefPtrWillBeMember<Node> m_clickNode; |
366 | 370 |
367 RefPtrWillBeMember<Node> m_dragTarget; | 371 RefPtrWillBeMember<Node> m_dragTarget; |
368 bool m_shouldOnlyFireDragOverEvent; | 372 bool m_shouldOnlyFireDragOverEvent; |
369 | 373 |
370 RefPtrWillBeMember<HTMLFrameSetElement> m_frameSetBeingResized; | 374 RefPtrWillBeMember<HTMLFrameSetElement> m_frameSetBeingResized; |
371 | 375 |
372 LayoutSize m_offsetFromResizeCorner; // In the coords of m_resizeScrollableA
rea. | 376 LayoutSize m_offsetFromResizeCorner; // In the coords of m_resizeScrollableA
rea. |
373 | 377 |
374 bool m_mousePositionIsUnknown; | 378 bool m_mousePositionIsUnknown; |
| 379 |
| 380 IntPoint m_unusedDelta; |
| 381 IntPoint m_accumulatedRootOverscroll; |
| 382 |
375 IntPoint m_lastKnownMousePosition; | 383 IntPoint m_lastKnownMousePosition; |
376 IntPoint m_lastKnownMouseGlobalPosition; | 384 IntPoint m_lastKnownMouseGlobalPosition; |
377 IntPoint m_mouseDownPos; // In our view's coords. | 385 IntPoint m_mouseDownPos; // In our view's coords. |
378 double m_mouseDownTimestamp; | 386 double m_mouseDownTimestamp; |
379 PlatformMouseEvent m_mouseDown; | 387 PlatformMouseEvent m_mouseDown; |
380 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; | 388 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; |
381 | 389 |
382 RefPtrWillBeMember<Node> m_latchedWheelEventNode; | 390 RefPtrWillBeMember<Node> m_latchedWheelEventNode; |
383 bool m_widgetIsLatched; | 391 bool m_widgetIsLatched; |
384 | 392 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 // scroll sequence in this frame, or any child frames. Only used | 425 // scroll sequence in this frame, or any child frames. Only used |
418 // with ScrollCustomization. If some delta has been consumed, a | 426 // with ScrollCustomization. If some delta has been consumed, a |
419 // scroll which shouldn't propagate can't cause any element to | 427 // scroll which shouldn't propagate can't cause any element to |
420 // scroll other than the |m_previousGestureScrolledNode|. | 428 // scroll other than the |m_previousGestureScrolledNode|. |
421 bool m_deltaConsumedForScrollSequence; | 429 bool m_deltaConsumedForScrollSequence; |
422 }; | 430 }; |
423 | 431 |
424 } // namespace blink | 432 } // namespace blink |
425 | 433 |
426 #endif // EventHandler_h | 434 #endif // EventHandler_h |
OLD | NEW |