summaryrefslogtreecommitdiffstats
path: root/WebCore/page
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-07-06 11:37:41 +0100
committerKristian Monsen <kristianm@google.com>2010-07-15 12:55:05 +0100
commitff80790be406da04e7afbd8aea7bb0e26f1f08f0 (patch)
treebdcd94ef63cabf0e13e193a531b089c20bc2b177 /WebCore/page
parent31dbf1e39c75fa71a6175b95ce2172727630129b (diff)
downloadexternal_webkit-ff80790be406da04e7afbd8aea7bb0e26f1f08f0.zip
external_webkit-ff80790be406da04e7afbd8aea7bb0e26f1f08f0.tar.gz
external_webkit-ff80790be406da04e7afbd8aea7bb0e26f1f08f0.tar.bz2
Fix for bug 2816268: Refactor ANDROID_USER_GESTURE code
Used the UserGestureIndicator class instead of the local ANDROID_USER_GESTURE code. I have made a simple test case for the problem at: http://updates.monsen.it/source.html This cannot be made into a layout test since the Android Dumprendertree does not support focus on windows other than the main one. Lots of local changes removed, but not many actual changes. Most are in parameters sent to other functions. As far as I can see they user gestures are only checked for in ChromeClientAndroid.cpp and WebCoreFrameBridge.cpp, and I replaced ANDROID_USER_GESTURE with UserGestureIndicator::processingUserGesture(). The UserGestureIndicator class was added to webkit in this CL: http://trac.webkit.org/changeset/57045 ResourceRequest.h is a cherry-pick of this CL from webkit.org http://trac.webkit.org/changeset/62668 Change-Id: Ia254b2cee833459fcc2cacfb2751ef7a29a8f64a
Diffstat (limited to 'WebCore/page')
-rw-r--r--WebCore/page/Chrome.cpp7
-rw-r--r--WebCore/page/Chrome.h4
-rw-r--r--WebCore/page/ChromeClient.h4
-rw-r--r--WebCore/page/DOMWindow.cpp4
4 files changed, 0 insertions, 19 deletions
diff --git a/WebCore/page/Chrome.cpp b/WebCore/page/Chrome.cpp
index 799aaee..0124211 100644
--- a/WebCore/page/Chrome.cpp
+++ b/WebCore/page/Chrome.cpp
@@ -138,17 +138,10 @@ float Chrome::scaleFactor()
return m_client->scaleFactor();
}
-#ifdef ANDROID_USER_GESTURE
-void Chrome::focus(bool userGesture) const
-{
- m_client->focus(userGesture);
-}
-#else
void Chrome::focus() const
{
m_client->focus();
}
-#endif
void Chrome::unfocus() const
{
diff --git a/WebCore/page/Chrome.h b/WebCore/page/Chrome.h
index 3882f5e..88035a5 100644
--- a/WebCore/page/Chrome.h
+++ b/WebCore/page/Chrome.h
@@ -81,11 +81,7 @@ namespace WebCore {
float scaleFactor();
-#ifdef ANDROID_USER_GESTURE
- void focus(bool userGesture) const;
-#else
void focus() const;
-#endif
void unfocus() const;
bool canTakeFocus(FocusDirection) const;
diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h
index 660ec68..64b9f26 100644
--- a/WebCore/page/ChromeClient.h
+++ b/WebCore/page/ChromeClient.h
@@ -79,11 +79,7 @@ namespace WebCore {
virtual float scaleFactor() = 0;
-#ifdef ANDROID_USER_GESTURE
- virtual void focus(bool userGesture) = 0;
-#else
virtual void focus() = 0;
-#endif
virtual void unfocus() = 0;
virtual bool canTakeFocus(FocusDirection) = 0;
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index f050a80..6ecde3c 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -779,11 +779,7 @@ void DOMWindow::focus()
// If we're a top level window, bring the window to the front.
if (m_frame == page->mainFrame())
-#ifdef ANDROID_USER_GESTURE
- page->chrome()->focus(m_frame->loader()->isProcessingUserGesture());
-#else
page->chrome()->focus();
-#endif
if (!m_frame)
return;