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

Unified Diff: Source/core/html/HTMLMediaElement.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/HTMLMediaElement.h ('k') | Source/core/html/HTMLMenuElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 219f264335589dce958c5ec85977d7e4743e4961..719d388704c908c3a68a8c9e1e54cd295fd7447a 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -238,9 +238,9 @@ WebMimeRegistry::SupportsType HTMLMediaElement::supportsType(const ContentType&
return WebKit::Platform::current()->mimeRegistry()->supportsMediaMIMEType(type, typeCodecs, system);
}
-HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document* document, bool createdByParser)
+HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& document, bool createdByParser)
: HTMLElement(tagName, document)
- , ActiveDOMObject(document)
+ , ActiveDOMObject(&document)
, m_loadTimer(this, &HTMLMediaElement::loadTimerFired)
, m_progressEventTimer(this, &HTMLMediaElement::progressEventTimerFired)
, m_playbackProgressTimer(this, &HTMLMediaElement::playbackProgressTimerFired)
@@ -301,13 +301,13 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document* docum
LOG(Media, "HTMLMediaElement::HTMLMediaElement");
ScriptWrappable::init(this);
- if (document->settings() && document->settings()->mediaPlaybackRequiresUserGesture()) {
+ if (document.settings() && document.settings()->mediaPlaybackRequiresUserGesture()) {
addBehaviorRestriction(RequireUserGestureForRateChangeRestriction);
addBehaviorRestriction(RequireUserGestureForLoadRestriction);
}
setHasCustomStyleCallbacks();
- addElementToDocumentMap(this, document);
+ addElementToDocumentMap(this, &document);
}
@@ -3687,7 +3687,7 @@ bool HTMLMediaElement::createMediaControls()
if (hasMediaControls())
return true;
- RefPtr<MediaControls> mediaControls = MediaControls::create(&document());
+ RefPtr<MediaControls> mediaControls = MediaControls::create(document());
if (!mediaControls)
return false;
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/HTMLMenuElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698