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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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/html/HTMLElement.cpp ('k') | Source/core/html/HTMLFieldSetElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLEmbedElement.cpp
diff --git a/Source/core/html/HTMLEmbedElement.cpp b/Source/core/html/HTMLEmbedElement.cpp
index 8ba2a67d4350165bb61b346296739a2bf00779b6..f773e6886fc953a141042da20b78324b84b34817 100644
--- a/Source/core/html/HTMLEmbedElement.cpp
+++ b/Source/core/html/HTMLEmbedElement.cpp
@@ -158,11 +158,11 @@ void HTMLEmbedElement::updateWidget(PluginCreationOption pluginCreationOption)
RefPtr<HTMLEmbedElement> protect(this); // Loading the plugin might remove us from the document.
bool beforeLoadAllowedLoad = dispatchBeforeLoadEvent(m_url);
if (!beforeLoadAllowedLoad) {
- if (document()->isPluginDocument()) {
+ if (document().isPluginDocument()) {
// Plugins inside plugin documents load differently than other plugins. By the time
// we are here in a plugin document, the load of the plugin (which is the plugin document's
// main resource) has already started. We need to explicitly cancel the main resource load here.
- toPluginDocument(document())->cancelManualPluginLoad();
+ toPluginDocument(&document())->cancelManualPluginLoad();
}
return;
}
@@ -178,7 +178,7 @@ bool HTMLEmbedElement::rendererIsNeeded(const NodeRenderingContext& context)
if (isImageType())
return HTMLPlugInImageElement::rendererIsNeeded(context);
- Frame* frame = document()->frame();
+ Frame* frame = document().frame();
if (!frame)
return false;
@@ -209,7 +209,7 @@ void HTMLEmbedElement::addSubresourceAttributeURLs(ListHashSet<KURL>& urls) cons
{
HTMLPlugInImageElement::addSubresourceAttributeURLs(urls);
- addSubresourceURL(urls, document()->completeURL(getAttribute(srcAttr)));
+ addSubresourceURL(urls, document().completeURL(getAttribute(srcAttr)));
}
}
« no previous file with comments | « Source/core/html/HTMLElement.cpp ('k') | Source/core/html/HTMLFieldSetElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698