Chromium Code Reviews| 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; |