ScheduledFormSubmission(const FrameLoadRequest& frameRequest, bool lockHistory, bool lockBackForwardList, PassRefPtr<Event> event, PassRefPtr<FormState> formState, bool duringLoad) : ScheduledNavigation(0, lockHistory, lockBackForwardList, duringLoad) , m_frameRequest(frameRequest) , m_event(event) , m_formState(formState) , m_wasProcessingUserGesture(UserGestureIndicator::processingUserGesture()) { ASSERT(!frameRequest.isEmpty()); ASSERT(m_formState); }
ScheduledRedirection(const FrameLoadRequest& frameRequest, bool lockHistory, bool lockBackForwardList, PassRefPtr<Event> event, PassRefPtr<FormState> formState, bool duringLoad) : type(formSubmission) , delay(0) , frameRequest(frameRequest) , event(event) , formState(formState) , historySteps(0) , lockHistory(lockHistory) , lockBackForwardList(lockBackForwardList) , wasUserGesture(false) , wasRefresh(false) , wasDuringLoad(duringLoad) , toldClient(false) { ASSERT(!frameRequest.isEmpty()); ASSERT(this->formState); }
void RedirectScheduler::scheduleFormSubmission(const FrameLoadRequest& frameRequest, bool lockHistory, PassRefPtr<Event> event, PassRefPtr<FormState> formState) { ASSERT(m_frame->page()); ASSERT(!frameRequest.isEmpty()); // FIXME: Do we need special handling for form submissions where the URL is the same // as the current one except for the fragment part? See scheduleLocationChange above. // Handle a location change of a page with no document as a special case. // This may happen when a frame changes the location of another frame. bool duringLoad = !m_frame->loader()->committedFirstRealDocumentLoad(); // 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 lockBackForwardList = mustLockBackForwardList(m_frame) || (formState->formSubmissionTrigger() == SubmittedByJavaScript && m_frame->tree()->parent()); schedule(new ScheduledFormSubmission(frameRequest, lockHistory, lockBackForwardList, event, formState, duringLoad)); }