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

Unified Diff: Source/core/html/HTMLTrackElement.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/HTMLSourceElement.cpp ('k') | Source/core/html/shadow/MediaControlElementTypes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/core/html/HTMLSourceElement.cpp ('k') | Source/core/html/shadow/MediaControlElementTypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698