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

Unified Diff: Source/core/html/HTMLFrameElementBase.cpp

Issue 189573002: Convert HTMLFrameOwnerElement and FocusController to use Frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missed a null check Created 6 years, 9 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/frame/LocalFrame.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLFrameElementBase.cpp
diff --git a/Source/core/html/HTMLFrameElementBase.cpp b/Source/core/html/HTMLFrameElementBase.cpp
index f63b30b664d1bb23f11636bd2666f42a885f838d..3cfbab76a0caf2771c08212a00d51d874113873e 100644
--- a/Source/core/html/HTMLFrameElementBase.cpp
+++ b/Source/core/html/HTMLFrameElementBase.cpp
@@ -91,9 +91,9 @@ void HTMLFrameElementBase::openURL(bool lockBackForwardList)
if (!loadOrRedirectSubframe(url, m_frameName, lockBackForwardList))
return;
- if (!contentFrame() || scriptURL.isEmpty())
+ if (!contentFrame() || scriptURL.isEmpty() || !contentFrame()->isLocalFrame())
return;
- contentFrame()->script().executeScriptIfJavaScriptURL(scriptURL);
+ toLocalFrame(contentFrame())->script().executeScriptIfJavaScriptURL(scriptURL);
}
void HTMLFrameElementBase::parseAttribute(const QualifiedName& name, const AtomicString& value)
@@ -159,8 +159,10 @@ void HTMLFrameElementBase::attach(const AttachContext& context)
HTMLFrameOwnerElement::attach(context);
if (RenderPart* part = renderPart()) {
- if (LocalFrame* frame = contentFrame())
- part->setWidget(frame->view());
+ if (Frame* frame = contentFrame()) {
+ if (frame->isLocalFrame())
+ part->setWidget(toLocalFrame(frame)->view());
+ }
}
}
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/html/HTMLFrameOwnerElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698