Bug 1276130 - part1 : replace the value 'middle' with 'center. r=rillian,smaug
☠☠ backed out by 58641c44fc7f ☠ ☠
authorAlastor Wu <alwu@mozilla.com>
Tue, 14 Jun 2016 12:11:53 +0100
changeset 341778 3f17eaa46dd91532fa3399d7c31af43d45f3bdec
parent 341777 5318dac723e38ebc93c5ba9263ef4d93ad54ddd7
child 341779 eb956a4232b0eab0e71535a1bfbc3dbcf40e482a
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: HVrExS6nNZA
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()
 {
   mPositionIsAutoKeyword = true;
   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", "auto");
       cue.positionAlign = settings.get("positionAlign", "center");
     }
 
     function skipWhitespace() {
       input = input.replace(/^\s+/, "");
     }
 
@@ -725,21 +725,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",