OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 track()->setLanguage(value); | 108 track()->setLanguage(value); |
109 } else if (name == idAttr) { | 109 } else if (name == idAttr) { |
110 track()->setId(value); | 110 track()->setId(value); |
111 } else if (name == defaultAttr) { | 111 } else if (name == defaultAttr) { |
112 track()->setIsDefault(!value.isNull()); | 112 track()->setIsDefault(!value.isNull()); |
113 } | 113 } |
114 | 114 |
115 HTMLElement::parseAttribute(name, value); | 115 HTMLElement::parseAttribute(name, value); |
116 } | 116 } |
117 | 117 |
118 String HTMLTrackElement::kind() | 118 const AtomicString& HTMLTrackElement::kind() |
119 { | 119 { |
120 return track()->kind(); | 120 return track()->kind(); |
121 } | 121 } |
122 | 122 |
123 void HTMLTrackElement::setKind(const String& kind) | 123 void HTMLTrackElement::setKind(const AtomicString& kind) |
124 { | 124 { |
125 setAttribute(kindAttr, kind); | 125 setAttribute(kindAttr, kind); |
126 } | 126 } |
127 | 127 |
128 LoadableTextTrack* HTMLTrackElement::ensureTrack() | 128 LoadableTextTrack* HTMLTrackElement::ensureTrack() |
129 { | 129 { |
130 if (!m_track) { | 130 if (!m_track) { |
131 // kind, label and language are updated by parseAttribute | 131 // kind, label and language are updated by parseAttribute |
132 m_track = LoadableTextTrack::create(this); | 132 m_track = LoadableTextTrack::create(this); |
133 } | 133 } |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 HTMLMediaElement* HTMLTrackElement::mediaElement() const | 307 HTMLMediaElement* HTMLTrackElement::mediaElement() const |
308 { | 308 { |
309 Element* parent = parentElement(); | 309 Element* parent = parentElement(); |
310 if (parent && parent->isMediaElement()) | 310 if (parent && parent->isMediaElement()) |
311 return toHTMLMediaElement(parentNode()); | 311 return toHTMLMediaElement(parentNode()); |
312 return 0; | 312 return 0; |
313 } | 313 } |
314 | 314 |
315 } | 315 } |
316 | 316 |
OLD | NEW |