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

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

Issue 7497054: Merge 92347 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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 | « no previous file | Source/WebCore/html/HTMLTrackElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLSourceElement.cpp
===================================================================
--- Source/WebCore/html/HTMLSourceElement.cpp (revision 92737)
+++ Source/WebCore/html/HTMLSourceElement.cpp (working copy)
@@ -57,13 +57,15 @@
void HTMLSourceElement::insertedIntoTree(bool deep)
{
HTMLElement::insertedIntoTree(deep);
- if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag)))
+ Element* parent = parentElement();
+ if (parent && parent->isMediaElement())
static_cast<HTMLMediaElement*>(parentNode())->sourceWasAdded(this);
}
void HTMLSourceElement::willRemove()
{
- if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag)))
+ Element* parent = parentElement();
+ if (parent && parent->isMediaElement())
static_cast<HTMLMediaElement*>(parentNode())->sourceWillBeRemoved(this);
HTMLElement::willRemove();
}
« no previous file with comments | « no previous file | Source/WebCore/html/HTMLTrackElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698