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

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: Removed LocalFrame verification in Editor 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
Index: Source/core/html/HTMLFrameElementBase.cpp
diff --git a/Source/core/html/HTMLFrameElementBase.cpp b/Source/core/html/HTMLFrameElementBase.cpp
index 23eb76f2cac6defe6ab24832b007a9e29afbc4eb..bcaf1254ab55fcaa544ae016684ea4c1d2c1c93f 100644
--- a/Source/core/html/HTMLFrameElementBase.cpp
+++ b/Source/core/html/HTMLFrameElementBase.cpp
@@ -92,9 +92,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)
@@ -164,8 +164,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());
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698