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

Side by Side Diff: Source/core/html/track/vtt/VTTRegion.cpp

Issue 197213012: Improve media-related exception messages (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove redundant TimeRanges test Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/track/vtt/VTTCue.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Default scrolling animation time period (s). 68 // Default scrolling animation time period (s).
69 static const float scrollTime = 0.433; 69 static const float scrollTime = 0.433;
70 70
71 static bool isInfiniteOrNonNumberOrNonPercentage(double value, const char* metho d, ExceptionState& exceptionState) 71 static bool isInfiniteOrNonNumberOrNonPercentage(double value, const char* metho d, ExceptionState& exceptionState)
72 { 72 {
73 if (!std::isfinite(value)) { 73 if (!std::isfinite(value)) {
74 exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(value) ); 74 exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(value) );
75 return true; 75 return true;
76 } 76 }
77 if (value < 0 || value > 100) { 77 if (value < 0 || value > 100) {
78 exceptionState.throwDOMException(IndexSizeError, "The value provided (" + String::number(value) + ") is not between 0 and 100."); 78 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde xOutsideRange("value", value, 0.0, ExceptionMessages::InclusiveBound, 100.0, Exc eptionMessages::InclusiveBound));
79 return true; 79 return true;
80 } 80 }
81 return false; 81 return false;
82 } 82 }
83 83
84 VTTRegion::VTTRegion() 84 VTTRegion::VTTRegion()
85 : m_id(emptyString()) 85 : m_id(emptyString())
86 , m_width(defaultWidth) 86 , m_width(defaultWidth)
87 , m_heightInLines(defaultHeightInLines) 87 , m_heightInLines(defaultHeightInLines)
88 , m_regionAnchor(FloatPoint(defaultAnchorPointX, defaultAnchorPointY)) 88 , m_regionAnchor(FloatPoint(defaultAnchorPointX, defaultAnchorPointY))
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 465
466 void VTTRegion::scrollTimerFired(Timer<VTTRegion>*) 466 void VTTRegion::scrollTimerFired(Timer<VTTRegion>*)
467 { 467 {
468 WTF_LOG(Media, "VTTRegion::scrollTimerFired"); 468 WTF_LOG(Media, "VTTRegion::scrollTimerFired");
469 469
470 stopTimer(); 470 stopTimer();
471 displayLastVTTCueBox(); 471 displayLastVTTCueBox();
472 } 472 }
473 473
474 } // namespace WebCore 474 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/track/vtt/VTTCue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698