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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 Node::InsertionNotificationRequest HTMLTrackElement::insertedInto(ContainerNode*
insertionPoint) | 72 Node::InsertionNotificationRequest HTMLTrackElement::insertedInto(ContainerNode*
insertionPoint) |
73 { | 73 { |
74 WTF_LOG(Media, "HTMLTrackElement::insertedInto"); | 74 WTF_LOG(Media, "HTMLTrackElement::insertedInto"); |
75 | 75 |
76 // Since we've moved to a new parent, we may now be able to load. | 76 // Since we've moved to a new parent, we may now be able to load. |
77 scheduleLoad(); | 77 scheduleLoad(); |
78 | 78 |
79 HTMLElement::insertedInto(insertionPoint); | 79 HTMLElement::insertedInto(insertionPoint); |
80 HTMLMediaElement* parent = mediaElement(); | 80 HTMLMediaElement* parent = mediaElement(); |
81 if (insertionPoint == parent) | 81 if (insertionPoint == parent) |
82 parent->didAddTrackElement(this); | 82 parent->didAddTrack(this); |
83 return InsertionDone; | 83 return InsertionDone; |
84 } | 84 } |
85 | 85 |
86 void HTMLTrackElement::removedFrom(ContainerNode* insertionPoint) | 86 void HTMLTrackElement::removedFrom(ContainerNode* insertionPoint) |
87 { | 87 { |
88 if (!parentNode() && isHTMLMediaElement(*insertionPoint)) | 88 if (!parentNode() && isHTMLMediaElement(*insertionPoint)) |
89 toHTMLMediaElement(insertionPoint)->didRemoveTrackElement(this); | 89 toHTMLMediaElement(insertionPoint)->didRemoveTrack(this); |
90 HTMLElement::removedFrom(insertionPoint); | 90 HTMLElement::removedFrom(insertionPoint); |
91 } | 91 } |
92 | 92 |
93 void HTMLTrackElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) | 93 void HTMLTrackElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) |
94 { | 94 { |
95 if (name == srcAttr) { | 95 if (name == srcAttr) { |
96 if (!value.isEmpty()) | 96 if (!value.isEmpty()) |
97 scheduleLoad(); | 97 scheduleLoad(); |
98 else if (m_track) | 98 else if (m_track) |
99 m_track->removeAllCues(); | 99 m_track->removeAllCues(); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 306 |
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 |
OLD | NEW |