Skip to content

Commit

Permalink
Backed out 9 changesets (bug 1353689) for web platform reftest failures
Browse files Browse the repository at this point in the history
Backed out changeset 80ac3ea1427e (bug 1353689)
Backed out changeset 9a5b36fefb22 (bug 1353689)
Backed out changeset 44c5f4b4cdfc (bug 1353689)
Backed out changeset 7f2790b4c963 (bug 1353689)
Backed out changeset 8d8d2824a763 (bug 1353689)
Backed out changeset d3ced5751998 (bug 1353689)
Backed out changeset 5179ebf1e982 (bug 1353689)
Backed out changeset ebf24732e9b3 (bug 1353689)
Backed out changeset e81924e4cff3 (bug 1353689)
  • Loading branch information
IrisHsiao committed Apr 21, 2017
1 parent d457e48 commit 7aacf33
Show file tree
Hide file tree
Showing 125 changed files with 46 additions and 321 deletions.
36 changes: 15 additions & 21 deletions dom/media/webvtt/vtt.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
styles = {
position: "absolute",
textAlign: cue.align,
font: styleOptions.font,
};

this.div = window.document.createElement("div");
Expand All @@ -533,24 +532,17 @@ const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
// Calculate the distance from the reference edge of the viewport to the text
// position of the cue box. The reference edge will be resolved later when
// the box orientation styles are applied.
function convertCuePostionToPercentage(cuePosition) {
if (cuePosition === "auto") {
return 50;
}
return cuePosition;
}
var textPos = 0;
let postionPercentage = convertCuePostionToPercentage(cue.position);
switch (cue.computedPositionAlign) {
// TODO : modify these fomula to follow the spec, see bug 1277437.
case "line-left":
textPos = postionPercentage;
textPos = cue.position;
break;
case "center":
textPos = postionPercentage - (cue.size / 2);
textPos = cue.position - (cue.size / 2);
break;
case "line-right":
textPos = postionPercentage - cue.size;
textPos = cue.position - cue.size;
break;
}

Expand Down Expand Up @@ -901,6 +893,7 @@ const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");

var FONT_SIZE_PERCENT = 0.05;
var FONT_STYLE = "sans-serif";
var CUE_BACKGROUND_PADDING = "1.5%";

// Runs the processing model over the cues and regions passed to it.
// @param overlay A block level element (usually a div) that the computed cues
Expand All @@ -926,13 +919,14 @@ const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
controlBarShown = controlBar ? !!controlBar.clientHeight : false;
}

var rootOfCues = window.document.createElement("div");
rootOfCues.style.position = "absolute";
rootOfCues.style.left = "0";
rootOfCues.style.right = "0";
rootOfCues.style.top = "0";
rootOfCues.style.bottom = "0";
overlay.appendChild(rootOfCues);
var paddedOverlay = window.document.createElement("div");
paddedOverlay.style.position = "absolute";
paddedOverlay.style.left = "0";
paddedOverlay.style.right = "0";
paddedOverlay.style.top = "0";
paddedOverlay.style.bottom = "0";
paddedOverlay.style.margin = CUE_BACKGROUND_PADDING;
overlay.appendChild(paddedOverlay);

// Determine if we need to compute the display states of the cues. This could
// be the case if a cue's state has been changed since the last computation or
Expand All @@ -953,13 +947,13 @@ const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
// We don't need to recompute the cues' display states. Just reuse them.
if (!shouldCompute(cues)) {
for (var i = 0; i < cues.length; i++) {
rootOfCues.appendChild(cues[i].displayState);
paddedOverlay.appendChild(cues[i].displayState);
}
return;
}

var boxPositions = [],
containerBox = BoxPosition.getSimpleBoxPosition(rootOfCues),
containerBox = BoxPosition.getSimpleBoxPosition(paddedOverlay),
fontSize = Math.round(containerBox.height * FONT_SIZE_PERCENT * 100) / 100;
var styleOptions = {
font: fontSize + "px " + FONT_STYLE
Expand All @@ -979,7 +973,7 @@ const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
// Compute the intial position and styles of the cue div.
styleBox = new CueStyleBox(window, cue, styleOptions);
styleBox.cueDiv.style.setProperty("--cue-font-size", fontSize + "px");
rootOfCues.appendChild(styleBox.div);
paddedOverlay.appendChild(styleBox.div);

// Move the cue div to it's correct line position.
moveBoxToLinePosition(window, styleBox, containerBox, boxPositions);
Expand Down
1 change: 1 addition & 0 deletions layout/style/res/html.css
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ video > .caption-box {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
}

/* ::cue default settings */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[2_tracks.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1318542
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[class_color.html]
[align_middle.html]
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[background_properties.html]
[align_middle_position_50.html]
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[basic.html]
type: reftest
disabled:
if os == "linux": https://bugzilla.mozilla.org/show_bug.cgi?id=1142501
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[color_hex.html]
[bidi_ruby.html]
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[bold_color.html]
[u0041_first.html]
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[u05D0_first.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[u0628_first.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[bold_font_shorthand.html]
[u06E9_no_strong_dir.html]
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[single_quote.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[id_color.html]
[size_90.html]
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[color_hsla.html]
[size_99.html]
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[line_0_is_top.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[repaint.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1332564
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[bold_with_class.html]
[font_properties.html]
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[font_shorthand.html]
type: reftest
expected: FAIL

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[white-space_pre-wrap_wrapped.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected:
if debug and not e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): PASS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[white-space_pre_wrapped.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected:
if debug and not e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): PASS
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[bold_transition_with_timestamp.html]
type: reftest
expected: FAIL
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1288648
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[bold_white-space_normal_wrapped.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[bold_white-space_pre-line_wrapped.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected: FAIL

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[class_white-space_normal_wrapped.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[class_white-space_pre-line_wrapped.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected: FAIL

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[italic_white-space_normal_wrapped.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected: FAIL
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[italic_white-space_pre-line_wrapped.html]
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1353689
type: reftest
expected: FAIL
Loading

0 comments on commit 7aacf33

Please sign in to comment.