summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe_impl.cc
diff options
context:
space:
mode:
authorplaymobil@google.com <playmobil@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 17:19:46 +0000
committerplaymobil@google.com <playmobil@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 17:19:46 +0000
commitcc05922d0dc4b73b013bbfe2cae53555cb5629f4 (patch)
treed79958979010b7490525dffd6603a09e3d339002 /webkit/glue/webframe_impl.cc
parent519cba1ec680a7eae764727aaaa7edca181b7d56 (diff)
downloadchromium_src-cc05922d0dc4b73b013bbfe2cae53555cb5629f4.zip
chromium_src-cc05922d0dc4b73b013bbfe2cae53555cb5629f4.tar.gz
chromium_src-cc05922d0dc4b73b013bbfe2cae53555cb5629f4.tar.bz2
Update our webframe_impl to use loadURLIntoChildFrame().
Review URL: http://codereview.chromium.org/57061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12867 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe_impl.cc')
-rw-r--r--webkit/glue/webframe_impl.cc35
1 files changed, 4 insertions, 31 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 532b91b..099d92c 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -1785,37 +1785,10 @@ PassRefPtr<Frame> WebFrameImpl::CreateChildFrame(
if (!child_frame->tree()->parent())
return NULL;
- // The following code was pulled from WebFrame.mm:_loadURL, with minor
- // modifications. The purpose is to ensure we load the right HistoryItem for
- // this child frame.
- HistoryItem* parent_item = frame_->loader()->currentHistoryItem();
- FrameLoadType load_type = frame_->loader()->loadType();
- FrameLoadType child_load_type =
- WebCore::FrameLoadTypeRedirectWithLockedBackForwardList;
- KURL new_url = request.resourceRequest().url();
-
- // If we're moving in the backforward list, we might want to replace the
- // content of this child frame with whatever was there at that point.
- if (parent_item && parent_item->children().size() != 0 &&
- isBackForwardLoadType(load_type)) {
- HistoryItem* child_item =
- parent_item->childItemWithName(request.frameName());
- if (child_item) {
- // Use the original URL to ensure we get all the side-effects, such as
- // onLoad handlers, of any redirects that happened. An example of where
- // this is needed is Radar 3213556.
- new_url = child_item->originalURL();
- child_load_type = load_type;
- child_frame->loader()->setProvisionalHistoryItem(child_item);
- }
- }
-
- child_frame->loader()->loadURL(new_url,
- request.resourceRequest().httpReferrer(),
- child_frame->tree()->name(),
- false,
- child_load_type, 0, 0);
-
+ frame_->loader()->loadURLIntoChildFrame(
+ request.resourceRequest().url(),
+ request.resourceRequest().httpReferrer(),
+ child_frame.get());
// A synchronous navigation (about:blank) would have already processed
// onload, so it is possible for the frame to have already been destroyed by
// script in the page.