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 30 matching lines...) Expand all Loading... |
41 return Locale::defaultLocale().queryString(name); | 41 return Locale::defaultLocale().queryString(name); |
42 } | 42 } |
43 | 43 |
44 AccessibilityMediaControl::AccessibilityMediaControl( | 44 AccessibilityMediaControl::AccessibilityMediaControl( |
45 LayoutObject* layoutObject, | 45 LayoutObject* layoutObject, |
46 AXObjectCacheImpl& axObjectCache) | 46 AXObjectCacheImpl& axObjectCache) |
47 : AXLayoutObject(layoutObject, axObjectCache) {} | 47 : AXLayoutObject(layoutObject, axObjectCache) {} |
48 | 48 |
49 AXObject* AccessibilityMediaControl::create(LayoutObject* layoutObject, | 49 AXObject* AccessibilityMediaControl::create(LayoutObject* layoutObject, |
50 AXObjectCacheImpl& axObjectCache) { | 50 AXObjectCacheImpl& axObjectCache) { |
51 ASSERT(layoutObject->node()); | 51 DCHECK(layoutObject->node()); |
52 | 52 |
53 switch (mediaControlElementType(layoutObject->node())) { | 53 switch (mediaControlElementType(layoutObject->node())) { |
54 case MediaSlider: | 54 case MediaSlider: |
55 return AccessibilityMediaTimeline::create(layoutObject, axObjectCache); | 55 return AccessibilityMediaTimeline::create(layoutObject, axObjectCache); |
56 | 56 |
57 case MediaCurrentTimeDisplay: | 57 case MediaCurrentTimeDisplay: |
58 case MediaTimeRemainingDisplay: | 58 case MediaTimeRemainingDisplay: |
59 return AccessibilityMediaTimeDisplay::create(layoutObject, axObjectCache); | 59 return AccessibilityMediaTimeDisplay::create(layoutObject, axObjectCache); |
60 | 60 |
61 case MediaControlsPanel: | 61 case MediaControlsPanel: |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 if (!m_layoutObject || !m_layoutObject->node()) | 384 if (!m_layoutObject || !m_layoutObject->node()) |
385 return String(); | 385 return String(); |
386 | 386 |
387 MediaControlTimeDisplayElement* element = | 387 MediaControlTimeDisplayElement* element = |
388 static_cast<MediaControlTimeDisplayElement*>(m_layoutObject->node()); | 388 static_cast<MediaControlTimeDisplayElement*>(m_layoutObject->node()); |
389 float time = element->currentValue(); | 389 float time = element->currentValue(); |
390 return localizedMediaTimeDescription(fabsf(time)); | 390 return localizedMediaTimeDescription(fabsf(time)); |
391 } | 391 } |
392 | 392 |
393 } // namespace blink | 393 } // namespace blink |
OLD | NEW |