Bug 1276130 - part1 : replace the value 'middle' with 'center. r=rillian,smaug
☠☠ backed out by dafb7a602e10 ☠ ☠
authorAlastor Wu <alwu@mozilla.com>
Tue, 14 Jun 2016 14:39:29 +0100
changeset 301761 5ad647bf57273684fdc5a5605aff7699f36bab0e
parent 301760 356b91412494095594483a2386a15a5a6919f9f3
child 301762 bb5ef5c3c8ac04b9bc817f181bc1f2a9e8b73758
push id78443
push useralwu@mozilla.com
push dateTue, 14 Jun 2016 13:46:34 +0000
treeherdermozilla-inbound@212533217731 [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",