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

Unified Diff: Source/core/input/EventHandler.h

Issue 1198193005: Fixed memory issues with EventHandler::TouchInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed oilpan build, removed LocalFrame raw ptr. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/input/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/input/EventHandler.h
diff --git a/Source/core/input/EventHandler.h b/Source/core/input/EventHandler.h
index 5a131309cfaf097de2b1e70ea11a8e3b9d0d60a2..c9297d30df6fe3eef8a5d6ca1f41447853af3e85 100644
--- a/Source/core/input/EventHandler.h
+++ b/Source/core/input/EventHandler.h
@@ -201,6 +201,24 @@ public:
SelectionController& selectionController() const { return *m_selectionController; }
+ class TouchInfo {
+ ALLOW_ONLY_INLINE_ALLOCATION();
+ public:
+ DEFINE_INLINE_TRACE()
+ {
+ visitor->trace(touchTarget);
+ visitor->trace(targetFrame);
+ }
+
+ PlatformTouchPoint point;
+ RefPtrWillBeMember<EventTarget> touchTarget;
+ RefPtrWillBeMember<LocalFrame> targetFrame;
+ FloatPoint adjustedPagePoint;
+ FloatSize adjustedRadius;
+ bool knownTarget;
+ bool consumed;
+ };
+
private:
static DragState& dragState();
@@ -318,18 +336,8 @@ private:
// the given element.
bool slideFocusOnShadowHostIfNecessary(const Element&);
- using TouchInfo = struct {
- PlatformTouchPoint point;
- EventTarget* touchTarget;
- LocalFrame* targetFrame;
- FloatPoint adjustedPagePoint;
- FloatSize adjustedRadius;
- bool knownTarget;
- bool consumed;
- };
-
- void dispatchPointerEventsForTouchEvent(const PlatformTouchEvent&, Vector<TouchInfo>&);
- bool dispatchTouchEvents(const PlatformTouchEvent&, Vector<TouchInfo>&, bool, bool);
+ void dispatchPointerEventsForTouchEvent(const PlatformTouchEvent&, WillBeHeapVector<TouchInfo>&);
+ bool dispatchTouchEvents(const PlatformTouchEvent&, WillBeHeapVector<TouchInfo>&, bool, bool);
// NOTE: If adding a new field to this class please ensure that it is
// cleared in |EventHandler::clear()|.
@@ -434,4 +442,6 @@ private:
} // namespace blink
+WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo);
+
#endif // EventHandler_h
« no previous file with comments | « no previous file | Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698