| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 return; | 388 return; |
| 389 if (document().isSandboxed(SandboxForms)) { | 389 if (document().isSandboxed(SandboxForms)) { |
| 390 // FIXME: This message should be moved off the console once a solution t
o https://bugs.webkit.org/show_bug.cgi?id=103274 exists. | 390 // FIXME: This message should be moved off the console once a solution t
o https://bugs.webkit.org/show_bug.cgi?id=103274 exists. |
| 391 document().addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "
Blocked form submission to '" + submission->action().elidedString() + "' because
the form's frame is sandboxed and the 'allow-forms' permission is not set."); | 391 document().addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "
Blocked form submission to '" + submission->action().elidedString() + "' because
the form's frame is sandboxed and the 'allow-forms' permission is not set."); |
| 392 return; | 392 return; |
| 393 } | 393 } |
| 394 | 394 |
| 395 if (protocolIsJavaScript(submission->action())) { | 395 if (protocolIsJavaScript(submission->action())) { |
| 396 if (!document().contentSecurityPolicy()->allowFormAction(KURL(submission
->action()))) | 396 if (!document().contentSecurityPolicy()->allowFormAction(KURL(submission
->action()))) |
| 397 return; | 397 return; |
| 398 document().frame()->script()->executeScriptIfJavaScriptURL(submission->a
ction()); | 398 document().frame()->script().executeScriptIfJavaScriptURL(submission->ac
tion()); |
| 399 return; | 399 return; |
| 400 } | 400 } |
| 401 submission->setReferrer(document().frame()->loader()->outgoingReferrer()); | 401 submission->setReferrer(document().frame()->loader()->outgoingReferrer()); |
| 402 submission->setOrigin(document().frame()->loader()->outgoingOrigin()); | 402 submission->setOrigin(document().frame()->loader()->outgoingOrigin()); |
| 403 | 403 |
| 404 document().frame()->navigationScheduler()->scheduleFormSubmission(submission
); | 404 document().frame()->navigationScheduler()->scheduleFormSubmission(submission
); |
| 405 } | 405 } |
| 406 | 406 |
| 407 void HTMLFormElement::reset() | 407 void HTMLFormElement::reset() |
| 408 { | 408 { |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 } | 806 } |
| 807 | 807 |
| 808 void HTMLFormElement::setDemoted(bool demoted) | 808 void HTMLFormElement::setDemoted(bool demoted) |
| 809 { | 809 { |
| 810 if (demoted) | 810 if (demoted) |
| 811 UseCounter::count(document(), UseCounter::DemotedFormElement); | 811 UseCounter::count(document(), UseCounter::DemotedFormElement); |
| 812 m_wasDemoted = demoted; | 812 m_wasDemoted = demoted; |
| 813 } | 813 } |
| 814 | 814 |
| 815 } // namespace | 815 } // namespace |
| OLD | NEW |