mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Backed out changeset 5ad647bf5727 (bug 1276130) for web-platform-test failure invttcue-interface/align.html. r=backout
This commit is contained in:
parent
639bb51f2a
commit
37bd76ddd9
@ -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;
|
||||
|
@ -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"
|
||||
|
@ -24,7 +24,7 @@ enum PositionAlignSetting {
|
||||
|
||||
enum AlignSetting {
|
||||
"start",
|
||||
"center",
|
||||
"middle",
|
||||
"end",
|
||||
"left",
|
||||
"right"
|
||||
|
Loading…
Reference in New Issue
Block a user