OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |