| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 DEFINE_STATIC_LOCAL(const String, verticalrl, ("rl")); | 108 DEFINE_STATIC_LOCAL(const String, verticalrl, ("rl")); |
| 109 return verticalrl; | 109 return verticalrl; |
| 110 } | 110 } |
| 111 | 111 |
| 112 static const String& verticalGrowingRightKeyword() | 112 static const String& verticalGrowingRightKeyword() |
| 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(int value, ExceptionState& exceptionState) |
| 119 { | 119 { |
| 120 if (TextTrackCue::isInfiniteOrNonNumber(value, exceptionState)) | |
| 121 return true; | |
| 122 if (value < 0 || value > 100) { | 120 if (value < 0 || value > 100) { |
| 123 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde
xOutsideRange("value", value, 0.0, ExceptionMessages::InclusiveBound, 100.0, Exc
eptionMessages::InclusiveBound)); | 121 exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::inde
xOutsideRange("value", value, 0, ExceptionMessages::InclusiveBound, 100, Excepti
onMessages::InclusiveBound)); |
| 124 return true; | 122 return true; |
| 125 } | 123 } |
| 126 return false; | 124 return false; |
| 127 } | 125 } |
| 128 | 126 |
| 129 VTTCueBox::VTTCueBox(Document& document, VTTCue* cue) | 127 VTTCueBox::VTTCueBox(Document& document, VTTCue* cue) |
| 130 : HTMLDivElement(document) | 128 : HTMLDivElement(document) |
| 131 , m_cue(cue) | 129 , m_cue(cue) |
| 132 { | 130 { |
| 133 setShadowPseudoId(AtomicString("-webkit-media-text-track-display", AtomicStr
ing::ConstructFromLiteral)); | 131 setShadowPseudoId(AtomicString("-webkit-media-text-track-display", AtomicStr
ing::ConstructFromLiteral)); |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 ASSERT(m_cueBackgroundBox); | 1060 ASSERT(m_cueBackgroundBox); |
| 1063 return m_cueBackgroundBox->document(); | 1061 return m_cueBackgroundBox->document(); |
| 1064 } | 1062 } |
| 1065 | 1063 |
| 1066 void VTTCue::trace(Visitor* visitor) | 1064 void VTTCue::trace(Visitor* visitor) |
| 1067 { | 1065 { |
| 1068 TextTrackCue::trace(visitor); | 1066 TextTrackCue::trace(visitor); |
| 1069 } | 1067 } |
| 1070 | 1068 |
| 1071 } // namespace WebCore | 1069 } // namespace WebCore |
| OLD | NEW |