| 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 } | 434 } |
| 435 | 435 |
| 436 Frame* targetFrame = document().frame()->findFrameForNavigation(submission->
target(), *submission->state()->sourceDocument()->frame()); | 436 Frame* targetFrame = document().frame()->findFrameForNavigation(submission->
target(), *submission->state()->sourceDocument()->frame()); |
| 437 if (!targetFrame) { | 437 if (!targetFrame) { |
| 438 if (!LocalDOMWindow::allowPopUp(*document().frame()) && !UserGestureIndi
cator::processingUserGesture()) | 438 if (!LocalDOMWindow::allowPopUp(*document().frame()) && !UserGestureIndi
cator::processingUserGesture()) |
| 439 return; | 439 return; |
| 440 targetFrame = document().frame(); | 440 targetFrame = document().frame(); |
| 441 } else { | 441 } else { |
| 442 submission->clearTarget(); | 442 submission->clearTarget(); |
| 443 } | 443 } |
| 444 if (!submission->state()->sourceDocument()->frame()->canNavigate(*targetFram
e)) |
| 445 return; |
| 444 if (!targetFrame->host()) | 446 if (!targetFrame->host()) |
| 445 return; | 447 return; |
| 446 | 448 |
| 447 UseCounter::count(document(), UseCounter::FormsSubmitted); | 449 UseCounter::count(document(), UseCounter::FormsSubmitted); |
| 448 if (MixedContentChecker::isMixedFormAction(document().frame(), submission->a
ction())) | 450 if (MixedContentChecker::isMixedFormAction(document().frame(), submission->a
ction())) |
| 449 UseCounter::count(document().frame(), UseCounter::MixedContentFormsSubmi
tted); | 451 UseCounter::count(document().frame(), UseCounter::MixedContentFormsSubmi
tted); |
| 450 | 452 |
| 451 // FIXME: Plumb form submission for remote frames. | 453 // FIXME: Plumb form submission for remote frames. |
| 452 if (targetFrame->isLocalFrame()) | 454 if (targetFrame->isLocalFrame()) |
| 453 toLocalFrame(targetFrame)->navigationScheduler().scheduleFormSubmission(
submission); | 455 toLocalFrame(targetFrame)->navigationScheduler().scheduleFormSubmission(
submission); |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 } | 850 } |
| 849 | 851 |
| 850 void HTMLFormElement::setDemoted(bool demoted) | 852 void HTMLFormElement::setDemoted(bool demoted) |
| 851 { | 853 { |
| 852 if (demoted) | 854 if (demoted) |
| 853 UseCounter::count(document(), UseCounter::DemotedFormElement); | 855 UseCounter::count(document(), UseCounter::DemotedFormElement); |
| 854 m_wasDemoted = demoted; | 856 m_wasDemoted = demoted; |
| 855 } | 857 } |
| 856 | 858 |
| 857 } // namespace | 859 } // namespace |
| OLD | NEW |