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

Unified Diff: LayoutTests/paint/invalidation/animated-gif-offscreen.html

Issue 1008043002: [S.P.] Don't draw frames of animated images that are offscreen. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/paint/invalidation/animated-gif-offscreen.html
diff --git a/LayoutTests/paint/invalidation/animated-gif-offscreen.html b/LayoutTests/paint/invalidation/animated-gif-offscreen.html
new file mode 100644
index 0000000000000000000000000000000000000000..7a1974ed813c7c425fe4daae6dfaabdfac07786a
--- /dev/null
+++ b/LayoutTests/paint/invalidation/animated-gif-offscreen.html
@@ -0,0 +1,17 @@
+<!doctype HTML>
+<script src="../../fast/repaint/resources/text-based-repaint.js"></script>
+<script>
+window.testIsAsync = true;
+
+// The image should not show a repaint if offscreen if Slimming Paint is on.
+// Otherwise it should, during this 200ms waiting period.
+function repaintTest() {
+ window.scrollTo(0, 1000); // Put the image offscreen.
+ setTimeout(finishRepaintTest, 200); // The initial red frame of the GIF has a 100ms duration.
+}
+</script>
+<body onload="runRepaintTest()">
+<div style="height: 2000px; width: 2000px;">
+<image src="../../fast/backgrounds/resources/red-green-animated.gif">
+</div>
+</div>

Powered by Google App Engine
This is Rietveld 408576698