Backed out changeset 3f17eaa46dd9 (bug 1276130)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 14 Jun 2016 14:33:12 +0200
changeset 341792 58641c44fc7f5f03ede954ad96eac80d66978cdd
parent 341791 3b87112d3f96715bac0c8cab6acbad0276e59ca4
child 341793 76cffbe704e27cf82cf062aa2ef5f385966224ed
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)
bugs1276130
milestone50.0a1
backs out3f17eaa46dd91532fa3399d7c31af43d45f3bdec
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
Backed out changeset 3f17eaa46dd9 (bug 1276130)
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::Center;
+  mAlign = AlignSetting::Middle;
   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", "center", "end", "left", "right"]);
+          settings.alt(k, v, ["start", "middle", "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", "center");
+      cue.align = settings.get("align", "middle");
       cue.position = settings.get("position", "auto");
       cue.positionAlign = settings.get("positionAlign", "center");
     }
 
     function skipWhitespace() {
       input = input.replace(/^\s+/, "");
     }
 
@@ -725,20 +725,21 @@ 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.
+    // div. Note, all WebVTT cue-setting alignments are equivalent to the CSS
+    // mirrors of them except "middle" which is "center" in CSS.
     this.div = window.document.createElement("div");
     styles = {
-      textAlign: cue.align,
+      textAlign: cue.align === "middle" ? "center" : 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",
-  "center",
+  "middle",
   "end",
   "left",
   "right"
 };
 
 enum DirectionSetting {
   "",
   "rl",