| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 PlatformTouchPoint point; | 233 PlatformTouchPoint point; |
| 234 Member<EventTarget> touchTarget; | 234 Member<EventTarget> touchTarget; |
| 235 Member<LocalFrame> targetFrame; | 235 Member<LocalFrame> targetFrame; |
| 236 FloatPoint adjustedPagePoint; | 236 FloatPoint adjustedPagePoint; |
| 237 FloatSize adjustedRadius; | 237 FloatSize adjustedRadius; |
| 238 bool knownTarget; | 238 bool knownTarget; |
| 239 bool consumed; | 239 bool consumed; |
| 240 String region; | 240 String region; |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 // TODO(bokan): This seems like it no longer belongs here. |
| 244 void handleOverscroll(const ScrollResult&, const FloatPoint& positionInRootF
rame = FloatPoint(), const FloatSize& velocity = FloatSize()); |
| 245 |
| 243 private: | 246 private: |
| 244 static DragState& dragState(); | 247 static DragState& dragState(); |
| 245 | 248 |
| 246 DataTransfer* createDraggingDataTransfer() const; | 249 DataTransfer* createDraggingDataTransfer() const; |
| 247 | 250 |
| 248 WebInputEventResult handleMouseMoveOrLeaveEvent(const PlatformMouseEvent&, H
itTestResult* hoveredNode = nullptr, bool onlyUpdateScrollbars = false, bool for
ceLeave = false); | 251 WebInputEventResult handleMouseMoveOrLeaveEvent(const PlatformMouseEvent&, H
itTestResult* hoveredNode = nullptr, bool onlyUpdateScrollbars = false, bool for
ceLeave = false); |
| 249 WebInputEventResult handleMousePressEvent(const MouseEventWithHitTestResults
&); | 252 WebInputEventResult handleMousePressEvent(const MouseEventWithHitTestResults
&); |
| 250 WebInputEventResult handleMouseFocus(const MouseEventWithHitTestResults&, In
putDeviceCapabilities* sourceCapabilities); | 253 WebInputEventResult handleMouseFocus(const MouseEventWithHitTestResults&, In
putDeviceCapabilities* sourceCapabilities); |
| 251 WebInputEventResult handleMouseDraggedEvent(const MouseEventWithHitTestResul
ts&); | 254 WebInputEventResult handleMouseDraggedEvent(const MouseEventWithHitTestResul
ts&); |
| 252 WebInputEventResult handleMouseReleaseEvent(const MouseEventWithHitTestResul
ts&); | 255 WebInputEventResult handleMouseReleaseEvent(const MouseEventWithHitTestResul
ts&); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 277 void updateCursor(); | 280 void updateCursor(); |
| 278 | 281 |
| 279 ScrollableArea* associatedScrollableArea(const PaintLayer*) const; | 282 ScrollableArea* associatedScrollableArea(const PaintLayer*) const; |
| 280 | 283 |
| 281 // Performs a chaining scroll, within a *single* frame, starting from a | 284 // Performs a chaining scroll, within a *single* frame, starting from a |
| 282 // given node and optionally stopping on a given node. | 285 // given node and optionally stopping on a given node. |
| 283 // granularity - The units that the scroll delta parameter is in. | 286 // granularity - The units that the scroll delta parameter is in. |
| 284 // delta - The delta to scroll by, in the units of the granularity param | 287 // delta - The delta to scroll by, in the units of the granularity param |
| 285 // (e.g. pixels, lines, pages, etc.). These are in a physical | 288 // (e.g. pixels, lines, pages, etc.). These are in a physical |
| 286 // direction. i.e. Positive is down and right. | 289 // direction. i.e. Positive is down and right. |
| 290 // position - Where the scroll originated from (e.g. touch location). |
| 291 // velocity - The velocity of the scroll in the case of fling gestures. |
| 287 // startNode - The node to start the scroll chaining from. | 292 // startNode - The node to start the scroll chaining from. |
| 288 // stopNode - On input, if non-null, the node at which we should stop | 293 // stopNode - On input, if non-null, the node at which we should stop |
| 289 // chaining. On output, if provided and a node was scrolled, | 294 // chaining. On output, if provided and a node was scrolled, |
| 290 // stopNode will point to that node. | 295 // stopNode will point to that node. |
| 291 // consumed - [OUT] Whether the scroll was consumed. This is different than | 296 // consumed - [OUT] Whether the scroll was consumed. This is different than |
| 292 // ScrollResult.didScroll since we might not have scrolled but | 297 // ScrollResult.didScroll since we might not have scrolled but |
| 293 // have reached the stopNode and thus don't want to continue | 298 // have reached the stopNode and thus don't want to continue |
| 294 // chaining the scroll. | 299 // chaining the scroll. |
| 295 ScrollResult physicalScroll(ScrollGranularity, const FloatSize& delta, Node*
startNode, Node** stopNode, bool* consumed); | 300 ScrollResult physicalScroll( |
| 301 ScrollGranularity, |
| 302 const FloatSize& delta, |
| 303 const FloatPoint& position, |
| 304 const FloatSize& velocity, |
| 305 Node* startNode, |
| 306 Node** stopNode, |
| 307 bool* consumed); |
| 296 | 308 |
| 297 // Performs a chaining logical scroll, within a *single* frame, starting | 309 // Performs a chaining logical scroll, within a *single* frame, starting |
| 298 // from either a provided starting node or a default based on the focused or | 310 // from either a provided starting node or a default based on the focused or |
| 299 // most recently clicked node, falling back to the frame. | 311 // most recently clicked node, falling back to the frame. |
| 300 // Returns true if the scroll was consumed. | 312 // Returns true if the scroll was consumed. |
| 301 // direction - The logical direction to scroll in. This will be converted to | 313 // direction - The logical direction to scroll in. This will be converted to |
| 302 // a physical direction for each LayoutBox we try to scroll | 314 // a physical direction for each LayoutBox we try to scroll |
| 303 // based on that box's writing mode. | 315 // based on that box's writing mode. |
| 304 // granularity - The units that the scroll delta parameter is in. | 316 // granularity - The units that the scroll delta parameter is in. |
| 305 // startNode - Optional. If provided, start chaining from the given node. | 317 // startNode - Optional. If provided, start chaining from the given node. |
| 306 // If not, use the current focus or last clicked node. | 318 // If not, use the current focus or last clicked node. |
| 307 bool logicalScroll(ScrollDirection, ScrollGranularity, Node* startNode = nul
lptr); | 319 bool logicalScroll(ScrollDirection, ScrollGranularity, Node* startNode = nul
lptr); |
| 308 | 320 |
| 309 void resetOverscroll(bool didScrollX, bool didScrollY); | 321 void resetOverscroll(bool didScrollX, bool didScrollY); |
| 310 void handleOverscroll(const ScrollResult&, const FloatPoint& positionInRootF
rame = FloatPoint(), const FloatSize& velocity = FloatSize()); | |
| 311 | 322 |
| 323 ScrollResult scrollBox( |
| 324 LayoutBox*, |
| 325 ScrollGranularity, |
| 326 const FloatSize& delta, |
| 327 const FloatPoint& position, |
| 328 const FloatSize& velocity, |
| 329 bool* wasRootScroller); |
| 330 |
| 331 bool isRootScroller(const Node&) const; |
| 312 void customizedScroll(const Node& startNode, ScrollState&); | 332 void customizedScroll(const Node& startNode, ScrollState&); |
| 313 | 333 |
| 314 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); | 334 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); |
| 315 | 335 |
| 316 void invalidateClick(); | 336 void invalidateClick(); |
| 317 | 337 |
| 318 Node* updateMouseEventTargetNode(Node*, const PlatformMouseEvent&); | 338 Node* updateMouseEventTargetNode(Node*, const PlatformMouseEvent&); |
| 319 void updateMouseEventTargetNodeAndSendEvents(Node*, const PlatformMouseEvent
&, bool isFrameBoundaryTransition = false); | 339 void updateMouseEventTargetNodeAndSendEvents(Node*, const PlatformMouseEvent
&, bool isFrameBoundaryTransition = false); |
| 320 | 340 |
| 321 | 341 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 // scroll which shouldn't propagate can't cause any element to | 508 // scroll which shouldn't propagate can't cause any element to |
| 489 // scroll other than the |m_previousGestureScrolledNode|. | 509 // scroll other than the |m_previousGestureScrolledNode|. |
| 490 bool m_deltaConsumedForScrollSequence; | 510 bool m_deltaConsumedForScrollSequence; |
| 491 }; | 511 }; |
| 492 | 512 |
| 493 } // namespace blink | 513 } // namespace blink |
| 494 | 514 |
| 495 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); | 515 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); |
| 496 | 516 |
| 497 #endif // EventHandler_h | 517 #endif // EventHandler_h |
| OLD | NEW |