| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 case kMediaVolumeSliderThumb: | 79 case kMediaVolumeSliderThumb: |
| 80 case kMediaExitFullscreenButton: | 80 case kMediaExitFullscreenButton: |
| 81 case kMediaOverlayPlayButton: | 81 case kMediaOverlayPlayButton: |
| 82 case kMediaCastOffButton: | 82 case kMediaCastOffButton: |
| 83 case kMediaCastOnButton: | 83 case kMediaCastOnButton: |
| 84 case kMediaOverlayCastOffButton: | 84 case kMediaOverlayCastOffButton: |
| 85 case kMediaOverlayCastOnButton: | 85 case kMediaOverlayCastOnButton: |
| 86 case kMediaOverflowButton: | 86 case kMediaOverflowButton: |
| 87 case kMediaOverflowList: | 87 case kMediaOverflowList: |
| 88 case kMediaDownloadButton: | 88 case kMediaDownloadButton: |
| 89 case kMediaRemotingCastIcon: |
| 89 return new AccessibilityMediaControl(layout_object, ax_object_cache); | 90 return new AccessibilityMediaControl(layout_object, ax_object_cache); |
| 90 } | 91 } |
| 91 | 92 |
| 92 NOTREACHED(); | 93 NOTREACHED(); |
| 93 return new AccessibilityMediaControl(layout_object, ax_object_cache); | 94 return new AccessibilityMediaControl(layout_object, ax_object_cache); |
| 94 } | 95 } |
| 95 | 96 |
| 96 MediaControlElementType AccessibilityMediaControl::ControlType() const { | 97 MediaControlElementType AccessibilityMediaControl::ControlType() const { |
| 97 if (!GetLayoutObject() || !GetLayoutObject()->GetNode()) | 98 if (!GetLayoutObject() || !GetLayoutObject()->GetNode()) |
| 98 return kMediaTimelineContainer; // Timeline container is not accessible. | 99 return kMediaTimelineContainer; // Timeline container is not accessible. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 case kMediaTrackSelectionCheckmark: | 146 case kMediaTrackSelectionCheckmark: |
| 146 case kMediaControlsPanel: | 147 case kMediaControlsPanel: |
| 147 case kMediaVolumeSliderContainer: | 148 case kMediaVolumeSliderContainer: |
| 148 case kMediaVolumeSlider: | 149 case kMediaVolumeSlider: |
| 149 case kMediaVolumeSliderThumb: | 150 case kMediaVolumeSliderThumb: |
| 150 case kMediaOverflowList: | 151 case kMediaOverflowList: |
| 151 return QueryString(WebLocalizedString::kAXMediaDefault); | 152 return QueryString(WebLocalizedString::kAXMediaDefault); |
| 152 case kMediaSlider: | 153 case kMediaSlider: |
| 153 NOTREACHED(); | 154 NOTREACHED(); |
| 154 return QueryString(WebLocalizedString::kAXMediaDefault); | 155 return QueryString(WebLocalizedString::kAXMediaDefault); |
| 156 case kMediaRemotingCastIcon: |
| 157 return QueryString(WebLocalizedString::kAXMediaRemotingCastIcon); |
| 155 } | 158 } |
| 156 | 159 |
| 157 NOTREACHED(); | 160 NOTREACHED(); |
| 158 return QueryString(WebLocalizedString::kAXMediaDefault); | 161 return QueryString(WebLocalizedString::kAXMediaDefault); |
| 159 } | 162 } |
| 160 | 163 |
| 161 String AccessibilityMediaControl::Description( | 164 String AccessibilityMediaControl::Description( |
| 162 AXNameFrom name_from, | 165 AXNameFrom name_from, |
| 163 AXDescriptionFrom& description_from, | 166 AXDescriptionFrom& description_from, |
| 164 AXObjectVector* description_objects) const { | 167 AXObjectVector* description_objects) const { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 case kMediaControlsPanel: | 204 case kMediaControlsPanel: |
| 202 case kMediaVolumeSliderContainer: | 205 case kMediaVolumeSliderContainer: |
| 203 case kMediaVolumeSlider: | 206 case kMediaVolumeSlider: |
| 204 case kMediaVolumeSliderThumb: | 207 case kMediaVolumeSliderThumb: |
| 205 case kMediaOverflowList: | 208 case kMediaOverflowList: |
| 206 case kMediaDownloadButton: | 209 case kMediaDownloadButton: |
| 207 return QueryString(WebLocalizedString::kAXMediaDefault); | 210 return QueryString(WebLocalizedString::kAXMediaDefault); |
| 208 case kMediaSlider: | 211 case kMediaSlider: |
| 209 NOTREACHED(); | 212 NOTREACHED(); |
| 210 return QueryString(WebLocalizedString::kAXMediaDefault); | 213 return QueryString(WebLocalizedString::kAXMediaDefault); |
| 214 case kMediaRemotingCastIcon: |
| 215 return QueryString(WebLocalizedString::kAXMediaRemotingCastIcon); |
| 211 } | 216 } |
| 212 | 217 |
| 213 NOTREACHED(); | 218 NOTREACHED(); |
| 214 return QueryString(WebLocalizedString::kAXMediaDefault); | 219 return QueryString(WebLocalizedString::kAXMediaDefault); |
| 215 } | 220 } |
| 216 | 221 |
| 217 bool AccessibilityMediaControl::ComputeAccessibilityIsIgnored( | 222 bool AccessibilityMediaControl::ComputeAccessibilityIsIgnored( |
| 218 IgnoredReasons* ignored_reasons) const { | 223 IgnoredReasons* ignored_reasons) const { |
| 219 if (!layout_object_ || !layout_object_->Style() || | 224 if (!layout_object_ || !layout_object_->Style() || |
| 220 layout_object_->Style()->Visibility() != EVisibility::kVisible || | 225 layout_object_->Style()->Visibility() != EVisibility::kVisible || |
| (...skipping 13 matching lines...) Expand all Loading... |
| 234 case kMediaPauseButton: | 239 case kMediaPauseButton: |
| 235 case kMediaShowClosedCaptionsButton: | 240 case kMediaShowClosedCaptionsButton: |
| 236 case kMediaHideClosedCaptionsButton: | 241 case kMediaHideClosedCaptionsButton: |
| 237 case kMediaOverlayPlayButton: | 242 case kMediaOverlayPlayButton: |
| 238 case kMediaOverlayCastOffButton: | 243 case kMediaOverlayCastOffButton: |
| 239 case kMediaOverlayCastOnButton: | 244 case kMediaOverlayCastOnButton: |
| 240 case kMediaOverflowButton: | 245 case kMediaOverflowButton: |
| 241 case kMediaDownloadButton: | 246 case kMediaDownloadButton: |
| 242 case kMediaCastOnButton: | 247 case kMediaCastOnButton: |
| 243 case kMediaCastOffButton: | 248 case kMediaCastOffButton: |
| 249 case kMediaRemotingCastIcon: |
| 244 return kButtonRole; | 250 return kButtonRole; |
| 245 | 251 |
| 246 case kMediaTimelineContainer: | 252 case kMediaTimelineContainer: |
| 247 case kMediaVolumeSliderContainer: | 253 case kMediaVolumeSliderContainer: |
| 248 case kMediaTextTrackList: | 254 case kMediaTextTrackList: |
| 249 case kMediaOverflowList: | 255 case kMediaOverflowList: |
| 250 return kGroupRole; | 256 return kGroupRole; |
| 251 | 257 |
| 252 case kMediaControlsPanel: | 258 case kMediaControlsPanel: |
| 253 case kMediaCurrentTimeDisplay: | 259 case kMediaCurrentTimeDisplay: |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 if (!layout_object_ || !layout_object_->GetNode()) | 393 if (!layout_object_ || !layout_object_->GetNode()) |
| 388 return String(); | 394 return String(); |
| 389 | 395 |
| 390 MediaControlTimeDisplayElement* element = | 396 MediaControlTimeDisplayElement* element = |
| 391 static_cast<MediaControlTimeDisplayElement*>(layout_object_->GetNode()); | 397 static_cast<MediaControlTimeDisplayElement*>(layout_object_->GetNode()); |
| 392 float time = element->CurrentValue(); | 398 float time = element->CurrentValue(); |
| 393 return LocalizedMediaTimeDescription(fabsf(time)); | 399 return LocalizedMediaTimeDescription(fabsf(time)); |
| 394 } | 400 } |
| 395 | 401 |
| 396 } // namespace blink | 402 } // namespace blink |
| OLD | NEW |