From 18ee330a34ba369faa54d13e508da88998a702f7 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Tue, 26 Jan 2010 18:02:54 +0000 Subject: Remove dead code attached to the Touch object. This is no longer called, and keeping a ref to a child frame can cause a crash during GC if the event is the last ref and causes the Frame to be destructed. Change-Id: Ic41adfa3e8b4a901887c87b8196360947ef9692c --- WebCore/dom/Touch.cpp | 17 +++-------------- WebCore/dom/Touch.h | 4 ---- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/WebCore/dom/Touch.cpp b/WebCore/dom/Touch.cpp index 41d5c19..4ea83da 100644 --- a/WebCore/dom/Touch.cpp +++ b/WebCore/dom/Touch.cpp @@ -55,11 +55,10 @@ static int contentsY(Frame* frame) Touch::Touch(Frame* frame, EventTarget* target, unsigned identifier, int screenX, int screenY, int pageX, int pageY) - : m_frame(frame) - , m_target(target) + : m_target(target) , m_identifier(identifier) - , m_clientX(pageX - contentsX(m_frame.get())) - , m_clientY(pageY - contentsY(m_frame.get())) + , m_clientX(pageX - contentsX(frame)) + , m_clientY(pageY - contentsY(frame)) , m_screenX(screenX) , m_screenY(screenY) , m_pageX(pageX) @@ -67,16 +66,6 @@ Touch::Touch(Frame* frame, EventTarget* target, unsigned identifier, { } -void Touch::updateLocation(int screenX, int screenY, int pageX, int pageY) -{ - m_clientX = pageX - contentsX(m_frame.get()); - m_clientY = pageY - contentsY(m_frame.get()); - m_screenX = screenX; - m_screenY = screenY; - m_pageX = pageX; - m_pageY = pageY; -} - } // namespace WebCore #endif diff --git a/WebCore/dom/Touch.h b/WebCore/dom/Touch.h index cf39faf..ceb8ae7 100644 --- a/WebCore/dom/Touch.h +++ b/WebCore/dom/Touch.h @@ -45,9 +45,6 @@ public: screenY, pageX, pageY)); } - void updateLocation(int screenX, int screenY, int pageX, int pageY); - - Frame* frame() const { return m_frame.get(); } EventTarget* target() const { return m_target.get(); } unsigned identifier() const { return m_identifier; } int clientX() const { return m_clientX; } @@ -61,7 +58,6 @@ private: Touch(Frame* frame, EventTarget* target, unsigned identifier, int screenX, int screenY, int pageX, int pageY); - RefPtr m_frame; RefPtr m_target; unsigned m_identifier; int m_clientX; -- cgit v1.1