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

Side by Side Diff: LayoutTests/fast/repaint/iframe-throttling-unthrottled.html

Issue 1246173002: Throttle rendering pipeline for invisible iframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add layout tests. Created 5 years, 3 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 <!-- Check that a throttled iframe repaints itself when scrolled into view. -->
3 <style>
4 #frame
5 {
6 position: absolute;
7 top: 2000px;
8 }
9 </style>
10
11 <script src="resources/text-based-repaint.js"></script>
12 <script>
13 window.testIsAsync = true;
14
15 function repaintTest()
16 {
17 var frame = document.querySelector('#frame');
18 frame.scrollIntoView();
19 // The first animation frame after this one updates the scroll position and
20 // unthrottles the frame. The repainting of the iframe happens in the frame
21 // after that. Therefore, we must wait for two requestAnimationFrames to
22 // finish the test.
23 window.requestAnimationFrame(waitForRepaint);
24 }
25
26 function waitForRepaint()
27 {
28 window.requestAnimationFrame(finishRepaintTest);
29 }
30
31 window.addEventListener('load', runRepaintTest);
32 </script>
33
34 <!-- Use sandboxing to allow rendering pipeline throtting. -->
35 <iframe id="frame" srcdoc="<style> body { background: green; } </style>" sandbox ="" width="64" height="64"></iframe>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698