OLD | NEW |
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 MediaControlElementType AccessibilityMediaControl::controlType() const | 72 MediaControlElementType AccessibilityMediaControl::controlType() const |
73 { | 73 { |
74 if (!renderer() || !renderer()->node()) | 74 if (!renderer() || !renderer()->node()) |
75 return MediaTimelineContainer; // Timeline container is not accessible. | 75 return MediaTimelineContainer; // Timeline container is not accessible. |
76 | 76 |
77 return mediaControlElementType(renderer()->node()); | 77 return mediaControlElementType(renderer()->node()); |
78 } | 78 } |
79 | 79 |
80 void AccessibilityMediaControl::accessibilityText(Vector<AccessibilityText>& tex
tOrder) | |
81 { | |
82 String description = accessibilityDescription(); | |
83 if (!description.isEmpty()) | |
84 textOrder.append(AccessibilityText(description, AlternativeText)); | |
85 | |
86 String title = this->title(); | |
87 if (!title.isEmpty()) | |
88 textOrder.append(AccessibilityText(title, AlternativeText)); | |
89 | |
90 String helptext = helpText(); | |
91 if (!helptext.isEmpty()) | |
92 textOrder.append(AccessibilityText(helptext, HelpText)); | |
93 } | |
94 | |
95 | |
96 String AccessibilityMediaControl::title() const | 80 String AccessibilityMediaControl::title() const |
97 { | 81 { |
98 // FIXME: the ControlsPanel container should never be visible in the | 82 // FIXME: the ControlsPanel container should never be visible in the |
99 // accessibility hierarchy. | 83 // accessibility hierarchy. |
100 if (controlType() == MediaControlsPanel) | 84 if (controlType() == MediaControlsPanel) |
101 return queryString(WebLocalizedString::AXMediaDefault); | 85 return queryString(WebLocalizedString::AXMediaDefault); |
102 | 86 |
103 return AXRenderObject::title(); | 87 return AXRenderObject::title(); |
104 } | 88 } |
105 | 89 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 { | 291 { |
308 if (!m_renderer || !m_renderer->node()) | 292 if (!m_renderer || !m_renderer->node()) |
309 return String(); | 293 return String(); |
310 | 294 |
311 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla
yElement*>(m_renderer->node()); | 295 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla
yElement*>(m_renderer->node()); |
312 float time = element->currentValue(); | 296 float time = element->currentValue(); |
313 return localizedMediaTimeDescription(fabsf(time)); | 297 return localizedMediaTimeDescription(fabsf(time)); |
314 } | 298 } |
315 | 299 |
316 } // namespace WebCore | 300 } // namespace WebCore |
OLD | NEW |