| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 case MediaVolumeSliderThumb: | 77 case MediaVolumeSliderThumb: |
| 78 case MediaExitFullscreenButton: | 78 case MediaExitFullscreenButton: |
| 79 case MediaOverlayPlayButton: | 79 case MediaOverlayPlayButton: |
| 80 case MediaCastOffButton: | 80 case MediaCastOffButton: |
| 81 case MediaCastOnButton: | 81 case MediaCastOnButton: |
| 82 case MediaOverlayCastOffButton: | 82 case MediaOverlayCastOffButton: |
| 83 case MediaOverlayCastOnButton: | 83 case MediaOverlayCastOnButton: |
| 84 case MediaOverflowButton: | 84 case MediaOverflowButton: |
| 85 case MediaOverflowList: | 85 case MediaOverflowList: |
| 86 case MediaDownloadButton: | 86 case MediaDownloadButton: |
| 87 case MediaRemotingCastIcon: |
| 87 return new AccessibilityMediaControl(layoutObject, axObjectCache); | 88 return new AccessibilityMediaControl(layoutObject, axObjectCache); |
| 88 } | 89 } |
| 89 | 90 |
| 90 NOTREACHED(); | 91 NOTREACHED(); |
| 91 return new AccessibilityMediaControl(layoutObject, axObjectCache); | 92 return new AccessibilityMediaControl(layoutObject, axObjectCache); |
| 92 } | 93 } |
| 93 | 94 |
| 94 MediaControlElementType AccessibilityMediaControl::controlType() const { | 95 MediaControlElementType AccessibilityMediaControl::controlType() const { |
| 95 if (!getLayoutObject() || !getLayoutObject()->node()) | 96 if (!getLayoutObject() || !getLayoutObject()->node()) |
| 96 return MediaTimelineContainer; // Timeline container is not accessible. | 97 return MediaTimelineContainer; // Timeline container is not accessible. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 case MediaTrackSelectionCheckmark: | 144 case MediaTrackSelectionCheckmark: |
| 144 case MediaControlsPanel: | 145 case MediaControlsPanel: |
| 145 case MediaVolumeSliderContainer: | 146 case MediaVolumeSliderContainer: |
| 146 case MediaVolumeSlider: | 147 case MediaVolumeSlider: |
| 147 case MediaVolumeSliderThumb: | 148 case MediaVolumeSliderThumb: |
| 148 case MediaOverflowList: | 149 case MediaOverflowList: |
| 149 return queryString(WebLocalizedString::AXMediaDefault); | 150 return queryString(WebLocalizedString::AXMediaDefault); |
| 150 case MediaSlider: | 151 case MediaSlider: |
| 151 NOTREACHED(); | 152 NOTREACHED(); |
| 152 return queryString(WebLocalizedString::AXMediaDefault); | 153 return queryString(WebLocalizedString::AXMediaDefault); |
| 154 case MediaRemotingCastIcon: |
| 155 return queryString(WebLocalizedString::AXMediaRemotingCastIcon); |
| 153 } | 156 } |
| 154 | 157 |
| 155 NOTREACHED(); | 158 NOTREACHED(); |
| 156 return queryString(WebLocalizedString::AXMediaDefault); | 159 return queryString(WebLocalizedString::AXMediaDefault); |
| 157 } | 160 } |
| 158 | 161 |
| 159 String AccessibilityMediaControl::description( | 162 String AccessibilityMediaControl::description( |
| 160 AXNameFrom nameFrom, | 163 AXNameFrom nameFrom, |
| 161 AXDescriptionFrom& descriptionFrom, | 164 AXDescriptionFrom& descriptionFrom, |
| 162 AXObjectVector* descriptionObjects) const { | 165 AXObjectVector* descriptionObjects) const { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 case MediaControlsPanel: | 202 case MediaControlsPanel: |
| 200 case MediaVolumeSliderContainer: | 203 case MediaVolumeSliderContainer: |
| 201 case MediaVolumeSlider: | 204 case MediaVolumeSlider: |
| 202 case MediaVolumeSliderThumb: | 205 case MediaVolumeSliderThumb: |
| 203 case MediaOverflowList: | 206 case MediaOverflowList: |
| 204 case MediaDownloadButton: | 207 case MediaDownloadButton: |
| 205 return queryString(WebLocalizedString::AXMediaDefault); | 208 return queryString(WebLocalizedString::AXMediaDefault); |
| 206 case MediaSlider: | 209 case MediaSlider: |
| 207 NOTREACHED(); | 210 NOTREACHED(); |
| 208 return queryString(WebLocalizedString::AXMediaDefault); | 211 return queryString(WebLocalizedString::AXMediaDefault); |
| 212 case MediaRemotingCastIcon: |
| 213 return queryString(WebLocalizedString::AXMediaRemotingCastIconHelp); |
| 209 } | 214 } |
| 210 | 215 |
| 211 NOTREACHED(); | 216 NOTREACHED(); |
| 212 return queryString(WebLocalizedString::AXMediaDefault); | 217 return queryString(WebLocalizedString::AXMediaDefault); |
| 213 } | 218 } |
| 214 | 219 |
| 215 bool AccessibilityMediaControl::computeAccessibilityIsIgnored( | 220 bool AccessibilityMediaControl::computeAccessibilityIsIgnored( |
| 216 IgnoredReasons* ignoredReasons) const { | 221 IgnoredReasons* ignoredReasons) const { |
| 217 if (!m_layoutObject || !m_layoutObject->style() || | 222 if (!m_layoutObject || !m_layoutObject->style() || |
| 218 m_layoutObject->style()->visibility() != EVisibility::kVisible || | 223 m_layoutObject->style()->visibility() != EVisibility::kVisible || |
| (...skipping 13 matching lines...) Expand all Loading... |
| 232 case MediaPauseButton: | 237 case MediaPauseButton: |
| 233 case MediaShowClosedCaptionsButton: | 238 case MediaShowClosedCaptionsButton: |
| 234 case MediaHideClosedCaptionsButton: | 239 case MediaHideClosedCaptionsButton: |
| 235 case MediaOverlayPlayButton: | 240 case MediaOverlayPlayButton: |
| 236 case MediaOverlayCastOffButton: | 241 case MediaOverlayCastOffButton: |
| 237 case MediaOverlayCastOnButton: | 242 case MediaOverlayCastOnButton: |
| 238 case MediaOverflowButton: | 243 case MediaOverflowButton: |
| 239 case MediaDownloadButton: | 244 case MediaDownloadButton: |
| 240 case MediaCastOnButton: | 245 case MediaCastOnButton: |
| 241 case MediaCastOffButton: | 246 case MediaCastOffButton: |
| 247 case MediaRemotingCastIcon: |
| 242 return ButtonRole; | 248 return ButtonRole; |
| 243 | 249 |
| 244 case MediaTimelineContainer: | 250 case MediaTimelineContainer: |
| 245 case MediaVolumeSliderContainer: | 251 case MediaVolumeSliderContainer: |
| 246 case MediaTextTrackList: | 252 case MediaTextTrackList: |
| 247 case MediaOverflowList: | 253 case MediaOverflowList: |
| 248 return GroupRole; | 254 return GroupRole; |
| 249 | 255 |
| 250 case MediaControlsPanel: | 256 case MediaControlsPanel: |
| 251 case MediaCurrentTimeDisplay: | 257 case MediaCurrentTimeDisplay: |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 if (!m_layoutObject || !m_layoutObject->node()) | 390 if (!m_layoutObject || !m_layoutObject->node()) |
| 385 return String(); | 391 return String(); |
| 386 | 392 |
| 387 MediaControlTimeDisplayElement* element = | 393 MediaControlTimeDisplayElement* element = |
| 388 static_cast<MediaControlTimeDisplayElement*>(m_layoutObject->node()); | 394 static_cast<MediaControlTimeDisplayElement*>(m_layoutObject->node()); |
| 389 float time = element->currentValue(); | 395 float time = element->currentValue(); |
| 390 return localizedMediaTimeDescription(fabsf(time)); | 396 return localizedMediaTimeDescription(fabsf(time)); |
| 391 } | 397 } |
| 392 | 398 |
| 393 } // namespace blink | 399 } // namespace blink |
| OLD | NEW |