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

Unified 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: Drop questionmark. 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/track/vtt/VTTCue.h
diff --git a/Source/core/html/track/vtt/VTTCue.h b/Source/core/html/track/vtt/VTTCue.h
index 4d61aa61fff9afcd20a14b97c333537b8e6258f8..0e3afa27f4d79800140751f43c2638f2ff59ec9e 100644
--- a/Source/core/html/track/vtt/VTTCue.h
+++ b/Source/core/html/track/vtt/VTTCue.h
@@ -36,6 +36,7 @@
namespace blink {
class Document;
+class DoubleOrString;
class ExecutionContext;
class VTTCue;
class VTTScanner;
@@ -79,8 +80,8 @@ public:
int line() const { return m_linePosition; }
void setLine(int, ExceptionState&);
- int position() const { return m_textPosition; }
- void setPosition(int, ExceptionState&);
+ void position(DoubleOrString&) const;
+ void setPosition(const DoubleOrString&, ExceptionState&);
int size() const { return m_cueSize; }
void setSize(int, ExceptionState&);
@@ -158,6 +159,8 @@ private:
std::pair<double, double> getPositionCoordinates() const;
void calculateDisplayParameters();
+ int calculateComputedTextPosition() const;
+ bool textPositionIsAuto() const;
enum CueSetting {
None,
@@ -173,7 +176,7 @@ private:
String m_text;
int m_linePosition;
int m_computedLinePosition;
- int m_textPosition;
+ float m_textPosition;
philipj_slow 2015/01/15 09:08:57 Can you add a test that sets position to a value t
fs 2015/01/15 10:07:16 Are you saying that you want me to convert this to
philipj_slow 2015/01/19 14:44:26 I don't know what I want, in https://www.w3.org/Bu
fs 2015/01/19 15:09:05 I've gone with floats for now and added a test as
int m_cueSize;
WritingDirection m_writingDirection;
CueAlignment m_cueAlignment;

Powered by Google App Engine
This is Rietveld 408576698