Bug 1415596 - Make click to play button transparent when status overlay is present on video controls. r=jaws

MozReview-Commit-ID: 6xweGJQoR6R

--HG--
extra : rebase_source : e53a93c32acbbbc43abbb0ba6f8ff0ad34a5ec85
This commit is contained in:
Ray Lin 2017-11-12 23:18:03 +08:00
parent 397625f1ca
commit f058f3b817
3 changed files with 3 additions and 5 deletions

View File

@ -20,7 +20,6 @@
const video = document.getElementById("video");
const statusOverlay = getAnonElementWithinVideoByAttribute(video, "anonid", "statusOverlay");
const statusIcon = getAnonElementWithinVideoByAttribute(video, "anonid", "statusIcon");
const clickToPlay = getAnonElementWithinVideoByAttribute(video, "anonid", "clickToPlay");
add_task(async function setup() {
await new Promise(resolve => window.addEventListener("load", resolve, {once: true}));
@ -46,7 +45,6 @@
video.addEventListener("error", () => SimpleTest.executeSoon(resolve));
});
ok(clickToPlay.hasAttribute("hidden"), `click to play button should hide`);
ok(!statusOverlay.hidden, `statusOverlay should show when ${errorType}`);
is(statusOverlay.getAttribute("error"), errorType, `statusOverlay should have correct error state: ${errorType}`);
is(statusIcon.getAttribute("type"), "error", `should show error icon when ${errorType}`);

View File

@ -1740,8 +1740,7 @@
(clickToPlayScaledSize + this.controlBarMinHeight / 2 >= videoHeight / 2 )) {
this.clickToPlay.hideByAdjustment = true;
} else {
if (this.clickToPlay.hidden && !this.video.played.length &&
this.video.paused && this.clickToPlay.hideByAdjustment) {
if (this.clickToPlay.hidden && !this.video.played.length && this.video.paused) {
this.clickToPlay.hideByAdjustment = false;
}
this.clickToPlay.style.width = `${clickToPlayScaledSize}px`;

View File

@ -438,7 +438,8 @@ audio > xul|videocontrols {
transition-duration: 300ms;
transition-delay: 750ms;
}
.statusOverlay[fadeout] {
.statusOverlay[fadeout],
.statusOverlay[error] + .controlsOverlay > .controlsSpacerStack {
opacity: 0;
}