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