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