| 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 20 matching lines...) Expand all Loading... |
| 31 #define VTTCue_h | 31 #define VTTCue_h |
| 32 | 32 |
| 33 #include "bindings/v8/ScriptWrappable.h" | 33 #include "bindings/v8/ScriptWrappable.h" |
| 34 #include "core/html/track/TextTrackCue.h" | 34 #include "core/html/track/TextTrackCue.h" |
| 35 | 35 |
| 36 namespace WebCore { | 36 namespace WebCore { |
| 37 | 37 |
| 38 class Document; | 38 class Document; |
| 39 class ExecutionContext; | 39 class ExecutionContext; |
| 40 class VTTCue; | 40 class VTTCue; |
| 41 class VTTScanner; |
| 41 | 42 |
| 42 class VTTCueBox FINAL : public HTMLDivElement { | 43 class VTTCueBox FINAL : public HTMLDivElement { |
| 43 public: | 44 public: |
| 44 static PassRefPtr<VTTCueBox> create(Document& document, VTTCue* cue) | 45 static PassRefPtr<VTTCueBox> create(Document& document, VTTCue* cue) |
| 45 { | 46 { |
| 46 return adoptRef(new VTTCueBox(document, cue)); | 47 return adoptRef(new VTTCueBox(document, cue)); |
| 47 } | 48 } |
| 48 | 49 |
| 49 VTTCue* getCue() const { return m_cue; } | 50 VTTCue* getCue() const { return m_cue; } |
| 50 void applyCSSProperties(const IntSize& videoSize); | 51 void applyCSSProperties(const IntSize& videoSize); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 156 |
| 156 enum CueSetting { | 157 enum CueSetting { |
| 157 None, | 158 None, |
| 158 Vertical, | 159 Vertical, |
| 159 Line, | 160 Line, |
| 160 Position, | 161 Position, |
| 161 Size, | 162 Size, |
| 162 Align, | 163 Align, |
| 163 RegionId | 164 RegionId |
| 164 }; | 165 }; |
| 165 CueSetting settingName(const String&); | 166 CueSetting settingName(VTTScanner&); |
| 166 | 167 |
| 167 String m_text; | 168 String m_text; |
| 168 int m_linePosition; | 169 int m_linePosition; |
| 169 int m_computedLinePosition; | 170 int m_computedLinePosition; |
| 170 int m_textPosition; | 171 int m_textPosition; |
| 171 int m_cueSize; | 172 int m_cueSize; |
| 172 WritingDirection m_writingDirection; | 173 WritingDirection m_writingDirection; |
| 173 CueAlignment m_cueAlignment; | 174 CueAlignment m_cueAlignment; |
| 174 String m_regionId; | 175 String m_regionId; |
| 175 | 176 |
| 176 RefPtr<DocumentFragment> m_vttNodeTree; | 177 RefPtr<DocumentFragment> m_vttNodeTree; |
| 177 RefPtr<HTMLDivElement> m_cueBackgroundBox; | 178 RefPtr<HTMLDivElement> m_cueBackgroundBox; |
| 178 RefPtr<VTTCueBox> m_displayTree; | 179 RefPtr<VTTCueBox> m_displayTree; |
| 179 | 180 |
| 180 CSSValueID m_displayDirection; | 181 CSSValueID m_displayDirection; |
| 181 int m_displaySize; | 182 int m_displaySize; |
| 182 std::pair<float, float> m_displayPosition; | 183 std::pair<float, float> m_displayPosition; |
| 183 | 184 |
| 184 bool m_snapToLines : 1; | 185 bool m_snapToLines : 1; |
| 185 bool m_displayTreeShouldChange : 1; | 186 bool m_displayTreeShouldChange : 1; |
| 186 bool m_notifyRegion : 1; | 187 bool m_notifyRegion : 1; |
| 187 }; | 188 }; |
| 188 | 189 |
| 189 // VTTCue is currently the only TextTrackCue subclass. | 190 // VTTCue is currently the only TextTrackCue subclass. |
| 190 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true); | 191 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true); |
| 191 | 192 |
| 192 } // namespace WebCore | 193 } // namespace WebCore |
| 193 | 194 |
| 194 #endif | 195 #endif |
| OLD | NEW |