Bug 1276130 - part1 : replace the value 'middle' with 'center. r=rillian,smaug
authorAlastor Wu <alwu@mozilla.com>
Tue, 14 Jun 2016 14:39:29 +0100
changeset 341915 ab146e4b75aeb31f981cf1d80606ede34fb02ec2
parent 341914 b2eb9ae18a37c70b32ccc50f2529c3a377101eb7
child 341916 af6531f23c88cc95d2db554faf1ca2fce46340d7
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian, smaug
bugs1276130
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 1276130 - part1 : replace the value 'middle' with 'center. r=rillian,smaug MozReview-Commit-ID: 9rh32HkilYv
dom/media/TextTrackCue.cpp
dom/media/webvtt/vtt.jsm
dom/webidl/VTTCue.webidl
--- a/dom/media/TextTrackCue.cpp
+++ b/dom/media/TextTrackCue.cpp
@@ -34,17 +34,17 @@ void
 TextTrackCue::SetDefaultCueSettings()
 {
   mPosition = 50;
   mPositionAlign = PositionAlignSetting::Center;
   mSize = 100.0;
   mPauseOnExit = false;
   mSnapToLines = true;
   mLineIsAutoKeyword = true;
-  mAlign = AlignSetting::Middle;
+  mAlign = AlignSetting::Center;
   mLineAlign = LineAlignSetting::Start;
   mVertical = DirectionSetting::_empty;
   mActive = false;
 }
 
 TextTrackCue::TextTrackCue(nsPIDOMWindowInner* aOwnerWindow,
                            double aStartTime,
                            double aEndTime,
--- a/dom/media/webvtt/vtt.jsm
+++ b/dom/media/webvtt/vtt.jsm
@@ -213,29 +213,29 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
           if (vals.length === 2) {
             settings.alt("positionAlign", vals[1], ["line-left", "center", "line-right", "auto"]);
           }
           break;
         case "size":
           settings.percent(k, v);
           break;
         case "align":
-          settings.alt(k, v, ["start", "middle", "end", "left", "right"]);
+          settings.alt(k, v, ["start", "center", "end", "left", "right"]);
           break;
         }
       }, /:/, /\s/);
 
       // Apply default values for any missing fields.
       cue.region = settings.get("region", null);
       cue.vertical = settings.get("vertical", "");
       cue.line = settings.get("line", "auto");
       cue.lineAlign = settings.get("lineAlign", "start");
       cue.snapToLines = settings.get("snapToLines", true);
       cue.size = settings.get("size", 100);
-      cue.align = settings.get("align", "middle");
+      cue.align = settings.get("align", "center");
       cue.position = settings.get("position", {
         start: 0,
         left: 0,
         middle: 50,
         end: 100,
         right: 100
       }, cue.align);
       cue.positionAlign = settings.get("positionAlign", "center");
@@ -731,21 +731,20 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
       styles.writingMode = cue.vertical === "" ? "horizontal-tb"
                                                : cue.vertical === "lr" ? "vertical-lr"
                                                                        : "vertical-rl";
       styles.unicodeBidi = "plaintext";
     }
     this.applyStyles(styles, this.cueDiv);
 
     // Create an absolutely positioned div that will be used to position the cue
-    // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS
-    // mirrors of them except "middle" which is "center" in CSS.
+    // div.
     this.div = window.document.createElement("div");
     styles = {
-      textAlign: cue.align === "middle" ? "center" : cue.align,
+      textAlign: cue.align,
       font: styleOptions.font,
       whiteSpace: "pre-line",
       position: "absolute"
     };
 
     if (!isIE8) {
       styles.direction = determineBidi(this.cueDiv);
       styles.writingMode = cue.vertical === "" ? "horizontal-tb"
--- a/dom/webidl/VTTCue.webidl
+++ b/dom/webidl/VTTCue.webidl
@@ -19,17 +19,17 @@ enum PositionAlignSetting {
   "line-left",
   "center",
   "line-right",
   "auto"
 };
 
 enum AlignSetting {
   "start",
-  "middle",
+  "center",
   "end",
   "left",
   "right"
 };
 
 enum DirectionSetting {
   "",
   "rl",