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

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

Issue 850363005: VTTCue: Support 'auto' for line (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 18 matching lines...) Expand all
29 29
30 #ifndef VTTCue_h 30 #ifndef VTTCue_h
31 #define VTTCue_h 31 #define VTTCue_h
32 32
33 #include "core/html/track/TextTrackCue.h" 33 #include "core/html/track/TextTrackCue.h"
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class Document; 38 class Document;
39 class DoubleOrAutoKeyword;
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 PassRefPtrWillBeRawPtr<VTTCueBox> create(Document& document, VTTCue* cue) 46 static PassRefPtrWillBeRawPtr<VTTCueBox> create(Document& document, VTTCue* cue)
46 { 47 {
47 return adoptRefWillBeNoop(new VTTCueBox(document, cue)); 48 return adoptRefWillBeNoop(new VTTCueBox(document, cue));
48 } 49 }
(...skipping 20 matching lines...) Expand all
69 } 70 }
70 71
71 virtual ~VTTCue(); 72 virtual ~VTTCue();
72 73
73 const String& vertical() const; 74 const String& vertical() const;
74 void setVertical(const String&); 75 void setVertical(const String&);
75 76
76 bool snapToLines() const { return m_snapToLines; } 77 bool snapToLines() const { return m_snapToLines; }
77 void setSnapToLines(bool); 78 void setSnapToLines(bool);
78 79
79 double line() const { return m_linePosition; } 80 void line(DoubleOrAutoKeyword&) const;
80 void setLine(double, ExceptionState&); 81 void setLine(const DoubleOrAutoKeyword&);
81 82
82 double position() const { return m_textPosition; } 83 double position() const { return m_textPosition; }
83 void setPosition(double, ExceptionState&); 84 void setPosition(double, ExceptionState&);
84 85
85 double size() const { return m_cueSize; } 86 double size() const { return m_cueSize; }
86 void setSize(double, ExceptionState&); 87 void setSize(double, ExceptionState&);
87 88
88 const String& align() const; 89 const String& align() const;
89 void setAlign(const String&); 90 void setAlign(const String&);
90 91
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 182
182 RefPtrWillBeMember<DocumentFragment> m_vttNodeTree; 183 RefPtrWillBeMember<DocumentFragment> m_vttNodeTree;
183 RefPtrWillBeMember<HTMLDivElement> m_cueBackgroundBox; 184 RefPtrWillBeMember<HTMLDivElement> m_cueBackgroundBox;
184 RefPtrWillBeMember<VTTCueBox> m_displayTree; 185 RefPtrWillBeMember<VTTCueBox> m_displayTree;
185 186
186 CSSValueID m_displayDirection; 187 CSSValueID m_displayDirection;
187 float m_displaySize; 188 float m_displaySize;
188 FloatPoint m_displayPosition; 189 FloatPoint m_displayPosition;
189 190
190 bool m_snapToLines : 1; 191 bool m_snapToLines : 1;
192 bool m_lineIsAuto : 1;
philipj_slow 2015/01/20 14:52:31 How about using NaN for auto? Too clever?
fs 2015/01/20 16:35:16 I considered it, but since this is equally "free"
191 bool m_displayTreeShouldChange : 1; 193 bool m_displayTreeShouldChange : 1;
192 bool m_notifyRegion : 1; 194 bool m_notifyRegion : 1;
193 }; 195 };
194 196
195 // VTTCue is currently the only TextTrackCue subclass. 197 // VTTCue is currently the only TextTrackCue subclass.
196 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true); 198 DEFINE_TYPE_CASTS(VTTCue, TextTrackCue, cue, true, true);
197 199
198 } // namespace blink 200 } // namespace blink
199 201
200 #endif // VTTCue_h 202 #endif // VTTCue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698