| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 static PassRefPtrWillBeRawPtr<VTTCueBox> create(Document& document, VTTCue*
cue) | 55 static PassRefPtrWillBeRawPtr<VTTCueBox> create(Document& document, VTTCue*
cue) |
| 56 { | 56 { |
| 57 return adoptRefWillBeNoop(new VTTCueBox(document, cue)); | 57 return adoptRefWillBeNoop(new VTTCueBox(document, cue)); |
| 58 } | 58 } |
| 59 | 59 |
| 60 VTTCue* getCue() const { return m_cue; } | 60 VTTCue* getCue() const { return m_cue; } |
| 61 void applyCSSProperties(const VTTDisplayParameters&); | 61 void applyCSSProperties(const VTTDisplayParameters&); |
| 62 | 62 |
| 63 virtual void trace(Visitor*) override; | 63 virtual void trace(Visitor*) override; |
| 64 | 64 |
| 65 // Applies CSS properties retrieved from settings on the cue box. |
| 66 void applyUserOverrideCSSProperties(); |
| 67 |
| 65 private: | 68 private: |
| 66 VTTCueBox(Document&, VTTCue*); | 69 VTTCueBox(Document&, VTTCue*); |
| 67 | 70 |
| 68 virtual LayoutObject* createRenderer(const LayoutStyle&) override; | 71 virtual LayoutObject* createRenderer(const LayoutStyle&) override; |
| 69 | 72 |
| 70 RawPtrWillBeMember<VTTCue> m_cue; | 73 RawPtrWillBeMember<VTTCue> m_cue; |
| 71 }; | 74 }; |
| 72 | 75 |
| 73 class VTTCue final : public TextTrackCue { | 76 class VTTCue final : public TextTrackCue { |
| 74 DEFINE_WRAPPERTYPEINFO(); | 77 DEFINE_WRAPPERTYPEINFO(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 CueAlignment cueAlignment() const { return m_cueAlignment; } | 140 CueAlignment cueAlignment() const { return m_cueAlignment; } |
| 138 | 141 |
| 139 virtual ExecutionContext* executionContext() const override; | 142 virtual ExecutionContext* executionContext() const override; |
| 140 | 143 |
| 141 #ifndef NDEBUG | 144 #ifndef NDEBUG |
| 142 virtual String toString() const override; | 145 virtual String toString() const override; |
| 143 #endif | 146 #endif |
| 144 | 147 |
| 145 virtual void trace(Visitor*) override; | 148 virtual void trace(Visitor*) override; |
| 146 | 149 |
| 150 // Applies CSS properties retrieved from settings on text tracks elements. |
| 151 void applyUserOverrideCSSProperties(); |
| 152 |
| 147 private: | 153 private: |
| 148 VTTCue(Document&, double startTime, double endTime, const String& text); | 154 VTTCue(Document&, double startTime, double endTime, const String& text); |
| 149 | 155 |
| 150 Document& document() const; | 156 Document& document() const; |
| 151 | 157 |
| 152 VTTCueBox& ensureDisplayTree(); | 158 VTTCueBox& ensureDisplayTree(); |
| 153 PassRefPtrWillBeRawPtr<VTTCueBox> getDisplayTree(); | 159 PassRefPtrWillBeRawPtr<VTTCueBox> getDisplayTree(); |
| 154 | 160 |
| 155 virtual void cueDidChange() override; | 161 virtual void cueDidChange() override; |
| 156 | 162 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 bool m_displayTreeShouldChange : 1; | 197 bool m_displayTreeShouldChange : 1; |
| 192 bool m_notifyRegion : 1; | 198 bool m_notifyRegion : 1; |
| 193 }; | 199 }; |
| 194 | 200 |
| 195 // VTTCue is currently the only TextTrackCue subclass. | 201 // VTTCue is currently the only TextTrackCue subclass. |
| 196 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true); | 202 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true); |
| 197 | 203 |
| 198 } // namespace blink | 204 } // namespace blink |
| 199 | 205 |
| 200 #endif // VTTCue_h | 206 #endif // VTTCue_h |
| OLD | NEW |