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

Side by Side Diff: Source/core/html/track/TextTrackCue.h

Issue 25798003: Enable WebVTT regions for runtime testing, updated tests and minor fixes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert Logging Created 7 years, 2 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 int cueIndex(); 126 int cueIndex();
127 void invalidateCueIndex(); 127 void invalidateCueIndex();
128 128
129 PassRefPtr<DocumentFragment> getCueAsHTML(); 129 PassRefPtr<DocumentFragment> getCueAsHTML();
130 PassRefPtr<DocumentFragment> createCueRenderingTree(); 130 PassRefPtr<DocumentFragment> createCueRenderingTree();
131 131
132 using EventTarget::dispatchEvent; 132 using EventTarget::dispatchEvent;
133 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE; 133 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
134 134
135 #if ENABLE(WEBVTT_REGIONS)
136 const String& regionId() const { return m_regionId; } 135 const String& regionId() const { return m_regionId; }
137 void setRegionId(const String&); 136 void setRegionId(const String&);
138 #endif 137 void notifyRegionWhenRemovingDisplayTree(bool);
139 138
140 bool isActive(); 139 bool isActive();
141 void setIsActive(bool); 140 void setIsActive(bool);
142 141
143 bool hasDisplayTree() const { return m_displayTree; } 142 bool hasDisplayTree() const { return m_displayTree; }
144 PassRefPtr<TextTrackCueBox> getDisplayTree(const IntSize& videoSize); 143 PassRefPtr<TextTrackCueBox> getDisplayTree(const IntSize& videoSize);
145 PassRefPtr<HTMLDivElement> element() const { return m_cueBackgroundBox; } 144 PassRefPtr<HTMLDivElement> element() const { return m_cueBackgroundBox; }
146 145
147 void updateDisplayTree(double); 146 void updateDisplayTree(double);
148 void removeDisplayTree(); 147 void removeDisplayTree();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 virtual void refEventTarget() { ref(); } 220 virtual void refEventTarget() { ref(); }
222 virtual void derefEventTarget() { deref(); } 221 virtual void derefEventTarget() { deref(); }
223 222
224 enum CueSetting { 223 enum CueSetting {
225 None, 224 None,
226 Vertical, 225 Vertical,
227 Line, 226 Line,
228 Position, 227 Position,
229 Size, 228 Size,
230 Align, 229 Align,
231 #if ENABLE(WEBVTT_REGIONS)
232 RegionId 230 RegionId
233 #endif
234 }; 231 };
235 CueSetting settingName(const String&); 232 CueSetting settingName(const String&);
236 233
237 String m_id; 234 String m_id;
238 double m_startTime; 235 double m_startTime;
239 double m_endTime; 236 double m_endTime;
240 String m_content; 237 String m_content;
241 String m_settings; 238 String m_settings;
242 int m_linePosition; 239 int m_linePosition;
243 int m_computedLinePosition; 240 int m_computedLinePosition;
(...skipping 21 matching lines...) Expand all
265 RefPtr<TextTrackCueBox> m_displayTree; 262 RefPtr<TextTrackCueBox> m_displayTree;
266 263
267 CSSValueID m_displayDirection; 264 CSSValueID m_displayDirection;
268 265
269 CSSValueID m_displayWritingModeMap[NumberOfWritingDirections]; 266 CSSValueID m_displayWritingModeMap[NumberOfWritingDirections];
270 CSSValueID m_displayWritingMode; 267 CSSValueID m_displayWritingMode;
271 268
272 int m_displaySize; 269 int m_displaySize;
273 270
274 std::pair<float, float> m_displayPosition; 271 std::pair<float, float> m_displayPosition;
275 #if ENABLE(WEBVTT_REGIONS)
276 String m_regionId; 272 String m_regionId;
277 #endif 273 bool m_notifyRegion;
278 }; 274 };
279 275
280 } // namespace WebCore 276 } // namespace WebCore
281 277
282 #endif 278 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698