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

Unified 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: s/enclosingLayer/hasLayer|layer/ 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 side-by-side diff with in-line comments
Download patch
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..2be73f1e050284afae3a60b2204daf8667fe4e11
--- /dev/null
+++ b/LayoutTests/fast/repaint/scrollbar-damage-and-full-viewport-repaint.html
@@ -0,0 +1,42 @@
+<!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>
+<div style="height: 30">
+Passes if the result repaint rects contain the horizontal scrollbar but not the vertical scrollbar.
+</div>
Julien - ping for review 2014/08/01 19:05:01 Let's add a description of *what* we are testing.
Xianzhu 2014/08/01 22:07:23 Done.
+<div id="container">
+ <div id="child"></div>
+</div>

Powered by Google App Engine
This is Rietveld 408576698