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

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

Issue 851933003: WebVTT: Support 'auto' text position (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test nits. Created 5 years, 11 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
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 const String& vertical() const; 74 const String& vertical() const;
75 void setVertical(const String&); 75 void setVertical(const String&);
76 76
77 bool snapToLines() const { return m_snapToLines; } 77 bool snapToLines() const { return m_snapToLines; }
78 void setSnapToLines(bool); 78 void setSnapToLines(bool);
79 79
80 void line(DoubleOrAutoKeyword&) const; 80 void line(DoubleOrAutoKeyword&) const;
81 void setLine(const DoubleOrAutoKeyword&, ExceptionState&); 81 void setLine(const DoubleOrAutoKeyword&, ExceptionState&);
82 82
83 double position() const { return m_textPosition; } 83 void position(DoubleOrAutoKeyword&) const;
84 void setPosition(double, ExceptionState&); 84 void setPosition(const DoubleOrAutoKeyword&, ExceptionState&);
85 85
86 double size() const { return m_cueSize; } 86 double size() const { return m_cueSize; }
87 void setSize(double, ExceptionState&); 87 void setSize(double, ExceptionState&);
88 88
89 const String& align() const; 89 const String& align() const;
90 void setAlign(const String&); 90 void setAlign(const String&);
91 91
92 const String& text() const { return m_text; } 92 const String& text() const { return m_text; }
93 void setText(const String&); 93 void setText(const String&);
94 94
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 virtual void cueDidChange() override; 154 virtual void cueDidChange() override;
155 155
156 void createVTTNodeTree(); 156 void createVTTNodeTree();
157 void copyVTTNodeToDOMTree(ContainerNode* vttNode, ContainerNode* root); 157 void copyVTTNodeToDOMTree(ContainerNode* vttNode, ContainerNode* root);
158 158
159 FloatPoint getPositionCoordinates() const; 159 FloatPoint getPositionCoordinates() const;
160 bool lineIsAuto() const; 160 bool lineIsAuto() const;
161 161
162 void calculateDisplayParameters(); 162 void calculateDisplayParameters();
163 float calculateComputedTextPosition() const;
164 bool textPositionIsAuto() const;
163 165
164 enum CueSetting { 166 enum CueSetting {
165 None, 167 None,
166 Vertical, 168 Vertical,
167 Line, 169 Line,
168 Position, 170 Position,
169 Size, 171 Size,
170 Align, 172 Align,
171 RegionId 173 RegionId
172 }; 174 };
(...skipping 20 matching lines...) Expand all
193 bool m_displayTreeShouldChange : 1; 195 bool m_displayTreeShouldChange : 1;
194 bool m_notifyRegion : 1; 196 bool m_notifyRegion : 1;
195 }; 197 };
196 198
197 // VTTCue is currently the only TextTrackCue subclass. 199 // VTTCue is currently the only TextTrackCue subclass.
198 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true); 200 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true);
199 201
200 } // namespace blink 202 } // namespace blink
201 203
202 #endif // VTTCue_h 204 #endif // VTTCue_h
OLDNEW
« no previous file with comments | « LayoutTests/media/track/track-webvtt-tc021-valign-expected.txt ('k') | Source/core/html/track/vtt/VTTCue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698