Index: Source/core/html/HTMLTrackElement.cpp |
diff --git a/Source/core/html/HTMLTrackElement.cpp b/Source/core/html/HTMLTrackElement.cpp |
index fddfcb3350cc79ab14a7ba52421b935e99c87e34..280020b9c9492064b690dfce5aed6e874b2551cb 100644 |
--- a/Source/core/html/HTMLTrackElement.cpp |
+++ b/Source/core/html/HTMLTrackElement.cpp |
@@ -267,8 +267,8 @@ const AtomicString& HTMLTrackElement::mediaElementCrossOriginAttribute() const |
HTMLMediaElement* HTMLTrackElement::mediaElement() const |
{ |
Element* parent = parentElement(); |
- if (parent && parent->isMediaElement()) |
- return toHTMLMediaElement(parentNode()); |
+ if (isHTMLMediaElement(parent)) |
+ return toHTMLMediaElement(parent); |
return 0; |
} |