OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |