Chromium Code Reviews| 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()) |
|
dcheng
2014/03/17 18:17:44
Do we need a FIXME here? Isn't location settable o
kenrb
2014/03/18 20:01:19
This check only prevents JavaScript URLs from runn
|
| 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()); |
| + } |
| } |
| } |