Bug 1276830 - part2 : modift LineAlignSetting value in vtt.jsm. draft
authorAlastor Wu <alwu@mozilla.com>
Mon, 06 Jun 2016 09:53:24 +0800
changeset 375518 399b22b52336e8a544cffa571d7f180b76192131
parent 375517 147c111b1975aa011f537d6eed37c9de83a97ee7
child 375519 dc819cae662bec13f7b37c877915acb35f0ef4d5
child 375520 6e3a6b15b5d672192ab5fe96d7d14040f072132c
push id20294
push useralwu@mozilla.com
push dateMon, 06 Jun 2016 02:01:47 +0000
bugs1276830
milestone49.0a1
Bug 1276830 - part2 : modift LineAlignSetting value in vtt.jsm. MozReview-Commit-ID: FlKbht9uklN
dom/media/webvtt/vtt.jsm
--- a/dom/media/webvtt/vtt.jsm
+++ b/dom/media/webvtt/vtt.jsm
@@ -199,17 +199,17 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
           break;
         case "line":
           var vals = v.split(","),
               vals0 = vals[0];
           settings.integer(k, vals0);
           settings.percent(k, vals0) ? settings.set("snapToLines", false) : null;
           settings.alt(k, vals0, ["auto"]);
           if (vals.length === 2) {
-            settings.alt("lineAlign", vals[1], ["start", "middle", "end"]);
+            settings.alt("lineAlign", vals[1], ["start", "center", "end"]);
           }
           break;
         case "position":
           vals = v.split(",");
           settings.percent(k, vals[0]);
           if (vals.length === 2) {
             settings.alt("positionAlign", vals[1], ["line-left", "center", "line-right", "auto"]);
           }
@@ -1071,17 +1071,17 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
       // position.
       boxPosition.move(initialAxis, position);
 
     } else {
       // If we have a percentage line value for the cue.
       var calculatedPercentage = (boxPosition.lineHeight / containerBox.height) * 100;
 
       switch (cue.lineAlign) {
-      case "middle":
+      case "center":
         linePos -= (calculatedPercentage / 2);
         break;
       case "end":
         linePos -= calculatedPercentage;
         break;
       }
 
       // Apply initial line position to the cue box.