Backed out changeset 5ad647bf5727 (bug 1276130) for web-platform-test failure invttcue-interface/align.html. r=backout

This commit is contained in:
Sebastian Hengst 2016-06-14 17:21:02 +02:00
parent 639bb51f2a
commit 37bd76ddd9
3 changed files with 7 additions and 6 deletions

View File

@ -39,7 +39,7 @@ TextTrackCue::SetDefaultCueSettings()
mPauseOnExit = false;
mSnapToLines = true;
mLineIsAutoKeyword = true;
mAlign = AlignSetting::Center;
mAlign = AlignSetting::Middle;
mLineAlign = LineAlignSetting::Start;
mVertical = DirectionSetting::_empty;
mActive = false;

View File

@ -218,7 +218,7 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
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/);
@ -230,7 +230,7 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
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,
@ -736,10 +736,11 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
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"

View File

@ -24,7 +24,7 @@ enum PositionAlignSetting {
enum AlignSetting {
"start",
"center",
"middle",
"end",
"left",
"right"