Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
index 7428894fcc501ea218c3a879b21f3205e2023bef..95b75919a02fb2a1df9049421360d895081fbe40 100644 |
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp |
@@ -1809,7 +1809,7 @@ void WebLocalFrameImpl::createFrameView() |
WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame* frame) |
{ |
if (!frame) |
- return 0; |
+ return nullptr; |
return fromFrame(*frame); |
} |
@@ -1817,22 +1817,21 @@ WebLocalFrameImpl* WebLocalFrameImpl::fromFrame(LocalFrame& frame) |
{ |
FrameLoaderClient* client = frame.loader().client(); |
if (!client || !client->isFrameLoaderClientImpl()) |
- return 0; |
+ return nullptr; |
return toFrameLoaderClientImpl(client)->webFrame(); |
} |
WebLocalFrameImpl* WebLocalFrameImpl::fromFrameOwnerElement(Element* element) |
{ |
- // FIXME: Why do we check specifically for <iframe> and <frame> here? Why can't we get the WebLocalFrameImpl from an <object> element, for example. |
- if (!isHTMLFrameElementBase(element)) |
- return 0; |
- return fromFrame(toLocalFrame(toHTMLFrameElementBase(element)->contentFrame())); |
+ if (!element->isFrameOwnerElement()) |
+ return nullptr; |
+ return fromFrame(toLocalFrame(toHTMLFrameOwnerElement(element)->contentFrame())); |
} |
WebViewImpl* WebLocalFrameImpl::viewImpl() const |
{ |
if (!frame()) |
- return 0; |
+ return nullptr; |
return WebViewImpl::fromPage(frame()->page()); |
} |