Index: Source/WebCore/html/HTMLTrackElement.cpp |
=================================================================== |
--- Source/WebCore/html/HTMLTrackElement.cpp (revision 92737) |
+++ Source/WebCore/html/HTMLTrackElement.cpp (working copy) |
@@ -57,7 +57,8 @@ |
void HTMLTrackElement::insertedIntoTree(bool deep) |
{ |
HTMLElement::insertedIntoTree(deep); |
- if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag))) { |
+ Element* parent = parentElement(); |
+ if (parent && parent->isMediaElement()) { |
// TODO(annacc): |
// static_cast<HTMLMediaElement*>(parentNode())->trackWasAdded(this); |
} |
@@ -65,7 +66,8 @@ |
void HTMLTrackElement::willRemove() |
{ |
- if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag))) { |
+ Element* parent = parentElement(); |
+ if (parent && parent->isMediaElement()) { |
// TODO(annacc): |
// static_cast<HTMLMediaElement*>(parentNode())->trackWillBeRemoved(this); |
} |