OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. | 2 * Copyright (c) 2013, Opera Software ASA. 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 { | 113 { |
114 DEFINE_STATIC_LOCAL(const String, verticallr, ("lr")); | 114 DEFINE_STATIC_LOCAL(const String, verticallr, ("lr")); |
115 return verticallr; | 115 return verticallr; |
116 } | 116 } |
117 | 117 |
118 static bool isInvalidPercentage(double value, ExceptionState& exceptionState) | 118 static bool isInvalidPercentage(double value, ExceptionState& exceptionState) |
119 { | 119 { |
120 if (TextTrackCue::isInfiniteOrNonNumber(value, exceptionState)) | 120 if (TextTrackCue::isInfiniteOrNonNumber(value, exceptionState)) |
121 return true; | 121 return true; |
122 if (value < 0 || value > 100) { | 122 if (value < 0 || value > 100) { |
123 exceptionState.throwDOMException(IndexSizeError, "The value provided ("
+ String::number(value) + ") is not between 0 and 100."); | 123 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde
xOutsideRange("value", value, 0.0, ExceptionMessages::InclusiveBound, 100.0, Exc
eptionMessages::InclusiveBound)); |
124 return true; | 124 return true; |
125 } | 125 } |
126 return false; | 126 return false; |
127 } | 127 } |
128 | 128 |
129 VTTCueBox::VTTCueBox(Document& document, VTTCue* cue) | 129 VTTCueBox::VTTCueBox(Document& document, VTTCue* cue) |
130 : HTMLDivElement(document) | 130 : HTMLDivElement(document) |
131 , m_cue(cue) | 131 , m_cue(cue) |
132 { | 132 { |
133 setShadowPseudoId(AtomicString("-webkit-media-text-track-display", AtomicStr
ing::ConstructFromLiteral)); | 133 setShadowPseudoId(AtomicString("-webkit-media-text-track-display", AtomicStr
ing::ConstructFromLiteral)); |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 return m_cueBackgroundBox->executionContext(); | 1065 return m_cueBackgroundBox->executionContext(); |
1066 } | 1066 } |
1067 | 1067 |
1068 Document& VTTCue::document() const | 1068 Document& VTTCue::document() const |
1069 { | 1069 { |
1070 ASSERT(m_cueBackgroundBox); | 1070 ASSERT(m_cueBackgroundBox); |
1071 return m_cueBackgroundBox->document(); | 1071 return m_cueBackgroundBox->document(); |
1072 } | 1072 } |
1073 | 1073 |
1074 } // namespace WebCore | 1074 } // namespace WebCore |
OLD | NEW |