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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 track()->setLabel(value); | 109 track()->setLabel(value); |
110 else if (name == srclangAttr) | 110 else if (name == srclangAttr) |
111 track()->setLanguage(value); | 111 track()->setLanguage(value); |
112 else if (name == defaultAttr) | 112 else if (name == defaultAttr) |
113 track()->setIsDefault(!value.isNull()); | 113 track()->setIsDefault(!value.isNull()); |
114 } | 114 } |
115 | 115 |
116 HTMLElement::parseAttribute(name, value); | 116 HTMLElement::parseAttribute(name, value); |
117 } | 117 } |
118 | 118 |
119 KURL HTMLTrackElement::src() const | |
120 { | |
121 return document().completeURL(getAttribute(srcAttr)); | |
122 } | |
123 | |
124 void HTMLTrackElement::setSrc(const String& url) | |
125 { | |
126 setAttribute(srcAttr, url); | |
127 } | |
128 | |
129 String HTMLTrackElement::kind() | 119 String HTMLTrackElement::kind() |
130 { | 120 { |
131 return track()->kind(); | 121 return track()->kind(); |
132 } | 122 } |
133 | 123 |
134 void HTMLTrackElement::setKind(const String& kind) | 124 void HTMLTrackElement::setKind(const String& kind) |
135 { | 125 { |
136 setAttribute(kindAttr, kind); | 126 setAttribute(kindAttr, kind); |
137 } | 127 } |
138 | 128 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 HTMLMediaElement* HTMLTrackElement::mediaElement() const | 347 HTMLMediaElement* HTMLTrackElement::mediaElement() const |
358 { | 348 { |
359 Element* parent = parentElement(); | 349 Element* parent = parentElement(); |
360 if (parent && parent->isMediaElement()) | 350 if (parent && parent->isMediaElement()) |
361 return toHTMLMediaElement(parentNode()); | 351 return toHTMLMediaElement(parentNode()); |
362 return 0; | 352 return 0; |
363 } | 353 } |
364 | 354 |
365 } | 355 } |
366 | 356 |
OLD | NEW |