| Index: Source/core/html/HTMLFormElement.cpp
 | 
| diff --git a/Source/core/html/HTMLFormElement.cpp b/Source/core/html/HTMLFormElement.cpp
 | 
| index 806610fefecc0bc07bca1908c800eaff85e547df..5f8a991471986593e230072064bc33d3bf3017d2 100644
 | 
| --- a/Source/core/html/HTMLFormElement.cpp
 | 
| +++ b/Source/core/html/HTMLFormElement.cpp
 | 
| @@ -66,7 +66,6 @@ HTMLFormElement::HTMLFormElement(Document& document)
 | 
|      , m_hasElementsAssociatedByParser(false)
 | 
|      , m_didFinishParsingChildren(false)
 | 
|      , m_wasUserSubmitted(false)
 | 
| -    , m_isSubmittingOrPreparingForSubmission(false)
 | 
|      , m_shouldSubmit(false)
 | 
|      , m_isInResetFunction(false)
 | 
|      , m_wasDemoted(false)
 | 
| @@ -283,23 +282,17 @@ bool HTMLFormElement::prepareForSubmission(Event* event)
 | 
|  {
 | 
|      RefPtr<HTMLFormElement> protector(this);
 | 
|      LocalFrame* frame = document().frame();
 | 
| -    if (m_isSubmittingOrPreparingForSubmission || !frame)
 | 
| -        return m_isSubmittingOrPreparingForSubmission;
 | 
| +    if (!frame)
 | 
| +        return false;
 | 
|  
 | 
| -    m_isSubmittingOrPreparingForSubmission = true;
 | 
|      m_shouldSubmit = false;
 | 
|  
 | 
|      // Interactive validation must be done before dispatching the submit event.
 | 
| -    if (!validateInteractively(event)) {
 | 
| -        m_isSubmittingOrPreparingForSubmission = false;
 | 
| +    if (!validateInteractively(event))
 | 
|          return false;
 | 
| -    }
 | 
|  
 | 
|      frame->loader().client()->dispatchWillSendSubmitEvent(this);
 | 
|  
 | 
| -    // Set flag before submission as dispatchEvent could trigger another event
 | 
| -    m_isSubmittingOrPreparingForSubmission = false;
 | 
| -
 | 
|      if (dispatchEvent(Event::createCancelableBubble(EventTypeNames::submit)))
 | 
|          m_shouldSubmit = true;
 | 
|  
 | 
| @@ -336,12 +329,6 @@ void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool proce
 | 
|      if (!view || !frame || !frame->page())
 | 
|          return;
 | 
|  
 | 
| -    if (m_isSubmittingOrPreparingForSubmission) {
 | 
| -        m_shouldSubmit = true;
 | 
| -        return;
 | 
| -    }
 | 
| -
 | 
| -    m_isSubmittingOrPreparingForSubmission = true;
 | 
|      m_wasUserSubmitted = processingUserGesture;
 | 
|  
 | 
|      RefPtr<HTMLFormControlElement> firstSuccessfulSubmitButton;
 | 
| @@ -375,7 +362,6 @@ void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool proce
 | 
|          firstSuccessfulSubmitButton->setActivatedSubmit(false);
 | 
|  
 | 
|      m_shouldSubmit = false;
 | 
| -    m_isSubmittingOrPreparingForSubmission = false;
 | 
|  }
 | 
|  
 | 
|  void HTMLFormElement::scheduleFormSubmission(PassRefPtr<FormSubmission> submission)
 | 
| 
 |