Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(395)

Side by Side Diff: LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint.html

Issue 403593005: Clear scrollbar damages in time (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 /* To ensure full viewport repaint when viewport is resized. */
4 body {
5 background-image: linear-gradient(red, blue);
6 background-attachment: fixed;
7 }
8 #container {
9 width: 200px;
10 height: 200px;
11 border: 1px solid black;
12 overflow: scroll;
13 }
14 #child {
15 width: 100px;
16 height: 100px;
17 }
18 </style>
19 <script src="resources/text-based-repaint.js" type="text/javascript"></script>
20 <script>
21 if (window.testRunner) {
22 testRunner.useUnfortunateSynchronousResizeMode();
23 }
24 function repaintTest() {
25 // Invalidation of horizontal scrollbar should be tracked.
26 document.getElementById('child').style.width = '2000px';
27 }
28 window.onload = function() {
29 // Trigger a full viewport repaint to test if scrollbar damages are cleared
30 // even if we shortcut children invalidations.
31 window.resizeTo(1000, 600);
32 // Invalidation of vertical scrollbar before the repaint test should not be tracked during repaintTest().
33 document.getElementById('child').style.height = '2000px';
34 runRepaintTest();
35 };
36 </script>
37 <!-- Passes if the result repaint rects contain the horizontal scrollbar but not the vertical scrollbar. -->
38 <div id="container">
39 <div id="child"></div>
40 </div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698