gecko-dev/testing/web-platform/tests/fullscreen/rendering/fullscreen-css-transition.html
Rune Lillesveen 7c862efcb0 Bug 1506886 [wpt PR 14034] - Keep animations running going to/from fullscreen., a=testonly
Automatic update from web-platform-testsKeep animations running going to/from fullscreen.

LazyReattachIfAttached() nukes the computed styles synchronously so that
we are not able to keep animations alive for the next lifecycle update.
Add a bit on Node to say that we need a forced layout tree reattach and
trigger the re-attach from style recalc instead.

Bug: 900162
Change-Id: I22f51f5e091932fc8a63213af88903c7866abbb4
Reviewed-on: https://chromium-review.googlesource.com/c/1333809
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608530}

--

wpt-commits: 9fcbfa0a6c02e373780f897dcf5282907180e49a
wpt-pr: 14034
2018-11-21 13:59:10 +00:00

27 lines
891 B
HTML

<!DOCTYPE html>
<title>Transitions should not be stopped by going fullscreen</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
#trans {
transition: color steps(1, end) 100s;
color: green;
}
</style>
<div id="trans">Should be green</div>
<script>
async_test(t => {
document.onfullscreenchange = t.step_func_done(() => {
assert_equals(document.fullscreenElement, trans);
assert_equals(getComputedStyle(trans).color, "rgb(0, 128, 0)", "Transition is in progress - still green");
});
trans.addEventListener('click', e => {
trans.style.color = "red";
trans.offsetTop;
trans.requestFullscreen();
}, {once: true});
test_driver.click(trans);
});
</script>