Index: Source/core/html/track/TextTrackCue.h |
diff --git a/Source/core/html/track/TextTrackCue.h b/Source/core/html/track/TextTrackCue.h |
index 6230702e1df9816131332dae52c10dc65a903418..3121e5adb0cadef6bf45335984f18e9d574dbb91 100644 |
--- a/Source/core/html/track/TextTrackCue.h |
+++ b/Source/core/html/track/TextTrackCue.h |
@@ -39,32 +39,21 @@ |
namespace WebCore { |
class Document; |
-class DocumentFragment; |
class ExceptionState; |
-class ExecutionContext; |
-class TextTrack; |
class TextTrackCue; |
// ---------------------------- |
-class TextTrackCueBox FINAL : public HTMLDivElement { |
+class TextTrackCueBox : public HTMLDivElement { |
public: |
- static PassRefPtr<TextTrackCueBox> create(Document& document, TextTrackCue* cue) |
+ static const AtomicString& textTrackCueBoxShadowPseudoId() |
{ |
- return adoptRef(new TextTrackCueBox(document, cue)); |
+ DEFINE_STATIC_LOCAL(const AtomicString, trackDisplayBoxShadowPseudoId, ("-webkit-media-text-track-display", AtomicString::ConstructFromLiteral)); |
+ return trackDisplayBoxShadowPseudoId; |
} |
- TextTrackCue* getCue() const; |
- void applyCSSProperties(const IntSize& videoSize); |
- |
- static const AtomicString& textTrackCueBoxShadowPseudoId(); |
- |
protected: |
- TextTrackCueBox(Document&, TextTrackCue*); |
- |
- virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
- |
- TextTrackCue* m_cue; |
+ TextTrackCueBox(Document&); |
}; |
// ---------------------------- |
@@ -78,7 +67,7 @@ public: |
return cue; |
} |
- virtual ~TextTrackCue(); |
+ virtual ~TextTrackCue() { } |
TextTrack* track() const; |
void setTrack(TextTrack*); |
@@ -95,149 +84,44 @@ public: |
bool pauseOnExit() const { return m_pauseOnExit; } |
void setPauseOnExit(bool); |
- const String& vertical() const; |
- void setVertical(const String&, ExceptionState&); |
- |
- bool snapToLines() const { return m_snapToLines; } |
- void setSnapToLines(bool); |
- |
- int line() const { return m_linePosition; } |
- void setLine(int, ExceptionState&); |
- |
- int position() const { return m_textPosition; } |
- void setPosition(int, ExceptionState&); |
- |
- int size() const { return m_cueSize; } |
- void setSize(int, ExceptionState&); |
- |
- const String& align() const; |
- void setAlign(const String&, ExceptionState&); |
- |
- const String& text() const { return m_content; } |
- void setText(const String&); |
- |
- void parseSettings(const String&); |
- |
int cueIndex(); |
void invalidateCueIndex(); |
- PassRefPtr<DocumentFragment> getCueAsHTML(); |
- PassRefPtr<DocumentFragment> createCueRenderingTree(); |
- |
using EventTarget::dispatchEvent; |
virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE; |
- const String& regionId() const { return m_regionId; } |
- void setRegionId(const String&); |
- void notifyRegionWhenRemovingDisplayTree(bool); |
- |
bool isActive(); |
void setIsActive(bool); |
- bool hasDisplayTree() const { return m_displayTree; } |
- PassRefPtr<TextTrackCueBox> getDisplayTree(const IntSize& videoSize); |
- PassRefPtr<HTMLDivElement> element() const { return m_cueBackgroundBox; } |
- |
- void updateDisplayTree(double); |
- void removeDisplayTree(); |
- void markFutureAndPastNodes(ContainerNode*, double, double); |
+ virtual void updateDisplay(const IntSize& videoSize, HTMLDivElement* container) { } |
acolwell GONE FROM CHROMIUM
2013/11/21 19:22:00
nit: I think this should this be pure virtual so t
gasubic
2013/11/22 15:27:34
Done.
|
- int calculateComputedLinePosition(); |
+ virtual void updateDisplayTree(double) { } |
acolwell GONE FROM CHROMIUM
2013/11/21 19:22:00
nit: Please file a bug and add a FIXME for the nec
esprehn
2013/11/22 04:52:30
Please add the argument name for the double. What
gasubic
2013/11/22 15:27:34
Done.
gasubic
2013/11/22 15:27:34
Done.
gasubic
2013/11/22 15:27:34
Done.
|
+ virtual void removeDisplayTree() { } |
+ virtual void notifyRegionWhenRemovingDisplayTree(bool) { } |
esprehn
2013/11/22 04:52:30
Same thing, what is this bool? Add argument names
gasubic
2013/11/22 15:27:34
Done.
|
virtual const AtomicString& interfaceName() const OVERRIDE; |
- virtual ExecutionContext* executionContext() const OVERRIDE; |
- |
- std::pair<double, double> getCSSPosition() const; |
- |
- CSSValueID getCSSAlignment() const; |
- int getCSSSize() const; |
- CSSValueID getCSSWritingDirection() const; |
- CSSValueID getCSSWritingMode() const; |
- |
- enum WritingDirection { |
- Horizontal = 0, |
- VerticalGrowingLeft, |
- VerticalGrowingRight, |
- NumberOfWritingDirections |
- }; |
- WritingDirection getWritingDirection() const { return m_writingDirection; } |
- |
- enum CueAlignment { |
- Start = 0, |
- Middle, |
- End, |
- Left, |
- Right, |
- NumberOfAlignments |
- }; |
- CueAlignment getAlignment() const { return m_cueAlignment; } |
DEFINE_ATTRIBUTE_EVENT_LISTENER(enter); |
DEFINE_ATTRIBUTE_EVENT_LISTENER(exit); |
-protected: |
- TextTrackCue(Document&, double start, double end, const String& content); |
- |
-private: |
- Document& document() const; |
- |
- PassRefPtr<TextTrackCueBox> displayTreeInternal(); |
+ virtual bool isVTTCue() const { return false; } |
- void createVTTNodeTree(); |
- void copyVTTNodeToDOMTree(ContainerNode* VTTNode, ContainerNode* root); |
- |
- std::pair<double, double> getPositionCoordinates() const; |
- |
- void determineTextDirection(); |
- void calculateDisplayParameters(); |
+protected: |
+ TextTrackCue(double start, double end); |
void cueWillChange(); |
- void cueDidChange(); |
- |
- enum CueSetting { |
- None, |
- Vertical, |
- Line, |
- Position, |
- Size, |
- Align, |
- RegionId |
- }; |
- CueSetting settingName(const String&); |
+ virtual void cueDidChange(); |
+private: |
String m_id; |
double m_startTime; |
double m_endTime; |
- String m_content; |
- int m_linePosition; |
- int m_computedLinePosition; |
- int m_textPosition; |
- int m_cueSize; |
int m_cueIndex; |
- WritingDirection m_writingDirection; |
- |
- CueAlignment m_cueAlignment; |
- |
- RefPtr<DocumentFragment> m_webVTTNodeTree; |
TextTrack* m_track; |
bool m_isActive; |
bool m_pauseOnExit; |
- bool m_snapToLines; |
- |
- RefPtr<HTMLDivElement> m_cueBackgroundBox; |
- |
- bool m_displayTreeShouldChange; |
- RefPtr<TextTrackCueBox> m_displayTree; |
- |
- CSSValueID m_displayDirection; |
- |
- int m_displaySize; |
- |
- std::pair<float, float> m_displayPosition; |
- String m_regionId; |
- bool m_notifyRegion; |
}; |
} // namespace WebCore |