Bug 1276833 - part1 : size should be double. r=rillian,smaug
authorAlastor Wu <alwu@mozilla.com>
Tue, 14 Jun 2016 11:51:40 +0100
changeset 301741 e7c14498436f09e681e9349c90f8f87cb6ed250a
parent 301740 b779a53247e2d660d73454cf0dc22370a22cf61a
child 301742 6c5a862618c4ad00df5bdccadc47c9da709a107f
push id30341
push usercbook@mozilla.com
push dateWed, 15 Jun 2016 05:24:50 +0000
treeherdermozilla-central@14c5bf11d37b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian, smaug
bugs1276833
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1276833 - part1 : size should be double. r=rillian,smaug MozReview-Commit-ID: FwDGgcqWfs5
dom/media/TextTrackCue.cpp
dom/media/TextTrackCue.h
dom/webidl/VTTCue.webidl
--- a/dom/media/TextTrackCue.cpp
+++ b/dom/media/TextTrackCue.cpp
@@ -30,17 +30,17 @@ StaticRefPtr<nsIWebVTTParserWrapper> Tex
 
 // Set cue setting defaults based on step 19 & seq.
 // in http://dev.w3.org/html5/webvtt/#parsing
 void
 TextTrackCue::SetDefaultCueSettings()
 {
   mPosition = 50;
   mPositionAlign = PositionAlignSetting::Center;
-  mSize = 100;
+  mSize = 100.0;
   mPauseOnExit = false;
   mSnapToLines = true;
   mLineIsAutoKeyword = true;
   mAlign = AlignSetting::Middle;
   mLineAlign = LineAlignSetting::Start;
   mVertical = DirectionSetting::_empty;
   mActive = false;
 }
--- a/dom/media/TextTrackCue.h
+++ b/dom/media/TextTrackCue.h
@@ -220,28 +220,28 @@ public:
     if (mPositionAlign == aPositionAlign) {
       return;
     }
 
     mReset = true;
     mPositionAlign = aPositionAlign;
   }
 
-  int32_t Size() const
+  double Size() const
   {
     return mSize;
   }
 
-  void SetSize(int32_t aSize, ErrorResult& aRv)
+  void SetSize(double aSize, ErrorResult& aRv)
   {
     if (mSize == aSize) {
       return;
     }
 
-    if (aSize < 0 || aSize > 100) {
+    if (aSize < 0.0 || aSize > 100.0) {
       aRv.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
       return;
     }
 
     mReset = true;
     mSize = aSize;
   }
 
@@ -357,17 +357,17 @@ private:
   double mStartTime;
   double mEndTime;
 
   RefPtr<TextTrack> mTrack;
   RefPtr<HTMLTrackElement> mTrackElement;
   nsString mId;
   int32_t mPosition;
   PositionAlignSetting mPositionAlign;
-  int32_t mSize;
+  double mSize;
   bool mPauseOnExit;
   bool mSnapToLines;
   RefPtr<TextTrackRegion> mRegion;
   DirectionSetting mVertical;
   bool mLineIsAutoKeyword;
   double mLine;
   AlignSetting mAlign;
   LineAlignSetting mLineAlign;
--- a/dom/webidl/VTTCue.webidl
+++ b/dom/webidl/VTTCue.webidl
@@ -46,17 +46,17 @@ interface VTTCue : TextTrackCue {
   attribute (double or AutoKeyword) line;
   [SetterThrows]
   attribute LineAlignSetting lineAlign;
   [SetterThrows]
   attribute long position;
   [SetterThrows]
   attribute PositionAlignSetting positionAlign;
   [SetterThrows]
-  attribute long size;
+  attribute double size;
   attribute AlignSetting align;
   attribute DOMString text;
   DocumentFragment getCueAsHTML();
 };
 
 // Mozilla extensions.
 partial interface VTTCue {
   [ChromeOnly]