diff options
author | Grace Kloba <klobag@google.com> | 2009-09-25 11:42:53 -0700 |
---|---|---|
committer | Grace Kloba <klobag@google.com> | 2009-09-25 12:04:04 -0700 |
commit | 9abf45709677b84106fec0215d84b4a65562cff3 (patch) | |
tree | 2a4d9a31b2c018ffc888cf963e7c5c61ee44cfbb | |
parent | 6f855d88ef8d1b401944d290772a26222b61a505 (diff) | |
download | external_webkit-9abf45709677b84106fec0215d84b4a65562cff3.zip external_webkit-9abf45709677b84106fec0215d84b4a65562cff3.tar.gz external_webkit-9abf45709677b84106fec0215d84b4a65562cff3.tar.bz2 |
When detach the top Document, clean up the touch listeners and reset
needTouchEvents.
Fix http://b/issue?id=2145333
-rw-r--r-- | WebCore/dom/Document.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp index e86cbc0..e4c5741 100644 --- a/WebCore/dom/Document.cpp +++ b/WebCore/dom/Document.cpp @@ -1394,6 +1394,17 @@ void Document::detach() FrameView* view = m_frame->view(); if (view) view->detachCustomScrollbars(); + +#if ENABLE(TOUCH_EVENTS) // Android + // clean up for the top document + if (!m_frame->ownerElement()) { + m_touchEventListeners.clear(); +#if PLATFORM(ANDROID) + if (view) + android::WebViewCore::getWebViewCore(view)->needTouchEvents(false); +#endif + } +#endif } // indicate destruction mode, i.e. attached() but renderer == 0 |