Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1031)

Unified Diff: Source/core/html/HTMLSourceElement.cpp

Issue 196723014: Replace Element::isMediaElement() with isHTMLMediaElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: less null checks Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/HTMLTrackElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLSourceElement.cpp
diff --git a/Source/core/html/HTMLSourceElement.cpp b/Source/core/html/HTMLSourceElement.cpp
index 08d4f7cc7621253cd0e37bd768e84b36e26808c7..b1618268c4eb81630dd82be80a15faeef31ea134 100644
--- a/Source/core/html/HTMLSourceElement.cpp
+++ b/Source/core/html/HTMLSourceElement.cpp
@@ -55,8 +55,8 @@ Node::InsertionNotificationRequest HTMLSourceElement::insertedInto(ContainerNode
{
HTMLElement::insertedInto(insertionPoint);
Element* parent = parentElement();
- if (parent && parent->isMediaElement())
- toHTMLMediaElement(parentNode())->sourceWasAdded(this);
+ if (isHTMLMediaElement(parent))
+ toHTMLMediaElement(parent)->sourceWasAdded(this);
return InsertionDone;
}
@@ -65,7 +65,7 @@ void HTMLSourceElement::removedFrom(ContainerNode* removalRoot)
Element* parent = parentElement();
if (!parent && removalRoot->isElementNode())
parent = toElement(removalRoot);
- if (parent && parent->isMediaElement())
+ if (isHTMLMediaElement(parent))
toHTMLMediaElement(parent)->sourceWasRemoved(this);
HTMLElement::removedFrom(removalRoot);
}
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/HTMLTrackElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698