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

Unified Diff: Source/core/loader/FrameLoader.cpp

Issue 799923006: Make canNavigate() OOPI-friendly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index fb007c7eac84c93ee2a36273c6fef56d1e597e25..338f769723e847509fbce99fac6b3b264b073bcf 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -746,7 +746,7 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest)
if (!prepareRequestForThisFrame(request))
return;
- RefPtrWillBeRawPtr<LocalFrame> targetFrame = request.formState() ? 0 : findFrameForNavigation(AtomicString(request.frameName()), request.formState() ? request.formState()->sourceDocument() : m_frame->document());
+ RefPtrWillBeRawPtr<LocalFrame> targetFrame = toLocalFrame(request.formState() ? 0 : m_frame->findFrameForNavigation(AtomicString(request.frameName()), m_frame));
dcheng 2014/12/13 01:55:49 Since this is changing anyway, let's use nullptr i
Nate Chapin 2014/12/20 00:09:14 Done.
if (targetFrame && targetFrame.get() != m_frame) {
request.setFrameName("_self");
targetFrame->loader().load(request);
@@ -1400,15 +1400,6 @@ bool FrameLoader::shouldTreatURLAsSrcdocDocument(const KURL& url) const
return ownerElement->fastHasAttribute(srcdocAttr);
}
-LocalFrame* FrameLoader::findFrameForNavigation(const AtomicString& name, Document* activeDocument)
-{
- ASSERT(activeDocument);
- Frame* frame = m_frame->tree().find(name);
- if (!frame || !frame->isLocalFrame() || !activeDocument->canNavigate(toLocalFrame(*frame)))
- return 0;
- return toLocalFrame(frame);
-}
-
void FrameLoader::loadHistoryItem(HistoryItem* item, FrameLoadType frameLoadType, HistoryLoadType historyLoadType, ResourceRequestCachePolicy cachePolicy)
{
RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get());
@@ -1461,9 +1452,6 @@ SandboxFlags FrameLoader::effectiveSandboxFlags() const
{
SandboxFlags flags = m_forcedSandboxFlags;
// FIXME: We need a way to propagate sandbox flags to out-of-process frames.
- Frame* parentFrame = m_frame->tree().parent();
- if (parentFrame && parentFrame->isLocalFrame())
- flags |= toLocalFrame(parentFrame)->document()->sandboxFlags();
if (FrameOwner* frameOwner = m_frame->owner())
flags |= frameOwner->sandboxFlags();
return flags;

Powered by Google App Engine
This is Rietveld 408576698