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

Unified Diff: Source/core/dom/DocumentInit.cpp

Issue 317493002: Change FrameTree to return Frames instead of LocalFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: dcheng's comment addressed Created 6 years, 6 months 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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/FullscreenElementStack.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentInit.cpp
diff --git a/Source/core/dom/DocumentInit.cpp b/Source/core/dom/DocumentInit.cpp
index c0fa775aada1cfadfbd1fc0e0bb7ebe21b524956..11b06ae136be1b143855ac425170907bc4686393 100644
--- a/Source/core/dom/DocumentInit.cpp
+++ b/Source/core/dom/DocumentInit.cpp
@@ -54,12 +54,12 @@ static Document* ownerDocument(LocalFrame* frame)
if (!frame)
return 0;
- LocalFrame* ownerFrame = frame->tree().parent();
+ Frame* ownerFrame = frame->tree().parent();
if (!ownerFrame)
ownerFrame = frame->loader().opener();
- if (!ownerFrame)
+ if (!ownerFrame || !ownerFrame->isLocalFrame())
return 0;
- return ownerFrame->document();
+ return toLocalFrame(ownerFrame)->document();
}
DocumentInit::DocumentInit(const KURL& url, LocalFrame* frame, WeakPtrWillBeRawPtr<Document> contextDocument, HTMLImportsController* importsController)
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/FullscreenElementStack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698