commit | 5d82cdb72907c18352dc0de170565ee6dc38db15 | [log] [tgz] |
---|---|---|
author | abarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Fri Apr 13 07:53:46 2012 +0000 |
committer | abarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Fri Apr 13 07:53:46 2012 +0000 |
tree | 1add0a58e24de56e126bec51681b49f9ac70a732 | |
parent | ae8dbf702f59cfd2c7fa23280bb08b606d7fecd3 [diff] [blame] |
Prepare submitForm for seamless navigation https://bugs.webkit.org/show_bug.cgi?id=83838 Reviewed by Ryosuke Niwa. Previously, FrameLoader::submitForm called FrameTree::find and Document::canNavigate separately. This patch refactors this function to call findFrameForNavigation, which does both checks. This doesn't change any behavior today, but it prepares us to implement seamless navigation. Once the seamless branch lands, this change will be tested by seamless-form-* in https://github.com/eseidel/webkit/tree/seamless/LayoutTests/fast/frames/seamless For context, see: https://github.com/eseidel/webkit/commit/3f27340577ac91b2cc0a834dd2c6fdfcac296c32 * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp index 57bef6a..1de8374 100644 --- a/Source/WebCore/loader/FrameLoader.cpp +++ b/Source/WebCore/loader/FrameLoader.cpp
@@ -310,9 +310,7 @@ return; } - Frame* targetFrame = m_frame->tree()->find(submission->target()); - if (!submission->state()->sourceDocument()->canNavigate(targetFrame)) - return; + Frame* targetFrame = findFrameForNavigation(submission->target(), submission->state()->sourceDocument()); if (!targetFrame) { if (!DOMWindow::allowPopUp(m_frame) && !ScriptController::processingUserGesture()) return;