Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to fix incremental_trailing_whitespace_a.html #14285

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Try to fix incremental_trailing_whitespace_a.html

This includes w3c/wptrunner#219
  • Loading branch information
emilio committed Nov 19, 2016
commit cfca049753f732282a9e85e7c4e54f1dad565df9
@@ -6,7 +6,8 @@
callback = arguments[arguments.length - 1];

function check_done() {
if (!document.body.classList.contains('reftest-wait')) {
if (!document.body.classList.contains('reftest-wait') &&
!document.documentElement.classList.contains('reftest-wait')) {
callback();
} else {
setTimeout(check_done, 50);
@@ -1,9 +1,10 @@
<!doctype html>
<html>
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<title>incremental trailing whitespace test</title>
<link rel="match" href="incremental_trailing_whitespace_ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
#a {
border: 0 solid;
@@ -20,8 +21,14 @@
</div>
<script>
document.body.offsetWidth; // force layout
document.querySelector('#a').classList.add('go');
// FIXME (#10245): Wait for the "transitionend" event.
var div = document.getElementById('a');
div.addEventListener('transitionend', function() {
// FIXME(emilio, #13865): requestAnimationFrame shouldn't be needed.
requestAnimationFrame(function() {
document.documentElement.classList.remove('reftest-wait');
});
});
div.classList.add('go');
</script>
</body>
</html>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.