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

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

Issue 1225813003: The src argument for HTMLAudioElement constructor should not have default value. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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/HTMLAudioElement.h ('k') | Source/core/html/HTMLAudioElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLAudioElement.cpp
diff --git a/Source/core/html/HTMLAudioElement.cpp b/Source/core/html/HTMLAudioElement.cpp
index 6607ab47c103cd41df10c05bcee9e8ff76b21142..046bb408c4fd53a67b151e5466935fb58980f208 100644
--- a/Source/core/html/HTMLAudioElement.cpp
+++ b/Source/core/html/HTMLAudioElement.cpp
@@ -46,6 +46,15 @@ PassRefPtrWillBeRawPtr<HTMLAudioElement> HTMLAudioElement::create(Document& docu
return audio.release();
}
+PassRefPtrWillBeRawPtr<HTMLAudioElement> HTMLAudioElement::createForJSConstructor(Document& document)
+{
+ RefPtrWillBeRawPtr<HTMLAudioElement> audio = adoptRefWillBeNoop(new HTMLAudioElement(document));
+ audio->ensureUserAgentShadowRoot();
+ audio->setPreload(AtomicString("auto", AtomicString::ConstructFromLiteral));
+ audio->suspendIfNeeded();
+ return audio.release();
+}
+
PassRefPtrWillBeRawPtr<HTMLAudioElement> HTMLAudioElement::createForJSConstructor(Document& document, const AtomicString& src)
{
RefPtrWillBeRawPtr<HTMLAudioElement> audio = adoptRefWillBeNoop(new HTMLAudioElement(document));
« no previous file with comments | « Source/core/html/HTMLAudioElement.h ('k') | Source/core/html/HTMLAudioElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698