Backed out changeset 5ad647bf5727 (bug 1276130) for web-platform-test failure invttcue-interface/align.html. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 14 Jun 2016 17:21:02 +0200
changeset 341828 dafb7a602e103ca54423ac342a7fbb9ca67a813d
parent 341827 0271888ce063a91cf234ba5be97309c2be4f31df
child 341829 a28945871dbdf8021e106d0609d826b240ff6c4c
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)
reviewersbackout
bugs1276130
milestone50.0a1
backs out5ad647bf57273684fdc5a5605aff7699f36bab0e
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 5ad647bf5727 (bug 1276130) for web-platform-test failure invttcue-interface/align.html. r=backout
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::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", {
         start: 0,
         left: 0,
         middle: 50,
         end: 100,
         right: 100
       }, cue.align);
       cue.positionAlign = settings.get("positionAlign", "center");
@@ -731,20 +731,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",