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

Side by Side Diff: LayoutTests/fast/events/overflowchanged-event-raf-timing.html

Issue 959643002: Remove the overflowchanged event with a runtime flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tests Created 5 years, 10 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 #scrollable { overflow: auto; height: 100px; width: 100px; }
4 #inside.scroll { height: 2000px; }
5 </style>
6
7 <p>Tests that overflowchanged events are deferred until raf.</p>
8
9 <div id="scrollable">
10 <div id="inside"></div>
11 </div>
12
13 <div id="output"></div>
14
15 <script>
16 var scrollable = document.getElementById('scrollable');
17 var output = document.getElementById('output');
18 var inside = document.getElementById('inside');
19
20 if (window.testRunner) {
21 testRunner.dumpAsText();
22 testRunner.waitUntilDone();
23 }
24
25 function log(text)
26 {
27 output.appendChild(document.createElement('div')).textContent = text;
28 }
29
30 onload = function() {
31 scrollable.addEventListener('overflowchanged', function() {
32 log('overflowchanged');
33 });
34
35 document.body.offsetTop;
36
37 inside.classList.toggle('scroll');
38 document.body.offsetTop;
39 log('layout');
40
41 inside.classList.toggle('scroll');
42 document.body.offsetTop;
43 log('layout');
44
45 inside.classList.toggle('scroll');
46 document.body.offsetTop;
47 log('layout');
48
49 requestAnimationFrame(function() {
50 log('requestAnimationFrame');
51 if (window.testRunner)
52 testRunner.notifyDone();
53 });
54 }
55 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698