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

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

Issue 7057049: Merge 87743 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 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/WebCore/dom/Node.h ('k') | Source/WebCore/html/shadow/MediaControls.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/HTMLMediaElement.cpp
===================================================================
--- Source/WebCore/html/HTMLMediaElement.cpp (revision 87760)
+++ Source/WebCore/html/HTMLMediaElement.cpp (working copy)
@@ -2655,17 +2655,16 @@
MediaControls* HTMLMediaElement::mediaControls()
{
- if (!shadowRoot())
- return 0;
-
- Node* node = shadowRoot()->firstChild();
- ASSERT(node->isHTMLElement());
- return static_cast<MediaControls*>(node);
+ return toMediaControls(shadowRoot()->firstChild());
}
bool HTMLMediaElement::hasMediaControls()
{
- return shadowRoot();
+ if (!shadowRoot())
+ return false;
+
+ Node* node = shadowRoot()->firstChild();
+ return node && node->isMediaControls();
}
void HTMLMediaElement::ensureMediaControls()
« no previous file with comments | « Source/WebCore/dom/Node.h ('k') | Source/WebCore/html/shadow/MediaControls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698