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

Side by Side Diff: Source/core/accessibility/AXMediaControls.cpp

Issue 361563003: Remove unneeded and incorrect static_cast in AXMediaControlsContainer::controllingVideoElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 String AXMediaControlsContainer::helpText() const 204 String AXMediaControlsContainer::helpText() const
205 { 205 {
206 return queryString(controllingVideoElement() ? WebLocalizedString::AXMediaVi deoElementHelp : WebLocalizedString::AXMediaAudioElementHelp); 206 return queryString(controllingVideoElement() ? WebLocalizedString::AXMediaVi deoElementHelp : WebLocalizedString::AXMediaAudioElementHelp);
207 } 207 }
208 208
209 bool AXMediaControlsContainer::controllingVideoElement() const 209 bool AXMediaControlsContainer::controllingVideoElement() const
210 { 210 {
211 if (!m_renderer->node()) 211 if (!m_renderer->node())
212 return true; 212 return true;
213 213
214 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla yElement*>(m_renderer->node()); 214 MediaControlDivElement* element = static_cast<MediaControlDivElement*>(m_ren derer->node());
inferno 2014/07/02 15:49:17 Why do we need a static_cast at all, why not just
215 215
216 return isHTMLVideoElement(toParentMediaElement(element)); 216 return isHTMLVideoElement(toParentMediaElement(element));
217 } 217 }
218 218
219 bool AXMediaControlsContainer::computeAccessibilityIsIgnored() const 219 bool AXMediaControlsContainer::computeAccessibilityIsIgnored() const
220 { 220 {
221 return accessibilityIsIgnoredByDefault(); 221 return accessibilityIsIgnoredByDefault();
222 } 222 }
223 223
224 // 224 //
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 { 291 {
292 if (!m_renderer || !m_renderer->node()) 292 if (!m_renderer || !m_renderer->node())
293 return String(); 293 return String();
294 294
295 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla yElement*>(m_renderer->node()); 295 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla yElement*>(m_renderer->node());
296 float time = element->currentValue(); 296 float time = element->currentValue();
297 return localizedMediaTimeDescription(fabsf(time)); 297 return localizedMediaTimeDescription(fabsf(time));
298 } 298 }
299 299
300 } // namespace WebCore 300 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698