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

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

Issue 2928793003: Re-target wheel events only when a new scroll sequence has started. (Closed)
Patch Set: review comments addressed. Created 3 years, 6 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 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MouseWheelEventManager_h 5 #ifndef MouseWheelEventManager_h
6 #define MouseWheelEventManager_h 6 #define MouseWheelEventManager_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "platform/heap/Visitor.h" 9 #include "platform/heap/Visitor.h"
10 #include "public/platform/WebInputEventResult.h" 10 #include "public/platform/WebInputEventResult.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class Document;
14 class LocalFrame; 15 class LocalFrame;
16 class LocalFrameView;
17 class Node;
15 class ScrollManager; 18 class ScrollManager;
16 class WebMouseWheelEvent; 19 class WebMouseWheelEvent;
17 20
18 class MouseWheelEventManager final 21 class MouseWheelEventManager final
19 : public GarbageCollectedFinalized<MouseWheelEventManager> { 22 : public GarbageCollectedFinalized<MouseWheelEventManager> {
20 WTF_MAKE_NONCOPYABLE(MouseWheelEventManager); 23 WTF_MAKE_NONCOPYABLE(MouseWheelEventManager);
21 24
22 public: 25 public:
23 explicit MouseWheelEventManager(LocalFrame&, ScrollManager&); 26 explicit MouseWheelEventManager(LocalFrame&, ScrollManager&);
24 DECLARE_TRACE(); 27 DECLARE_TRACE();
25 28
29 void Clear();
30
26 WebInputEventResult HandleWheelEvent(const WebMouseWheelEvent&); 31 WebInputEventResult HandleWheelEvent(const WebMouseWheelEvent&);
27 32
28 private: 33 private:
34 Node* FindTargetNode(const WebMouseWheelEvent&,
35 const Document*,
36 const LocalFrameView*);
37
29 const Member<LocalFrame> frame_; 38 const Member<LocalFrame> frame_;
39 Member<Node> wheel_target_;
30 Member<ScrollManager> scroll_manager_; 40 Member<ScrollManager> scroll_manager_;
31 }; 41 };
32 42
33 } // namespace blink 43 } // namespace blink
34 44
35 #endif // MouseWheelEventManager_h 45 #endif // MouseWheelEventManager_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/core/input/MouseWheelEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698