| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 case MediaControlsPanel: | 63 case MediaControlsPanel: |
| 64 return AXMediaControlsContainer::create(layoutObject, axObjectCache); | 64 return AXMediaControlsContainer::create(layoutObject, axObjectCache); |
| 65 | 65 |
| 66 default: | 66 default: |
| 67 return adoptRef(new AccessibilityMediaControl(layoutObject, axObjectCach
e)); | 67 return adoptRef(new AccessibilityMediaControl(layoutObject, axObjectCach
e)); |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 | 70 |
| 71 MediaControlElementType AccessibilityMediaControl::controlType() const | 71 MediaControlElementType AccessibilityMediaControl::controlType() const |
| 72 { | 72 { |
| 73 if (!renderer() || !renderer()->node()) | 73 if (!layoutObject() || !layoutObject()->node()) |
| 74 return MediaTimelineContainer; // Timeline container is not accessible. | 74 return MediaTimelineContainer; // Timeline container is not accessible. |
| 75 | 75 |
| 76 return mediaControlElementType(renderer()->node()); | 76 return mediaControlElementType(layoutObject()->node()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 String AccessibilityMediaControl::title(TextUnderElementMode mode) const | 79 String AccessibilityMediaControl::title(TextUnderElementMode mode) const |
| 80 { | 80 { |
| 81 // FIXME: the ControlsPanel container should never be visible in the | 81 // FIXME: the ControlsPanel container should never be visible in the |
| 82 // accessibility hierarchy. | 82 // accessibility hierarchy. |
| 83 if (controlType() == MediaControlsPanel) | 83 if (controlType() == MediaControlsPanel) |
| 84 return queryString(WebLocalizedString::AXMediaDefault); | 84 return queryString(WebLocalizedString::AXMediaDefault); |
| 85 | 85 |
| 86 return AXLayoutObject::title(mode); | 86 return AXLayoutObject::title(mode); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 { | 281 { |
| 282 if (!m_layoutObject || !m_layoutObject->node()) | 282 if (!m_layoutObject || !m_layoutObject->node()) |
| 283 return String(); | 283 return String(); |
| 284 | 284 |
| 285 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla
yElement*>(m_layoutObject->node()); | 285 MediaControlTimeDisplayElement* element = static_cast<MediaControlTimeDispla
yElement*>(m_layoutObject->node()); |
| 286 float time = element->currentValue(); | 286 float time = element->currentValue(); |
| 287 return localizedMediaTimeDescription(fabsf(time)); | 287 return localizedMediaTimeDescription(fabsf(time)); |
| 288 } | 288 } |
| 289 | 289 |
| 290 } // namespace blink | 290 } // namespace blink |
| OLD | NEW |