[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 12:59:06 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 572a9b6ef3ae7a1272aacd9bac7c4076972b80dc
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 3 18:21:29 2010 +0000

    2010-09-03  Johnny Ding  <jnd at chromium.org>
    
            Reviewed by Adam Barth.
    
            Save the gesture state to track the user gesture state across async form submission.
            https://bugs.webkit.org/show_bug.cgi?id=44969
    
            fast/events/popup-blocked-to-post-blank.html can cover the test in WebKit.
            A UI test will be added in chromium to address chromium's bug.
    
            * loader/RedirectScheduler.cpp:
            (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
            (WebCore::ScheduledFormSubmission::fire):
            (WebCore::RedirectScheduler::scheduleFormSubmission):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66742 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 03504c0..14b7dcc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-03  Johnny Ding  <jnd at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Save the gesture state to track the user gesture state across async form submission.
+        https://bugs.webkit.org/show_bug.cgi?id=44969
+
+        fast/events/popup-blocked-to-post-blank.html can cover the test in WebKit.
+        A UI test will be added in chromium to address chromium's bug.
+
+        * loader/RedirectScheduler.cpp:
+        (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
+        (WebCore::ScheduledFormSubmission::fire):
+        (WebCore::RedirectScheduler::scheduleFormSubmission):
+
 2010-09-03  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Anders Carlsson.
diff --git a/WebCore/loader/RedirectScheduler.cpp b/WebCore/loader/RedirectScheduler.cpp
index 461baf7..7cb6090 100644
--- a/WebCore/loader/RedirectScheduler.cpp
+++ b/WebCore/loader/RedirectScheduler.cpp
@@ -172,16 +172,19 @@ private:
 
 class ScheduledFormSubmission : public ScheduledNavigation {
 public:
-    ScheduledFormSubmission(PassRefPtr<FormSubmission> submission, bool lockBackForwardList, bool duringLoad)
+    ScheduledFormSubmission(PassRefPtr<FormSubmission> submission, bool lockBackForwardList, bool duringLoad, bool wasUserGesture)
         : ScheduledNavigation(0, submission->lockHistory(), lockBackForwardList, duringLoad, true)
         , m_submission(submission)
         , m_haveToldClient(false)
+        , m_wasUserGesture(wasUserGesture)
     {
         ASSERT(m_submission->state());
     }
 
     virtual void fire(Frame* frame)
     {
+        UserGestureIndicator gestureIndicator(m_wasUserGesture ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
+
         // The submitForm function will find a target frame before using the redirection timer.
         // Now that the timer has fired, we need to repeat the security check which normally is done when
         // selecting a target, in case conditions have changed. Other code paths avoid this by targeting
@@ -211,6 +214,7 @@ public:
 private:
     RefPtr<FormSubmission> m_submission;
     bool m_haveToldClient;
+    bool m_wasUserGesture;
 };
 
 RedirectScheduler::RedirectScheduler(Frame* frame)
@@ -311,10 +315,10 @@ void RedirectScheduler::scheduleFormSubmission(PassRefPtr<FormSubmission> submis
     // If this is a child frame and the form submission was triggered by a script, lock the back/forward list
     // to match IE and Opera.
     // See https://bugs.webkit.org/show_bug.cgi?id=32383 for the original motivation for this.
+    bool isUserGesture = m_frame->loader()->isProcessingUserGesture();
+    bool lockBackForwardList = mustLockBackForwardList(m_frame, isUserGesture) || (submission->state()->formSubmissionTrigger() == SubmittedByJavaScript && m_frame->tree()->parent());
 
-    bool lockBackForwardList = mustLockBackForwardList(m_frame, UserGestureIndicator::processingUserGesture()) || (submission->state()->formSubmissionTrigger() == SubmittedByJavaScript && m_frame->tree()->parent());
-
-    schedule(adoptPtr(new ScheduledFormSubmission(submission, lockBackForwardList, duringLoad)));
+    schedule(adoptPtr(new ScheduledFormSubmission(submission, lockBackForwardList, duringLoad, isUserGesture)));
 }
 
 void RedirectScheduler::scheduleRefresh(bool wasUserGesture)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list