Bug 1454238: Remove nsINode::eMEDIA. r=bz

MozReview-Commit-ID: LPutL6PlrgG
This commit is contained in:
Emilio Cobos Álvarez
2018-04-15 12:29:46 +02:00
parent 2dbe99a0b4
commit a22d605d3a
5 changed files with 5 additions and 14 deletions

View File

@@ -361,13 +361,14 @@ HTMLTrackElement::BindToTree(nsIDocument* aDocument,
NS_ENSURE_SUCCESS(rv, rv);
LOG(LogLevel::Debug, ("Track Element bound to tree."));
if (!aParent || !aParent->IsNodeOfType(nsINode::eMEDIA)) {
auto* parent = HTMLMediaElement::FromNodeOrNull(aParent);
if (!parent) {
return NS_OK;
}
// Store our parent so we can look up its frame for display.
if (!mMediaParent) {
mMediaParent = static_cast<HTMLMediaElement*>(aParent);
mMediaParent = parent;
// TODO: separate notification for 'alternate' tracks?
mMediaParent->NotifyAddedSource();