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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1422333009: OOPIF: History navigations for new child frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve comment. Created 5 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
1802 webframeChild->initializeCoreFrame(frame()->host(), ownerElement, name, owne rElement->getAttribute(ownerElement->subResourceAttributeName())); 1802 webframeChild->initializeCoreFrame(frame()->host(), ownerElement, name, owne rElement->getAttribute(ownerElement->subResourceAttributeName()));
1803 // Initializing the core frame may cause the new child to be detached, since 1803 // Initializing the core frame may cause the new child to be detached, since
1804 // it may dispatch a load event in the parent. 1804 // it may dispatch a load event in the parent.
1805 if (!webframeChild->parent()) 1805 if (!webframeChild->parent())
1806 return nullptr; 1806 return nullptr;
1807 1807
1808 // If we're moving in the back/forward list, we might want to replace the co ntent 1808 // If we're moving in the back/forward list, we might want to replace the co ntent
1809 // of this child frame with whatever was there at that point. 1809 // of this child frame with whatever was there at that point.
1810 RefPtrWillBeRawPtr<HistoryItem> childItem = nullptr; 1810 RefPtrWillBeRawPtr<HistoryItem> childItem = nullptr;
1811 if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->documen t()->loadEventFinished()) 1811 if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->documen t()->loadEventFinished())
1812 childItem = PassRefPtrWillBeRawPtr<HistoryItem>(webframeChild->client()- >historyItemForNewChildFrame(webframeChild.get())); 1812 childItem = PassRefPtrWillBeRawPtr<HistoryItem>(webframeChild->client()- >historyItemForNewChildFrame());
1813 1813
1814 FrameLoadRequest newRequest = request; 1814 FrameLoadRequest newRequest = request;
1815 FrameLoadType loadType = FrameLoadTypeStandard; 1815 FrameLoadType loadType = FrameLoadTypeStandard;
1816 if (childItem) { 1816 if (childItem) {
1817 newRequest = FrameLoadRequest(request.originDocument(), 1817 newRequest = FrameLoadRequest(request.originDocument(),
1818 FrameLoader::resourceRequestFromHistoryItem(childItem.get(), UseProt ocolCachePolicy)); 1818 FrameLoader::resourceRequestFromHistoryItem(childItem.get(), UseProt ocolCachePolicy));
1819 loadType = FrameLoadTypeInitialHistoryLoad; 1819 loadType = FrameLoadTypeInitialHistoryLoad;
1820 } 1820 }
1821 webframeChild->frame()->loader().load(newRequest, loadType, childItem.get()) ; 1821 webframeChild->frame()->loader().load(newRequest, loadType, childItem.get()) ;
1822 1822
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 } 2232 }
2233 2233
2234 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const 2234 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const
2235 { 2235 {
2236 if (!frame()) 2236 if (!frame())
2237 return WebSandboxFlags::None; 2237 return WebSandboxFlags::None;
2238 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2238 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2239 } 2239 }
2240 2240
2241 } // namespace blink 2241 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698