Title: [88242] trunk/Source/WebCore
- Revision
- 88242
- Author
- [email protected]
- Date
- 2011-06-07 09:20:07 -0700 (Tue, 07 Jun 2011)
Log Message
2011-06-07 Dinu Jacob <[email protected]>
Reviewed by Dimitri Glazkov.
Inform ChromeClient touch events are not needed by the webpage when navigating away from the page instead of in both Document:detach/CachedFrame
https://bugs.webkit.org/show_bug.cgi?id=61543
Inform chrome client that touch events are not needed by the webpage
when navigating away from the page only once to avoid the flag being
overwritten later if a page is removed from the page cache
* dom/Document.cpp:
(WebCore::Document::detach):
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::transitionToCommitted):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (88241 => 88242)
--- trunk/Source/WebCore/ChangeLog 2011-06-07 15:54:25 UTC (rev 88241)
+++ trunk/Source/WebCore/ChangeLog 2011-06-07 16:20:07 UTC (rev 88242)
@@ -1,3 +1,21 @@
+2011-06-07 Dinu Jacob <[email protected]>
+
+ Reviewed by Dimitri Glazkov.
+
+ Inform ChromeClient touch events are not needed by the webpage when navigating away from the page instead of in both Document:detach/CachedFrame
+ https://bugs.webkit.org/show_bug.cgi?id=61543
+
+ Inform chrome client that touch events are not needed by the webpage
+ when navigating away from the page only once to avoid the flag being
+ overwritten later if a page is removed from the page cache
+
+ * dom/Document.cpp:
+ (WebCore::Document::detach):
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrame::CachedFrame):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::transitionToCommitted):
+
2011-06-07 Alexander Pavlov <[email protected]>
Reviewed by Yury Semikhatsky.
Modified: trunk/Source/WebCore/dom/Document.cpp (88241 => 88242)
--- trunk/Source/WebCore/dom/Document.cpp 2011-06-07 15:54:25 UTC (rev 88241)
+++ trunk/Source/WebCore/dom/Document.cpp 2011-06-07 16:20:07 UTC (rev 88242)
@@ -1796,16 +1796,6 @@
if (view)
view->detachCustomScrollbars();
-#if ENABLE(TOUCH_EVENTS)
- Page* ownerPage = page();
- if (ownerPage && (m_frame == ownerPage->mainFrame())) {
- // Inform the Chrome Client that it no longer needs to
- // foward touch events to WebCore as the document is being
- // destroyed. It may start again if a subsequent page
- // registers a touch event listener.
- ownerPage->chrome()->client()->needTouchEvents(false);
- }
-#endif
}
// indicate destruction mode, i.e. attached() but renderer == 0
Modified: trunk/Source/WebCore/history/CachedFrame.cpp (88241 => 88242)
--- trunk/Source/WebCore/history/CachedFrame.cpp 2011-06-07 15:54:25 UTC (rev 88241)
+++ trunk/Source/WebCore/history/CachedFrame.cpp 2011-06-07 16:20:07 UTC (rev 88242)
@@ -183,10 +183,6 @@
LOG(PageCache, "Finished creating CachedFrame for child frame with url '%s' and DocumentLoader %p\n", m_url.string().utf8().data(), m_documentLoader.get());
#endif
-#if ENABLE(TOUCH_EVENTS)
- if (m_document->hasListenerType(Document::TOUCH_LISTENER))
- m_document->page()->chrome()->client()->needTouchEvents(false);
-#endif
}
void CachedFrame::open()
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (88241 => 88242)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2011-06-07 15:54:25 UTC (rev 88241)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2011-06-07 16:20:07 UTC (rev 88242)
@@ -41,6 +41,9 @@
#include "CachedPage.h"
#include "CachedResourceLoader.h"
#include "Chrome.h"
+#if ENABLE(TOUCH_EVENTS)
+#include "ChromeClient.h"
+#endif
#include "Console.h"
#include "ContentSecurityPolicy.h"
#include "DOMImplementation.h"
@@ -2067,6 +2070,11 @@
setProvisionalDocumentLoader(0);
setState(FrameStateCommittedPage);
+#if ENABLE(TOUCH_EVENTS)
+ if (isLoadingMainFrame())
+ m_frame->page()->chrome()->client()->needTouchEvents(false);
+#endif
+
// Handle adding the URL to the back/forward list.
DocumentLoader* dl = m_documentLoader.get();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes