| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 bool cursorUpdatePending(); | 128 bool cursorUpdatePending(); |
| 129 | 129 |
| 130 void setResizingFrameSet(HTMLFrameSetElement*); | 130 void setResizingFrameSet(HTMLFrameSetElement*); |
| 131 | 131 |
| 132 void resizeScrollableAreaDestroyed(); | 132 void resizeScrollableAreaDestroyed(); |
| 133 | 133 |
| 134 IntPoint lastKnownMousePosition() const; | 134 IntPoint lastKnownMousePosition() const; |
| 135 | 135 |
| 136 IntPoint dragDataTransferLocationForTesting(); | 136 IntPoint dragDataTransferLocationForTesting(); |
| 137 | 137 |
| 138 // Attempts to scroll the DOM tree. If that fails, scrolls the view. | 138 // Performs a logical scroll that chains, crossing frames, starting from |
| 139 // If the view can't be scrolled either, recursively bubble to the parent fr
ame. | 139 // the given node or a reasonable default (focus/last clicked). |
| 140 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
nullptr); | 140 bool bubblingScroll(ScrollDirection, ScrollGranularity, Node* startingNode =
nullptr); |
| 141 | 141 |
| 142 WebInputEventResult handleMouseMoveEvent(const PlatformMouseEvent&); | 142 WebInputEventResult handleMouseMoveEvent(const PlatformMouseEvent&); |
| 143 void handleMouseLeaveEvent(const PlatformMouseEvent&); | 143 void handleMouseLeaveEvent(const PlatformMouseEvent&); |
| 144 | 144 |
| 145 WebInputEventResult handleMousePressEvent(const PlatformMouseEvent&); | 145 WebInputEventResult handleMousePressEvent(const PlatformMouseEvent&); |
| 146 WebInputEventResult handleMouseReleaseEvent(const PlatformMouseEvent&); | 146 WebInputEventResult handleMouseReleaseEvent(const PlatformMouseEvent&); |
| 147 WebInputEventResult handleWheelEvent(const PlatformWheelEvent&); | 147 WebInputEventResult handleWheelEvent(const PlatformWheelEvent&); |
| 148 void defaultWheelEventHandler(Node*, WheelEvent*); | 148 void defaultWheelEventHandler(Node*, WheelEvent*); |
| 149 | 149 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 void cursorUpdateTimerFired(Timer<EventHandler>*); | 258 void cursorUpdateTimerFired(Timer<EventHandler>*); |
| 259 void activeIntervalTimerFired(Timer<EventHandler>*); | 259 void activeIntervalTimerFired(Timer<EventHandler>*); |
| 260 | 260 |
| 261 void fakeMouseMoveEventTimerFired(Timer<EventHandler>*); | 261 void fakeMouseMoveEventTimerFired(Timer<EventHandler>*); |
| 262 void cancelFakeMouseMoveEvent(); | 262 void cancelFakeMouseMoveEvent(); |
| 263 bool isCursorVisible() const; | 263 bool isCursorVisible() const; |
| 264 void updateCursor(); | 264 void updateCursor(); |
| 265 | 265 |
| 266 ScrollableArea* associatedScrollableArea(const PaintLayer*) const; | 266 ScrollableArea* associatedScrollableArea(const PaintLayer*) const; |
| 267 | 267 |
| 268 // Scrolls the elements of the DOM tree. Returns true if a node was scrolled
. | 268 // Performs a chaining scroll, within a *single* frame, starting from a |
| 269 // False if we reached the root and couldn't scroll anything. | 269 // given node and optionally stopping on a given node. Does *not* attempt |
| 270 // direction - The direction to scroll in. If this is a logical direction, i
t will be | 270 // to scroll the layout view. |
| 271 // converted to the physical direction based on a node's writing
mode. | |
| 272 // granularity - The units that the scroll delta parameter is in. | 271 // granularity - The units that the scroll delta parameter is in. |
| 273 // startNode - The node to start bubbling the scroll from. If a node can't s
croll, | 272 // delta - The delta to scroll by, in the units of the granularity param |
| 274 // the scroll bubbles up to the containing block. | 273 // (e.g. pixels, lines, pages, etc.). These are in a physical |
| 275 // stopNode - On input, if provided and non-null, the node at which we shoul
d stop bubbling on input. | 274 // direction. i.e. Positive is down and right. |
| 276 // On output, if provided and a node was scrolled stopNode will p
oint to that node. | 275 // startNode - The node to start the scroll chaining from. |
| 277 // delta - The delta to scroll by, in the units of the granularity parameter
. (e.g. pixels, lines, pages, etc.) | 276 // stopNode - On input, if provided and non-null, the node at which we |
| 278 ScrollResultOneDimensional scroll(ScrollDirection, ScrollGranularity, Node*
startNode = nullptr, Node** stopNode = nullptr, float delta = 1.0f); | 277 // should stop chaining. On output, if provided and a node was |
| 278 // scrolled, stopNode will point to that node. |
| 279 ScrollResult physicalScroll(ScrollGranularity, const FloatSize& delta, Node*
startNode, Node** stopNode = nullptr); |
| 280 |
| 281 // Performs a chaining logical scroll, within a *single* frame, starting |
| 282 // from either a provided starting node or a default based on the focused or |
| 283 // most recently clicked node. |
| 284 // Returns true if the scroll was consumed. |
| 285 // direction - The logical direction to scroll in. This will be converted to |
| 286 // a physical direction for each LayoutBox we try to scroll |
| 287 // based on that box's writing mode. |
| 288 // granularity - The units that the scroll delta parameter is in. |
| 289 // startNode - Optional. If provided, start chaining from the given node. |
| 290 // If not, use the current focus or last clicked node. |
| 291 bool logicalScroll(ScrollDirection, ScrollGranularity, Node* startNode = nul
lptr); |
| 279 | 292 |
| 280 void resetOverscroll(bool didScrollX, bool didScrollY); | 293 void resetOverscroll(bool didScrollX, bool didScrollY); |
| 281 void handleOverscroll(const ScrollResult&, const FloatPoint& position = Floa
tPoint(), const FloatSize& velocity = FloatSize()); | 294 void handleOverscroll(const ScrollResult&, const FloatPoint& position = Floa
tPoint(), const FloatSize& velocity = FloatSize()); |
| 282 | 295 |
| 283 void customizedScroll(const Node& startNode, ScrollState&); | 296 void customizedScroll(const Node& startNode, ScrollState&); |
| 284 | 297 |
| 285 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); | 298 HitTestResult hitTestResultInFrame(LocalFrame*, const LayoutPoint&, HitTestR
equest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitTestRequest::
Active); |
| 286 | 299 |
| 287 void invalidateClick(); | 300 void invalidateClick(); |
| 288 | 301 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 // scroll which shouldn't propagate can't cause any element to | 468 // scroll which shouldn't propagate can't cause any element to |
| 456 // scroll other than the |m_previousGestureScrolledNode|. | 469 // scroll other than the |m_previousGestureScrolledNode|. |
| 457 bool m_deltaConsumedForScrollSequence; | 470 bool m_deltaConsumedForScrollSequence; |
| 458 }; | 471 }; |
| 459 | 472 |
| 460 } // namespace blink | 473 } // namespace blink |
| 461 | 474 |
| 462 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); | 475 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); |
| 463 | 476 |
| 464 #endif // EventHandler_h | 477 #endif // EventHandler_h |
| OLD | NEW |