| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 return queryString(controllingVideoElement() ? WebLocalizedString::AXMediaVi
deoElement : WebLocalizedString::AXMediaAudioElement); | 201 return queryString(controllingVideoElement() ? WebLocalizedString::AXMediaVi
deoElement : WebLocalizedString::AXMediaAudioElement); |
| 202 } | 202 } |
| 203 | 203 |
| 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 Node* node = m_renderer->node(); |
| 212 if (!node) |
| 212 return true; | 213 return true; |
| 213 | 214 |
| 214 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla
yElement*>(m_renderer->node()); | 215 return isHTMLVideoElement(toParentMediaElement(node)); |
| 215 | |
| 216 return isHTMLVideoElement(toParentMediaElement(element)); | |
| 217 } | 216 } |
| 218 | 217 |
| 219 bool AXMediaControlsContainer::computeAccessibilityIsIgnored() const | 218 bool AXMediaControlsContainer::computeAccessibilityIsIgnored() const |
| 220 { | 219 { |
| 221 return accessibilityIsIgnoredByDefault(); | 220 return accessibilityIsIgnoredByDefault(); |
| 222 } | 221 } |
| 223 | 222 |
| 224 // | 223 // |
| 225 // AccessibilityMediaTimeline | 224 // AccessibilityMediaTimeline |
| 226 | 225 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 { | 290 { |
| 292 if (!m_renderer || !m_renderer->node()) | 291 if (!m_renderer || !m_renderer->node()) |
| 293 return String(); | 292 return String(); |
| 294 | 293 |
| 295 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla
yElement*>(m_renderer->node()); | 294 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla
yElement*>(m_renderer->node()); |
| 296 float time = element->currentValue(); | 295 float time = element->currentValue(); |
| 297 return localizedMediaTimeDescription(fabsf(time)); | 296 return localizedMediaTimeDescription(fabsf(time)); |
| 298 } | 297 } |
| 299 | 298 |
| 300 } // namespace WebCore | 299 } // namespace WebCore |
| OLD | NEW |