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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 enum CueAlignment { | 127 enum CueAlignment { |
128 Start = 0, | 128 Start = 0, |
129 Middle, | 129 Middle, |
130 End, | 130 End, |
131 Left, | 131 Left, |
132 Right, | 132 Right, |
133 NumberOfAlignments | 133 NumberOfAlignments |
134 }; | 134 }; |
135 CueAlignment getAlignment() const { return m_cueAlignment; } | 135 CueAlignment getAlignment() const { return m_cueAlignment; } |
136 | 136 |
| 137 virtual CueType cueType() const OVERRIDE { return WebVTT; } |
| 138 |
137 virtual ExecutionContext* executionContext() const OVERRIDE; | 139 virtual ExecutionContext* executionContext() const OVERRIDE; |
138 | 140 |
139 #ifndef NDEBUG | 141 #ifndef NDEBUG |
140 virtual String toString() const OVERRIDE; | 142 virtual String toString() const OVERRIDE; |
141 #endif | 143 #endif |
142 | 144 |
143 virtual void trace(Visitor*) OVERRIDE; | 145 virtual void trace(Visitor*) OVERRIDE; |
144 | 146 |
145 private: | 147 private: |
146 VTTCue(Document&, double startTime, double endTime, const String& text); | 148 VTTCue(Document&, double startTime, double endTime, const String& text); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 187 |
186 CSSValueID m_displayDirection; | 188 CSSValueID m_displayDirection; |
187 int m_displaySize; | 189 int m_displaySize; |
188 std::pair<float, float> m_displayPosition; | 190 std::pair<float, float> m_displayPosition; |
189 | 191 |
190 bool m_snapToLines : 1; | 192 bool m_snapToLines : 1; |
191 bool m_displayTreeShouldChange : 1; | 193 bool m_displayTreeShouldChange : 1; |
192 bool m_notifyRegion : 1; | 194 bool m_notifyRegion : 1; |
193 }; | 195 }; |
194 | 196 |
195 // VTTCue is currently the only TextTrackCue subclass. | 197 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, cue->cueType() == TextTrackCue::Web
VTT, cue.cueType() == TextTrackCue::WebVTT); |
196 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true); | |
197 | 198 |
198 } // namespace WebCore | 199 } // namespace WebCore |
199 | 200 |
200 #endif | 201 #endif |
OLD | NEW |