OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 if (isHTMLMediaElement(parent)) | 67 if (isHTMLMediaElement(parent)) |
68 toHTMLMediaElement(parent)->sourceWasRemoved(this); | 68 toHTMLMediaElement(parent)->sourceWasRemoved(this); |
69 HTMLElement::removedFrom(removalRoot); | 69 HTMLElement::removedFrom(removalRoot); |
70 } | 70 } |
71 | 71 |
72 void HTMLSourceElement::setSrc(const String& url) | 72 void HTMLSourceElement::setSrc(const String& url) |
73 { | 73 { |
74 setAttribute(srcAttr, AtomicString(url)); | 74 setAttribute(srcAttr, AtomicString(url)); |
75 } | 75 } |
76 | 76 |
77 const AtomicString& HTMLSourceElement::media() const | |
78 { | |
79 return getAttribute(mediaAttr); | |
80 } | |
81 | |
82 void HTMLSourceElement::setMedia(const AtomicString& media) | |
83 { | |
84 setAttribute(mediaAttr, media); | |
85 } | |
86 | |
87 const AtomicString& HTMLSourceElement::type() const | 77 const AtomicString& HTMLSourceElement::type() const |
88 { | 78 { |
89 return getAttribute(typeAttr); | 79 return getAttribute(typeAttr); |
90 } | 80 } |
91 | 81 |
92 void HTMLSourceElement::setType(const AtomicString& type) | 82 void HTMLSourceElement::setType(const AtomicString& type) |
93 { | 83 { |
94 setAttribute(typeAttr, type); | 84 setAttribute(typeAttr, type); |
95 } | 85 } |
96 | 86 |
(...skipping 17 matching lines...) Expand all Loading... |
114 WTF_LOG(Media, "HTMLSourceElement::errorEventTimerFired - %p", this); | 104 WTF_LOG(Media, "HTMLSourceElement::errorEventTimerFired - %p", this); |
115 dispatchEvent(Event::createCancelable(EventTypeNames::error)); | 105 dispatchEvent(Event::createCancelable(EventTypeNames::error)); |
116 } | 106 } |
117 | 107 |
118 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const | 108 bool HTMLSourceElement::isURLAttribute(const Attribute& attribute) const |
119 { | 109 { |
120 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute)
; | 110 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute)
; |
121 } | 111 } |
122 | 112 |
123 } | 113 } |
OLD | NEW |