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

Unified Diff: third_party/WebKit/Source/core/html/track/vtt/VTTCue.h

Issue 2682333002: Implement VTTCue.region and sync the VTTRegion interface (Closed)
Patch Set: Add DCHECK Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/track/vtt/VTTCue.h
diff --git a/third_party/WebKit/Source/core/html/track/vtt/VTTCue.h b/third_party/WebKit/Source/core/html/track/vtt/VTTCue.h
index 620df4c6114755742b8358abd857c85823211dc1..fe3848732c6037906c77458989716071e4d244a5 100644
--- a/third_party/WebKit/Source/core/html/track/vtt/VTTCue.h
+++ b/third_party/WebKit/Source/core/html/track/vtt/VTTCue.h
@@ -40,8 +40,11 @@ class Document;
class DoubleOrAutoKeyword;
class ExecutionContext;
class VTTCue;
+class VTTRegion;
class VTTScanner;
+using VTTRegionMap = HeapHashMap<String, Member<VTTRegion>>;
+
struct VTTDisplayParameters {
STACK_ALLOCATED();
VTTDisplayParameters();
@@ -86,6 +89,9 @@ class VTTCue final : public TextTrackCue {
~VTTCue() override;
+ VTTRegion* region() const { return m_region; }
+ void setRegion(VTTRegion*);
+
const String& vertical() const;
void setVertical(const String&);
@@ -107,16 +113,13 @@ class VTTCue final : public TextTrackCue {
const String& text() const { return m_text; }
void setText(const String&);
- void parseSettings(const String&);
+ void parseSettings(const VTTRegionMap*, const String&);
// Applies CSS override style from user settings.
void applyUserOverrideCSSProperties();
DocumentFragment* getCueAsHTML();
- const String& regionId() const { return m_regionId; }
- void setRegionId(const String&);
-
void updateDisplay(HTMLDivElement& container) override;
void updatePastAndFutureNodes(double movieTime) override;
@@ -172,8 +175,8 @@ class VTTCue final : public TextTrackCue {
float m_cueSize;
WritingDirection m_writingDirection;
CueAlignment m_cueAlignment;
- String m_regionId;
+ Member<VTTRegion> m_region;
Member<DocumentFragment> m_vttNodeTree;
Member<HTMLDivElement> m_cueBackgroundBox;
Member<VTTCueBox> m_displayTree;

Powered by Google App Engine
This is Rietveld 408576698