| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 328 |
| 329 void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool proce
ssingUserGesture, FormSubmissionTrigger formSubmissionTrigger) | 329 void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool proce
ssingUserGesture, FormSubmissionTrigger formSubmissionTrigger) |
| 330 { | 330 { |
| 331 FrameView* view = document().view(); | 331 FrameView* view = document().view(); |
| 332 LocalFrame* frame = document().frame(); | 332 LocalFrame* frame = document().frame(); |
| 333 if (!view || !frame || !frame->page()) | 333 if (!view || !frame || !frame->page()) |
| 334 return; | 334 return; |
| 335 | 335 |
| 336 m_wasUserSubmitted = processingUserGesture; | 336 m_wasUserSubmitted = processingUserGesture; |
| 337 | 337 |
| 338 RefPtr<HTMLFormControlElement> firstSuccessfulSubmitButton; | 338 RefPtrWillBeRawPtr<HTMLFormControlElement> firstSuccessfulSubmitButton = nul
lptr; |
| 339 bool needButtonActivation = activateSubmitButton; // do we need to activate
a submit button? | 339 bool needButtonActivation = activateSubmitButton; // do we need to activate
a submit button? |
| 340 | 340 |
| 341 const Vector<FormAssociatedElement*>& elements = associatedElements(); | 341 const Vector<FormAssociatedElement*>& elements = associatedElements(); |
| 342 for (unsigned i = 0; i < elements.size(); ++i) { | 342 for (unsigned i = 0; i < elements.size(); ++i) { |
| 343 FormAssociatedElement* associatedElement = elements[i]; | 343 FormAssociatedElement* associatedElement = elements[i]; |
| 344 if (!associatedElement->isFormControlElement()) | 344 if (!associatedElement->isFormControlElement()) |
| 345 continue; | 345 continue; |
| 346 if (needButtonActivation) { | 346 if (needButtonActivation) { |
| 347 HTMLFormControlElement* control = toHTMLFormControlElement(associate
dElement); | 347 HTMLFormControlElement* control = toHTMLFormControlElement(associate
dElement); |
| 348 if (control->isActivatedSubmit()) | 348 if (control->isActivatedSubmit()) |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 } | 770 } |
| 771 | 771 |
| 772 void HTMLFormElement::setDemoted(bool demoted) | 772 void HTMLFormElement::setDemoted(bool demoted) |
| 773 { | 773 { |
| 774 if (demoted) | 774 if (demoted) |
| 775 UseCounter::count(document(), UseCounter::DemotedFormElement); | 775 UseCounter::count(document(), UseCounter::DemotedFormElement); |
| 776 m_wasDemoted = demoted; | 776 m_wasDemoted = demoted; |
| 777 } | 777 } |
| 778 | 778 |
| 779 } // namespace | 779 } // namespace |
| OLD | NEW |