Index: Source/core/html/HTMLFormElement.cpp |
diff --git a/Source/core/html/HTMLFormElement.cpp b/Source/core/html/HTMLFormElement.cpp |
index 7509352a7bfa8aaf4d27d9bbebdc3001b9bc5984..0935718c0b8b28f519781993282fa9186d89d9dc 100644 |
--- a/Source/core/html/HTMLFormElement.cpp |
+++ b/Source/core/html/HTMLFormElement.cpp |
@@ -434,7 +434,7 @@ void HTMLFormElement::scheduleFormSubmission(PassRefPtrWillBeRawPtr<FormSubmissi |
return; |
} |
- LocalFrame* targetFrame = document().frame()->loader().findFrameForNavigation(submission->target(), submission->state()->sourceDocument()); |
+ Frame* targetFrame = document().frame()->findFrameForNavigation(submission->target(), *submission->state()->sourceDocument()->frame()); |
if (!targetFrame) { |
if (!LocalDOMWindow::allowPopUp(*document().frame()) && !UserGestureIndicator::processingUserGesture()) |
return; |
@@ -442,7 +442,7 @@ void HTMLFormElement::scheduleFormSubmission(PassRefPtrWillBeRawPtr<FormSubmissi |
} else { |
submission->clearTarget(); |
} |
- if (!targetFrame->page()) |
+ if (!targetFrame->host()) |
return; |
if (MixedContentChecker::isMixedContent(document().securityOrigin(), submission->action())) { |
@@ -453,7 +453,9 @@ void HTMLFormElement::scheduleFormSubmission(PassRefPtrWillBeRawPtr<FormSubmissi |
UseCounter::count(document(), UseCounter::FormsSubmitted); |
} |
- targetFrame->navigationScheduler().scheduleFormSubmission(submission); |
+ // FIXME: Plumb form submission for remote frames. |
+ if (targetFrame->isLocalFrame()) |
+ toLocalFrame(targetFrame)->navigationScheduler().scheduleFormSubmission(submission); |
} |
void HTMLFormElement::reset() |