Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.h

Issue 1800143002: Notify Blink about start of gesture scroll through a queued event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a few checks. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 void setLastKnownMousePosition(const PlatformMouseEvent&); 372 void setLastKnownMousePosition(const PlatformMouseEvent&);
373 373
374 bool shouldTopControlsConsumeScroll(FloatSize) const; 374 bool shouldTopControlsConsumeScroll(FloatSize) const;
375 375
376 // If the given element is a shadow host and its root has delegatesFocus=fal se flag, 376 // If the given element is a shadow host and its root has delegatesFocus=fal se flag,
377 // slide focus to its inner element. Returns true if the resulting focus is different from 377 // slide focus to its inner element. Returns true if the resulting focus is different from
378 // the given element. 378 // the given element.
379 bool slideFocusOnShadowHostIfNecessary(const Element&); 379 bool slideFocusOnShadowHostIfNecessary(const Element&);
380 380
381 void dispatchPointerEvents(const PlatformTouchEvent&, HeapVector<TouchInfo>& ); 381 void dispatchPointerEvents(const PlatformTouchEvent&, HeapVector<TouchInfo>& );
382 void sendPointerCancels(HeapVector<TouchInfo>&);
383 382
384 WebInputEventResult dispatchTouchEvents(const PlatformTouchEvent&, HeapVecto r<TouchInfo>&, bool, bool); 383 WebInputEventResult dispatchTouchEvents(const PlatformTouchEvent&, HeapVecto r<TouchInfo>&, bool, bool);
385 384
386 // NOTE: If adding a new field to this class please ensure that it is 385 // NOTE: If adding a new field to this class please ensure that it is
387 // cleared in |EventHandler::clear()|. 386 // cleared in |EventHandler::clear()|.
388 387
389 const Member<LocalFrame> m_frame; 388 const Member<LocalFrame> m_frame;
390 389
391 // Current button-press state for mouse/mouse-like-stylus. 390 // Current button-press state for mouse/mouse-like-stylus.
392 // TODO(crbug.com/563676): Buggy for chorded buttons. 391 // TODO(crbug.com/563676): Buggy for chorded buttons.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 TouchRegionMap m_regionForTouchID; 450 TouchRegionMap m_regionForTouchID;
452 451
453 // If set, the document of the active touch sequence. Unset if no touch sequ ence active. 452 // If set, the document of the active touch sequence. Unset if no touch sequ ence active.
454 Member<Document> m_touchSequenceDocument; 453 Member<Document> m_touchSequenceDocument;
455 RefPtr<UserGestureToken> m_touchSequenceUserGestureToken; 454 RefPtr<UserGestureToken> m_touchSequenceUserGestureToken;
456 455
457 bool m_touchPressed; 456 bool m_touchPressed;
458 457
459 PointerEventManager m_pointerEventManager; 458 PointerEventManager m_pointerEventManager;
460 459
461 // This is set upon sending a pointercancel for touch, prevents PE dispatche s for touches until
462 // all touch-points become inactive.
463 // TODO(mustaq): Consider a state per pointerType, as in PointerIdManager? E xclude mouse?
464 bool m_inPointerCanceledState;
465
466 Member<Node> m_scrollGestureHandlingNode; 460 Member<Node> m_scrollGestureHandlingNode;
467 bool m_lastGestureScrollOverWidget; 461 bool m_lastGestureScrollOverWidget;
468 // The most recent element to scroll natively during this scroll 462 // The most recent element to scroll natively during this scroll
469 // sequence. Null if no native element has scrolled this scroll 463 // sequence. Null if no native element has scrolled this scroll
470 // sequence, or if the most recent element to scroll used scroll 464 // sequence, or if the most recent element to scroll used scroll
471 // customization. 465 // customization.
472 Member<Node> m_previousGestureScrolledNode; 466 Member<Node> m_previousGestureScrolledNode;
473 Member<Scrollbar> m_scrollbarHandlingScrollGesture; 467 Member<Scrollbar> m_scrollbarHandlingScrollGesture;
474 468
475 double m_maxMouseMovedDuration; 469 double m_maxMouseMovedDuration;
(...skipping 12 matching lines...) Expand all
488 // scroll which shouldn't propagate can't cause any element to 482 // scroll which shouldn't propagate can't cause any element to
489 // scroll other than the |m_previousGestureScrolledNode|. 483 // scroll other than the |m_previousGestureScrolledNode|.
490 bool m_deltaConsumedForScrollSequence; 484 bool m_deltaConsumedForScrollSequence;
491 }; 485 };
492 486
493 } // namespace blink 487 } // namespace blink
494 488
495 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); 489 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo);
496 490
497 #endif // EventHandler_h 491 #endif // EventHandler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698