mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 09:54:42 +00:00
Backed out 4 changesets (bug 1318542) for xpcshell and mochitest failures
Backed out changeset c92af084fbfa (bug 1318542) Backed out changeset 14e0332a1b84 (bug 1318542) Backed out changeset 8ca158aca790 (bug 1318542) Backed out changeset 57efe450b180 (bug 1318542)
This commit is contained in:
parent
2baa0a9e9f
commit
c16160a194
@ -1700,28 +1700,6 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
}
|
||||
}
|
||||
|
||||
// Pseudo-elements implemented by JS must have the NODE_IS_NATIVE_ANONYMOUS
|
||||
// flag set on them. For C++-created pseudo-elements, this is done in
|
||||
// nsCSSFrameConstructor::GetAnonymousContent, but any JS that creates
|
||||
// pseudo-elements would run after that. So we set that flag here,
|
||||
// when the element implementing the pseudo is inserted into the document.
|
||||
// We maintain the invariant that any NAC-implemented pseudo-element's
|
||||
// anonymous ancestors are also flagged as NAC, which the style system relies on.
|
||||
if (aDocument) {
|
||||
CSSPseudoElementType pseudoType = GetPseudoElementType();
|
||||
if (pseudoType != CSSPseudoElementType::NotPseudo &&
|
||||
nsCSSPseudoElements::PseudoElementIsJSCreatedNAC(pseudoType)) {
|
||||
SetFlags(NODE_IS_NATIVE_ANONYMOUS);
|
||||
nsIContent* parent = aParent;
|
||||
while (parent && !parent->IsRootOfNativeAnonymousSubtree()) {
|
||||
MOZ_ASSERT(parent->IsInNativeAnonymousSubtree());
|
||||
parent->SetFlags(NODE_IS_NATIVE_ANONYMOUS);
|
||||
parent = parent->GetParent();
|
||||
}
|
||||
MOZ_ASSERT(parent);
|
||||
}
|
||||
}
|
||||
|
||||
// XXXbz script execution during binding can trigger some of these
|
||||
// postcondition asserts.... But we do want that, since things will
|
||||
// generally be quite broken when that happens.
|
||||
|
@ -28,8 +28,6 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
|
||||
|
||||
var Cu = Components.utils;
|
||||
Cu.import('resource://gre/modules/Services.jsm');
|
||||
const { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
(function(global) {
|
||||
|
||||
@ -384,13 +382,9 @@ const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
|
||||
return hours + ':' + minutes + ':' + seconds + '.' + f;
|
||||
}
|
||||
|
||||
var isFirefoxSupportPseudo = (/firefox/i.test(window.navigator.userAgent))
|
||||
&& Services.prefs.getBoolPref("media.webvtt.pseudo.enabled");
|
||||
var root;
|
||||
if (bReturnFrag) {
|
||||
root = window.document.createDocumentFragment();
|
||||
} else if (isFirefoxSupportPseudo) {
|
||||
root = window.document.createElement("div", {pseudo: "::cue"});
|
||||
} else {
|
||||
root = window.document.createElement("div");
|
||||
}
|
||||
@ -470,17 +464,11 @@ const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
|
||||
return val === 0 ? 0 : val + unit;
|
||||
};
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(StyleBox.prototype, "supportPseudo",
|
||||
"media.webvtt.pseudo.enabled", false);
|
||||
|
||||
// Constructs the computed display state of the cue (a div). Places the div
|
||||
// into the overlay which should be a block level element (usually a div).
|
||||
function CueStyleBox(window, cue, styleOptions) {
|
||||
var isIE8 = (typeof navigator !== "undefined") &&
|
||||
(/MSIE\s8\.0/).test(navigator.userAgent);
|
||||
|
||||
var isFirefoxSupportPseudo = (/firefox/i.test(window.navigator.userAgent))
|
||||
&& this.supportPseudo;
|
||||
var color = "rgba(255, 255, 255, 1)";
|
||||
var backgroundColor = "rgba(0, 0, 0, 0.8)";
|
||||
|
||||
@ -498,16 +486,13 @@ const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
|
||||
var styles = {
|
||||
color: color,
|
||||
backgroundColor: backgroundColor,
|
||||
display: "inline",
|
||||
font: styleOptions.font,
|
||||
whiteSpace: "pre-line",
|
||||
position: "relative",
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 0,
|
||||
bottom: 0,
|
||||
display: "inline"
|
||||
};
|
||||
if (isFirefoxSupportPseudo) {
|
||||
delete styles.color;
|
||||
delete styles.backgroundColor;
|
||||
delete styles.font;
|
||||
delete styles.whiteSpace;
|
||||
}
|
||||
|
||||
if (!isIE8) {
|
||||
styles.writingMode = cue.vertical === "" ? "horizontal-tb"
|
||||
@ -519,12 +504,13 @@ const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
// Create an absolutely positioned div that will be used to position the cue
|
||||
// div.
|
||||
styles = {
|
||||
position: "absolute",
|
||||
textAlign: cue.align,
|
||||
};
|
||||
|
||||
this.div = window.document.createElement("div");
|
||||
styles = {
|
||||
textAlign: cue.align,
|
||||
font: styleOptions.font,
|
||||
whiteSpace: "pre-line",
|
||||
position: "absolute"
|
||||
};
|
||||
this.applyStyles(styles);
|
||||
|
||||
this.div.appendChild(this.cueDiv);
|
||||
@ -972,7 +958,6 @@ 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");
|
||||
paddedOverlay.appendChild(styleBox.div);
|
||||
|
||||
// Move the cue div to it's correct line position.
|
||||
|
@ -30,9 +30,6 @@ CSS_PSEUDO_ELEMENT(before, ":before", CSS_PSEUDO_ELEMENT_IS_CSS2)
|
||||
|
||||
CSS_PSEUDO_ELEMENT(backdrop, ":backdrop", 0)
|
||||
|
||||
CSS_PSEUDO_ELEMENT(cue, ":cue", CSS_PSEUDO_ELEMENT_IS_JS_CREATED_NAC |
|
||||
CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE)
|
||||
|
||||
CSS_PSEUDO_ELEMENT(firstLetter, ":first-letter",
|
||||
CSS_PSEUDO_ELEMENT_IS_CSS2 |
|
||||
CSS_PSEUDO_ELEMENT_CONTAINS_ELEMENTS)
|
||||
|
@ -776,14 +776,6 @@ video > .caption-box {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ::cue default settings */
|
||||
::cue {
|
||||
color: rgba(255, 255, 255, 1);
|
||||
white-space: pre-line;
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
font: var(--cue-font-size) sans-serif;
|
||||
}
|
||||
|
||||
/* datetime elements */
|
||||
|
||||
input[type="time"] > xul|datetimebox {
|
||||
|
@ -545,9 +545,6 @@ pref("media.getusermedia.audiocapture.enabled", false);
|
||||
// TextTrack WebVTT Region extension support.
|
||||
pref("media.webvtt.regions.enabled", false);
|
||||
|
||||
// WebVTT pseudo element and class support.
|
||||
pref("media.webvtt.pseudo.enabled", true);
|
||||
|
||||
// AudioTrack and VideoTrack support
|
||||
pref("media.track.enabled", false);
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
[3_tracks.html]
|
||||
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1318542
|
||||
type: reftest
|
||||
expected: FAIL
|
||||
|
Loading…
Reference in New Issue
Block a user