| Index: LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint.html
|
| diff --git a/LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint.html b/LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f316a383c199e337f3457bff82daf755b95fd2e2
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint.html
|
| @@ -0,0 +1,40 @@
|
| +<!DOCTYPE html>
|
| +<style>
|
| +/* To ensure full viewport repaint when viewport is resized. */
|
| +body {
|
| + background-image: linear-gradient(red, blue);
|
| + background-attachment: fixed;
|
| +}
|
| +#container {
|
| + width: 200px;
|
| + height: 200px;
|
| + border: 1px solid black;
|
| + overflow: scroll;
|
| +}
|
| +#child {
|
| + width: 100px;
|
| + height: 100px;
|
| +}
|
| +</style>
|
| +<script src="resources/text-based-repaint.js" type="text/javascript"></script>
|
| +<script>
|
| +if (window.testRunner) {
|
| + testRunner.useUnfortunateSynchronousResizeMode();
|
| +}
|
| +function repaintTest() {
|
| + // Invalidation of horizontal scrollbar should be tracked.
|
| + document.getElementById('child').style.width = '2000px';
|
| +}
|
| +window.onload = function() {
|
| + // Trigger a full viewport repaint to test if scrollbar damages are cleared
|
| + // even if we shortcut children invalidations.
|
| + window.resizeTo(1000, 600);
|
| + // Invalidation of vertical scrollbar before the repaint test should not be tracked during repaintTest().
|
| + document.getElementById('child').style.height = '2000px';
|
| + runRepaintTest();
|
| +};
|
| +</script>
|
| +<!-- Passes if the result repaint rects contain the horizontal scrollbar but not the vertical scrollbar. -->
|
| +<div id="container">
|
| + <div id="child"></div>
|
| +</div>
|
|
|