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

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

Issue 189963007: Use isHTML*Element() helpers more in the accessibility code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 252 }
253 253
254 PassRefPtr<AXObject> AccessibilityMediaTimeline::create(RenderObject* renderer) 254 PassRefPtr<AXObject> AccessibilityMediaTimeline::create(RenderObject* renderer)
255 { 255 {
256 return adoptRef(new AccessibilityMediaTimeline(renderer)); 256 return adoptRef(new AccessibilityMediaTimeline(renderer));
257 } 257 }
258 258
259 String AccessibilityMediaTimeline::valueDescription() const 259 String AccessibilityMediaTimeline::valueDescription() const
260 { 260 {
261 Node* node = m_renderer->node(); 261 Node* node = m_renderer->node();
262 if (!node->hasTagName(inputTag)) 262 if (!isHTMLInputElement(node))
263 return String(); 263 return String();
264 264
265 return localizedMediaTimeDescription(toHTMLInputElement(node)->value().toFlo at()); 265 return localizedMediaTimeDescription(toHTMLInputElement(node)->value().toFlo at());
266 } 266 }
267 267
268 String AccessibilityMediaTimeline::helpText() const 268 String AccessibilityMediaTimeline::helpText() const
269 { 269 {
270 return queryString(WebLocalizedString::AXMediaSliderHelp); 270 return queryString(WebLocalizedString::AXMediaSliderHelp);
271 } 271 }
272 272
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 { 306 {
307 if (!m_renderer || !m_renderer->node()) 307 if (!m_renderer || !m_renderer->node())
308 return String(); 308 return String();
309 309
310 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla yElement*>(m_renderer->node()); 310 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla yElement*>(m_renderer->node());
311 float time = element->currentValue(); 311 float time = element->currentValue();
312 return localizedMediaTimeDescription(fabsf(time)); 312 return localizedMediaTimeDescription(fabsf(time));
313 } 313 }
314 314
315 } // namespace WebCore 315 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXListBoxOption.cpp ('k') | Source/core/accessibility/AXNodeObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698