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

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

Issue 23886003: Have HTMLElements / SVGElements constructors take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another Android build fix Created 7 years, 3 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/PasswordInputType.cpp ('k') | Source/core/html/RangeInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/PluginDocument.cpp
diff --git a/Source/core/html/PluginDocument.cpp b/Source/core/html/PluginDocument.cpp
index 0a5390609655aa778bfc824c0b08acc4e94bf8aa..b4334088459ff86b721eeaeb93555361ef26780f 100644
--- a/Source/core/html/PluginDocument.cpp
+++ b/Source/core/html/PluginDocument.cpp
@@ -73,6 +73,7 @@ void PluginDocumentParser::createDocumentStructure()
{
// FIXME: Assert we have a loader to figure out why the original null checks
// and assert were added for the security bug in http://trac.webkit.org/changeset/87566
+ ASSERT(document());
RELEASE_ASSERT(document()->loader());
Frame* frame = document()->frame();
@@ -83,18 +84,18 @@ void PluginDocumentParser::createDocumentStructure()
if (!frame->settings() || !frame->loader()->allowPlugins(NotAboutToInstantiatePlugin))
return;
- RefPtr<HTMLHtmlElement> rootElement = HTMLHtmlElement::create(document());
+ RefPtr<HTMLHtmlElement> rootElement = HTMLHtmlElement::create(*document());
rootElement->insertedByParser();
document()->appendChild(rootElement);
frame->loader()->dispatchDocumentElementAvailable();
- RefPtr<HTMLBodyElement> body = HTMLBodyElement::create(document());
+ RefPtr<HTMLBodyElement> body = HTMLBodyElement::create(*document());
body->setAttribute(marginwidthAttr, "0");
body->setAttribute(marginheightAttr, "0");
body->setAttribute(styleAttr, "background-color: rgb(38,38,38)");
rootElement->appendChild(body);
- m_embedElement = HTMLEmbedElement::create(document());
+ m_embedElement = HTMLEmbedElement::create(*document());
m_embedElement->setAttribute(widthAttr, "100%");
m_embedElement->setAttribute(heightAttr, "100%");
m_embedElement->setAttribute(nameAttr, "plugin");
« no previous file with comments | « Source/core/html/PasswordInputType.cpp ('k') | Source/core/html/RangeInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698