Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(820)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXMediaControls.cpp

Issue 2804383002: Replace ASSERT with DCHECK in modules/accessibility (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698