Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(839)

Unified Diff: Source/core/html/HTMLFormElement.cpp

Issue 799923006: Make canNavigate() OOPI-friendly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Null-check in History.cpp Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/RemoteFrame.h ('k') | Source/core/html/HTMLFrameOwnerElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « Source/core/frame/RemoteFrame.h ('k') | Source/core/html/HTMLFrameOwnerElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698