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

Side by Side Diff: Source/core/html/shadow/MediaControlElementTypes.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLTrackElement.cpp ('k') | Source/web/FullscreenController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 class Event; 46 class Event;
47 47
48 HTMLMediaElement* toParentMediaElement(Node* node) 48 HTMLMediaElement* toParentMediaElement(Node* node)
49 { 49 {
50 if (!node) 50 if (!node)
51 return 0; 51 return 0;
52 Node* mediaNode = node->shadowHost(); 52 Node* mediaNode = node->shadowHost();
53 if (!mediaNode) 53 if (!mediaNode)
54 mediaNode = node; 54 mediaNode = node;
55 if (!mediaNode || !mediaNode->isElementNode() || !toElement(mediaNode)->isMe diaElement()) 55 if (!isHTMLMediaElement(mediaNode))
56 return 0; 56 return 0;
57 57
58 return toHTMLMediaElement(mediaNode); 58 return toHTMLMediaElement(mediaNode);
59 } 59 }
60 60
61 MediaControlElementType mediaControlElementType(Node* node) 61 MediaControlElementType mediaControlElementType(Node* node)
62 { 62 {
63 ASSERT_WITH_SECURITY_IMPLICATION(node->isMediaControlElement()); 63 ASSERT_WITH_SECURITY_IMPLICATION(node->isMediaControlElement());
64 HTMLElement* element = toHTMLElement(node); 64 HTMLElement* element = toHTMLElement(node);
65 if (element->hasTagName(inputTag)) 65 if (element->hasTagName(inputTag))
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 , m_currentValue(0) 132 , m_currentValue(0)
133 { 133 {
134 } 134 }
135 135
136 void MediaControlTimeDisplayElement::setCurrentValue(double time) 136 void MediaControlTimeDisplayElement::setCurrentValue(double time)
137 { 137 {
138 m_currentValue = time; 138 m_currentValue = time;
139 } 139 }
140 140
141 } // namespace WebCore 141 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTrackElement.cpp ('k') | Source/web/FullscreenController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698