[webkit-dev] Using ref tests for repaint bugs

Andrei Bucur andrei.bucur at gmail.com
Thu May 24 06:34:21 PDT 2012

Hello WebKittens,

I'm trying to simplify the patch for a certain repaint bug (
https://bugs.webkit.org/show_bug.cgi?id=59863 ) by using ref tests instead
of pixel tests.

The test HTML file should first render the document in state 1 and then, by
modifying the DOM, render it again state 2. The bug appears when repainting
from state 1 to state 2. The expected result HTML for the test is just a
document directly written in state 2 (so there is no transition, no bug).
This should work on all the platforms but there's problem with the time
control between paints for state 1 and state 2 in the test HTML. I've tried
three options:
1. Use setTimeout() to update the DOM -> I really wouldn't like to use this
because it slows down the test and can be flaky.
2. Use layoutTestController.display() before modifying the DOM to trigger a
paint -> calling this seems to make the test fail because display() starts
tracking the paint rects which doesn't happen in the reference document.
3. Make use of requestAnimationFrame to time the paintings for state 1 and
state 2 -> doesn't work directly out-of-the-box because
requestAnimationFrame schedules a full repaint after going into state 2 and
the bug doesn't reproduce anymore.

Is there a preferred solution to this problem or another one that I'm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120524/a34ccfc4/attachment.html>

More information about the webkit-dev mailing list