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

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

Issue 1219013005: Fix virtual/override/final usage in Source/core/html/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/track/VideoTrackList.h ('k') | Source/core/html/track/vtt/VTTElement.h » ('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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 DECLARE_VIRTUAL_TRACE(); 63 DECLARE_VIRTUAL_TRACE();
64 64
65 private: 65 private:
66 VTTCueBox(Document&, VTTCue*); 66 VTTCueBox(Document&, VTTCue*);
67 67
68 virtual LayoutObject* createLayoutObject(const ComputedStyle&) override; 68 LayoutObject* createLayoutObject(const ComputedStyle&) override;
69 69
70 RawPtrWillBeMember<VTTCue> m_cue; 70 RawPtrWillBeMember<VTTCue> m_cue;
71 }; 71 };
72 72
73 class VTTCue final : public TextTrackCue { 73 class VTTCue final : public TextTrackCue {
74 DEFINE_WRAPPERTYPEINFO(); 74 DEFINE_WRAPPERTYPEINFO();
75 public: 75 public:
76 static PassRefPtrWillBeRawPtr<VTTCue> create(Document& document, double star tTime, double endTime, const String& text) 76 static PassRefPtrWillBeRawPtr<VTTCue> create(Document& document, double star tTime, double endTime, const String& text)
77 { 77 {
78 return adoptRefWillBeNoop(new VTTCue(document, startTime, endTime, text) ); 78 return adoptRefWillBeNoop(new VTTCue(document, startTime, endTime, text) );
79 } 79 }
80 80
81 virtual ~VTTCue(); 81 ~VTTCue() override;
82 82
83 const String& vertical() const; 83 const String& vertical() const;
84 void setVertical(const String&); 84 void setVertical(const String&);
85 85
86 bool snapToLines() const { return m_snapToLines; } 86 bool snapToLines() const { return m_snapToLines; }
87 void setSnapToLines(bool); 87 void setSnapToLines(bool);
88 88
89 void line(DoubleOrAutoKeyword&) const; 89 void line(DoubleOrAutoKeyword&) const;
90 void setLine(const DoubleOrAutoKeyword&); 90 void setLine(const DoubleOrAutoKeyword&);
91 91
(...skipping 12 matching lines...) Expand all
104 void parseSettings(const String&); 104 void parseSettings(const String&);
105 105
106 // Applies CSS override style from user settings. 106 // Applies CSS override style from user settings.
107 void applyUserOverrideCSSProperties(); 107 void applyUserOverrideCSSProperties();
108 108
109 PassRefPtrWillBeRawPtr<DocumentFragment> getCueAsHTML(); 109 PassRefPtrWillBeRawPtr<DocumentFragment> getCueAsHTML();
110 110
111 const String& regionId() const { return m_regionId; } 111 const String& regionId() const { return m_regionId; }
112 void setRegionId(const String&); 112 void setRegionId(const String&);
113 113
114 virtual void updateDisplay(HTMLDivElement& container) override; 114 void updateDisplay(HTMLDivElement& container) override;
115 115
116 virtual void updatePastAndFutureNodes(double movieTime) override; 116 void updatePastAndFutureNodes(double movieTime) override;
117 117
118 virtual void removeDisplayTree(RemovalNotification) override; 118 void removeDisplayTree(RemovalNotification) override;
119 119
120 float calculateComputedLinePosition() const; 120 float calculateComputedLinePosition() const;
121 121
122 enum WritingDirection { 122 enum WritingDirection {
123 Horizontal = 0, 123 Horizontal = 0,
124 VerticalGrowingLeft, 124 VerticalGrowingLeft,
125 VerticalGrowingRight, 125 VerticalGrowingRight,
126 NumberOfWritingDirections 126 NumberOfWritingDirections
127 }; 127 };
128 WritingDirection getWritingDirection() const { return m_writingDirection; } 128 WritingDirection getWritingDirection() const { return m_writingDirection; }
129 129
130 enum CueAlignment { 130 enum CueAlignment {
131 Start = 0, 131 Start = 0,
132 Middle, 132 Middle,
133 End, 133 End,
134 Left, 134 Left,
135 Right, 135 Right,
136 NumberOfAlignments 136 NumberOfAlignments
137 }; 137 };
138 CueAlignment cueAlignment() const { return m_cueAlignment; } 138 CueAlignment cueAlignment() const { return m_cueAlignment; }
139 139
140 virtual ExecutionContext* executionContext() const override; 140 ExecutionContext* executionContext() const override;
141 141
142 #ifndef NDEBUG 142 #ifndef NDEBUG
143 virtual String toString() const override; 143 String toString() const override;
144 #endif 144 #endif
145 145
146 DECLARE_VIRTUAL_TRACE(); 146 DECLARE_VIRTUAL_TRACE();
147 147
148 private: 148 private:
149 VTTCue(Document&, double startTime, double endTime, const String& text); 149 VTTCue(Document&, double startTime, double endTime, const String& text);
150 150
151 Document& document() const; 151 Document& document() const;
152 152
153 PassRefPtrWillBeRawPtr<VTTCueBox> getDisplayTree(); 153 PassRefPtrWillBeRawPtr<VTTCueBox> getDisplayTree();
154 154
155 virtual void cueDidChange() override; 155 void cueDidChange() override;
156 156
157 void createVTTNodeTree(); 157 void createVTTNodeTree();
158 void copyVTTNodeToDOMTree(ContainerNode* vttNode, ContainerNode* root); 158 void copyVTTNodeToDOMTree(ContainerNode* vttNode, ContainerNode* root);
159 159
160 bool lineIsAuto() const; 160 bool lineIsAuto() const;
161 bool textPositionIsAuto() const; 161 bool textPositionIsAuto() const;
162 162
163 VTTDisplayParameters calculateDisplayParameters() const; 163 VTTDisplayParameters calculateDisplayParameters() const;
164 float calculateComputedTextPosition() const; 164 float calculateComputedTextPosition() const;
165 CueAlignment calculateComputedCueAlignment() const; 165 CueAlignment calculateComputedCueAlignment() const;
(...skipping 24 matching lines...) Expand all
190 bool m_snapToLines : 1; 190 bool m_snapToLines : 1;
191 bool m_displayTreeShouldChange : 1; 191 bool m_displayTreeShouldChange : 1;
192 }; 192 };
193 193
194 // VTTCue is currently the only TextTrackCue subclass. 194 // VTTCue is currently the only TextTrackCue subclass.
195 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true); 195 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true);
196 196
197 } // namespace blink 197 } // namespace blink
198 198
199 #endif // VTTCue_h 199 #endif // VTTCue_h
OLDNEW
« no previous file with comments | « Source/core/html/track/VideoTrackList.h ('k') | Source/core/html/track/vtt/VTTElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698