Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: Source/core/html/track/vtt/VTTCue.h

Issue 244493002: Oilpan: add transition types to track interface objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add crbug.com/365260 crashing test + expectation Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/html/track/TrackEvent.h ('k') | Source/core/html/track/vtt/VTTCue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27 * OF THE POSSIBILITY OF SUCH DAMAGE. 27 * OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #ifndef VTTCue_h 30 #ifndef VTTCue_h
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 #include "platform/heap/Handle.h"
35 36
36 namespace WebCore { 37 namespace WebCore {
37 38
38 class Document; 39 class Document;
39 class ExecutionContext; 40 class ExecutionContext;
40 class VTTCue; 41 class VTTCue;
41 class VTTScanner; 42 class VTTScanner;
42 43
43 class VTTCueBox FINAL : public HTMLDivElement { 44 class VTTCueBox FINAL : public HTMLDivElement {
44 public: 45 public:
45 static PassRefPtr<VTTCueBox> create(Document& document, VTTCue* cue) 46 static PassRefPtr<VTTCueBox> create(Document& document, VTTCue* cue)
46 { 47 {
47 return adoptRef(new VTTCueBox(document, cue)); 48 return adoptRef(new VTTCueBox(document, cue));
48 } 49 }
49 50
50 VTTCue* getCue() const { return m_cue; } 51 VTTCue* getCue() const { return m_cue; }
51 void applyCSSProperties(const IntSize& videoSize); 52 void applyCSSProperties(const IntSize& videoSize);
52 53
53 private: 54 private:
54 VTTCueBox(Document&, VTTCue*); 55 VTTCueBox(Document&, VTTCue*);
55 56
56 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; 57 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
57 58
59 // FIXME: Oilpan: once Node has been moved onto the heap fully,
60 // drop the raw pointer for a Member (and vice versa from
61 // VTTCue.)
58 VTTCue* m_cue; 62 VTTCue* m_cue;
59 }; 63 };
60 64
61 class VTTCue FINAL : public TextTrackCue, public ScriptWrappable { 65 class VTTCue FINAL : public TextTrackCue, public ScriptWrappable {
62 public: 66 public:
63 static PassRefPtr<VTTCue> create(Document& document, double startTime, doubl e endTime, const String& text) 67 static PassRefPtrWillBeRawPtr<VTTCue> create(Document& document, double star tTime, double endTime, const String& text)
64 { 68 {
65 return adoptRef(new VTTCue(document, startTime, endTime, text)); 69 return adoptRefWillBeRefCountedGarbageCollected(new VTTCue(document, sta rtTime, endTime, text));
66 } 70 }
67 71
68 virtual ~VTTCue(); 72 virtual ~VTTCue();
69 73
70 const String& vertical() const; 74 const String& vertical() const;
71 void setVertical(const String&, ExceptionState&); 75 void setVertical(const String&, ExceptionState&);
72 76
73 bool snapToLines() const { return m_snapToLines; } 77 bool snapToLines() const { return m_snapToLines; }
74 void setSnapToLines(bool); 78 void setSnapToLines(bool);
75 79
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 NumberOfAlignments 134 NumberOfAlignments
131 }; 135 };
132 CueAlignment getAlignment() const { return m_cueAlignment; } 136 CueAlignment getAlignment() const { return m_cueAlignment; }
133 137
134 virtual ExecutionContext* executionContext() const OVERRIDE; 138 virtual ExecutionContext* executionContext() const OVERRIDE;
135 139
136 #ifndef NDEBUG 140 #ifndef NDEBUG
137 virtual String toString() const OVERRIDE; 141 virtual String toString() const OVERRIDE;
138 #endif 142 #endif
139 143
144 virtual void trace(Visitor*) OVERRIDE;
145
140 private: 146 private:
141 VTTCue(Document&, double startTime, double endTime, const String& text); 147 VTTCue(Document&, double startTime, double endTime, const String& text);
142 148
143 Document& document() const; 149 Document& document() const;
144 150
145 VTTCueBox& ensureDisplayTree(); 151 VTTCueBox& ensureDisplayTree();
146 PassRefPtr<VTTCueBox> getDisplayTree(const IntSize& videoSize); 152 PassRefPtr<VTTCueBox> getDisplayTree(const IntSize& videoSize);
147 153
148 virtual void cueDidChange() OVERRIDE; 154 virtual void cueDidChange() OVERRIDE;
149 155
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 bool m_displayTreeShouldChange : 1; 192 bool m_displayTreeShouldChange : 1;
187 bool m_notifyRegion : 1; 193 bool m_notifyRegion : 1;
188 }; 194 };
189 195
190 // VTTCue is currently the only TextTrackCue subclass. 196 // VTTCue is currently the only TextTrackCue subclass.
191 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true); 197 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true);
192 198
193 } // namespace WebCore 199 } // namespace WebCore
194 200
195 #endif 201 #endif
OLDNEW
« no previous file with comments | « Source/core/html/track/TrackEvent.h ('k') | Source/core/html/track/vtt/VTTCue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698