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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1442463002: Save-Page-As-Complete-HTML: Even better handling of <object> elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@objects-fix-for-complete-html
Patch Set: Fixing a silly build issue... :-/ Created 5 years, 1 month 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 | « third_party/WebKit/Source/web/WebFrame.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « third_party/WebKit/Source/web/WebFrame.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698