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

Unified Diff: Source/core/html/MediaDocument.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/LabelableElement.cpp ('k') | Source/core/html/PasswordInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/MediaDocument.cpp
diff --git a/Source/core/html/MediaDocument.cpp b/Source/core/html/MediaDocument.cpp
index f913bf7f376091205aeb5a56f1ab7c476385c43f..874a45e7779f561e1ca012eaf47fa8ae4116a0fc 100644
--- a/Source/core/html/MediaDocument.cpp
+++ b/Source/core/html/MediaDocument.cpp
@@ -72,25 +72,26 @@ private:
void MediaDocumentParser::createDocumentStructure()
{
- RefPtr<HTMLHtmlElement> rootElement = HTMLHtmlElement::create(document());
+ ASSERT(document());
+ RefPtr<HTMLHtmlElement> rootElement = HTMLHtmlElement::create(*document());
rootElement->insertedByParser();
document()->appendChild(rootElement);
if (document()->frame())
document()->frame()->loader()->dispatchDocumentElementAvailable();
- RefPtr<HTMLHeadElement> head = HTMLHeadElement::create(document());
- RefPtr<HTMLMetaElement> meta = HTMLMetaElement::create(document());
+ RefPtr<HTMLHeadElement> head = HTMLHeadElement::create(*document());
+ RefPtr<HTMLMetaElement> meta = HTMLMetaElement::create(*document());
meta->setAttribute(nameAttr, "viewport");
meta->setAttribute(contentAttr, "width=device-width");
head->appendChild(meta.release());
- RefPtr<HTMLVideoElement> media = HTMLVideoElement::create(document());
+ RefPtr<HTMLVideoElement> media = HTMLVideoElement::create(*document());
media->setAttribute(controlsAttr, "");
media->setAttribute(autoplayAttr, "");
media->setAttribute(nameAttr, "media");
- RefPtr<HTMLSourceElement> source = HTMLSourceElement::create(document());
+ RefPtr<HTMLSourceElement> source = HTMLSourceElement::create(*document());
source->setSrc(document()->url());
if (DocumentLoader* loader = document()->loader())
@@ -98,7 +99,7 @@ void MediaDocumentParser::createDocumentStructure()
media->appendChild(source.release());
- RefPtr<HTMLBodyElement> body = HTMLBodyElement::create(document());
+ RefPtr<HTMLBodyElement> body = HTMLBodyElement::create(*document());
body->appendChild(media.release());
rootElement->appendChild(head.release());
« no previous file with comments | « Source/core/html/LabelableElement.cpp ('k') | Source/core/html/PasswordInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698