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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLAudioElement.h ('k') | Source/core/html/HTMLAudioElement.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 PassRefPtrWillBeRawPtr<HTMLAudioElement> HTMLAudioElement::create(Document& docu ment) 41 PassRefPtrWillBeRawPtr<HTMLAudioElement> HTMLAudioElement::create(Document& docu ment)
42 { 42 {
43 RefPtrWillBeRawPtr<HTMLAudioElement> audio = adoptRefWillBeNoop(new HTMLAudi oElement(document)); 43 RefPtrWillBeRawPtr<HTMLAudioElement> audio = adoptRefWillBeNoop(new HTMLAudi oElement(document));
44 audio->ensureUserAgentShadowRoot(); 44 audio->ensureUserAgentShadowRoot();
45 audio->suspendIfNeeded(); 45 audio->suspendIfNeeded();
46 return audio.release(); 46 return audio.release();
47 } 47 }
48 48
49 PassRefPtrWillBeRawPtr<HTMLAudioElement> HTMLAudioElement::createForJSConstructo r(Document& document)
50 {
51 RefPtrWillBeRawPtr<HTMLAudioElement> audio = adoptRefWillBeNoop(new HTMLAudi oElement(document));
52 audio->ensureUserAgentShadowRoot();
53 audio->setPreload(AtomicString("auto", AtomicString::ConstructFromLiteral));
54 audio->suspendIfNeeded();
55 return audio.release();
56 }
57
49 PassRefPtrWillBeRawPtr<HTMLAudioElement> HTMLAudioElement::createForJSConstructo r(Document& document, const AtomicString& src) 58 PassRefPtrWillBeRawPtr<HTMLAudioElement> HTMLAudioElement::createForJSConstructo r(Document& document, const AtomicString& src)
50 { 59 {
51 RefPtrWillBeRawPtr<HTMLAudioElement> audio = adoptRefWillBeNoop(new HTMLAudi oElement(document)); 60 RefPtrWillBeRawPtr<HTMLAudioElement> audio = adoptRefWillBeNoop(new HTMLAudi oElement(document));
52 audio->ensureUserAgentShadowRoot(); 61 audio->ensureUserAgentShadowRoot();
53 audio->setPreload(AtomicString("auto", AtomicString::ConstructFromLiteral)); 62 audio->setPreload(AtomicString("auto", AtomicString::ConstructFromLiteral));
54 if (!src.isNull()) 63 if (!src.isNull())
55 audio->setSrc(src); 64 audio->setSrc(src);
56 audio->suspendIfNeeded(); 65 audio->suspendIfNeeded();
57 return audio.release(); 66 return audio.release();
58 } 67 }
59 68
60 } 69 }
OLDNEW
« 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