OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "Settings.h" | 44 #include "Settings.h" |
45 | 45 |
46 namespace WebCore { | 46 namespace WebCore { |
47 | 47 |
48 using namespace HTMLNames; | 48 using namespace HTMLNames; |
49 | 49 |
50 inline HTMLVideoElement::HTMLVideoElement(const QualifiedName& tagName, Document
* document, bool createdByParser) | 50 inline HTMLVideoElement::HTMLVideoElement(const QualifiedName& tagName, Document
* document, bool createdByParser) |
51 : HTMLMediaElement(tagName, document, createdByParser) | 51 : HTMLMediaElement(tagName, document, createdByParser) |
52 { | 52 { |
53 ASSERT(hasTagName(videoTag)); | 53 ASSERT(hasTagName(videoTag)); |
| 54 ScriptWrappable::init(this); |
54 if (document->settings()) | 55 if (document->settings()) |
55 m_defaultPosterURL = document->settings()->defaultVideoPosterURL(); | 56 m_defaultPosterURL = document->settings()->defaultVideoPosterURL(); |
56 } | 57 } |
57 | 58 |
58 PassRefPtr<HTMLVideoElement> HTMLVideoElement::create(const QualifiedName& tagNa
me, Document* document, bool createdByParser) | 59 PassRefPtr<HTMLVideoElement> HTMLVideoElement::create(const QualifiedName& tagNa
me, Document* document, bool createdByParser) |
59 { | 60 { |
60 RefPtr<HTMLVideoElement> videoElement(adoptRef(new HTMLVideoElement(tagName,
document, createdByParser))); | 61 RefPtr<HTMLVideoElement> videoElement(adoptRef(new HTMLVideoElement(tagName,
document, createdByParser))); |
61 videoElement->suspendIfNeeded(); | 62 videoElement->suspendIfNeeded(); |
62 return videoElement.release(); | 63 return videoElement.release(); |
63 } | 64 } |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 { | 318 { |
318 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); | 319 String url = stripLeadingAndTrailingHTMLSpaces(imageSourceURL()); |
319 if (url.isEmpty()) | 320 if (url.isEmpty()) |
320 return KURL(); | 321 return KURL(); |
321 return document()->completeURL(url); | 322 return document()->completeURL(url); |
322 } | 323 } |
323 | 324 |
324 } | 325 } |
325 | 326 |
326 #endif | 327 #endif |
OLD | NEW |