2010-12-02  Johnny Ding  <jnd@chromium.org>

        Reviewed by Adam Barth.

        Set the right gesture status for URL redirections.
        https://bugs.webkit.org/show_bug.cgi?id=47817

        * fast/frames/location-redirect-user-gesture-expected.txt: Added.
        * fast/frames/location-redirect-user-gesture.html: Added.
        * fast/frames/meta-refresh-user-gesture-expected.txt: Added.
        * fast/frames/meta-refresh-user-gesture.html: Added.
        * fast/frames/resources/meta-refresh-target.html: Added.
        * platform/gtk/Skipped:
        * platform/win/Skipped:
2010-12-02  Johnny Ding  <jnd@chromium.org>

        Reviewed by Adam Barth.

        Set the right gesture status for URL redirections.
        https://bugs.webkit.org/show_bug.cgi?id=47817

        Tests: fast/frames/location-redirect-user-gesture.html
               fast/frames/meta-refresh-user-gesture.html

        * loader/NavigationScheduler.cpp:
        (WebCore::ScheduledNavigation::clearUserGesture):
        (WebCore::ScheduledRedirect::ScheduledRedirect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/loader/NavigationScheduler.cpp b/WebCore/loader/NavigationScheduler.cpp
index 28fda9a..7c691ae 100644
--- a/WebCore/loader/NavigationScheduler.cpp
+++ b/WebCore/loader/NavigationScheduler.cpp
@@ -77,6 +77,9 @@
     bool isLocationChange() const { return m_isLocationChange; }
     bool wasUserGesture() const { return m_wasUserGesture; }
 
+protected:
+    void clearUserGesture() { m_wasUserGesture = false; }
+
 private:
     double m_delay;
     bool m_lockHistory;
@@ -131,6 +134,7 @@
     ScheduledRedirect(double delay, const String& url, bool lockHistory, bool lockBackForwardList)
         : ScheduledURLNavigation(delay, url, String(), lockHistory, lockBackForwardList, false, false)
     {
+        clearUserGesture();
     }
 
     virtual bool shouldStartTimer(Frame* frame) { return frame->loader()->allAncestorsAreComplete(); }