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

Side by Side Diff: LayoutTests/fast/block/float/float-mark-descendants-for-layout-crash.html

Issue 195363007: Avoid unnecessary descents into nested boxes with floats. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 8 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 <script>
3 if (window.testRunner) {
4 testRunner.waitUntilDone();
5 testRunner.dumpAsText();
6 }
7 </script>
8 <style>
9 .c7 { float: right; }
10 .c8:nth-last-of-type(2n+1) { float: right;}
11 </style>
12 <script>
13 // This test will crash if we leave stale floats in a child's descendants.
14 var nodes = Array();
15 function reference(domNode) {
16 this.domNode = domNode;
17 }
18 function walk(a, currentPrefix, index, domNode) {
19 if(domNode == null)
20 return;
21 newPrefix = currentPrefix + "_" + index;
22 a[newPrefix] = new reference(domNode);
23 }
24 function clear() {
25 var a = new Array();
26 walk(a, "", 0, document.documentElement);
27 for(key in a) {
28 a[key].domNode.parentNode.removeChild(a[key].domNode);
29 }
30 if (window.testRunner)
31 testRunner.notifyDone();
32 }
33 function boom() {
34 nodes[0] = document.createElement('meter');
35 nodes[0].setAttribute('class', 'c7');
36 document.documentElement.appendChild(nodes[0]);
37 nodes[58] = document.createElement('br');
38 document.documentElement.appendChild(nodes[58]);
39 nodes[63] = document.createElement('h1');
40 nodes[63].setAttribute('class', 'c8');
41 document.documentElement.appendChild(nodes[63]);
42 nodes[66] = document.createElement('iframe');
43 nodes[66].setAttribute('srcdoc', '');
44 document.documentElement.appendChild(nodes[66]);
45 nodes[72] = document.createElement('sup');
46 nodes[72].setAttribute('class', 'c7');
47 document.documentElement.appendChild(nodes[72]);
48 setTimeout('clear();', 700);
Julien - ping for review 2014/04/25 20:22:28 Do we really need a 700ms sleep. Usually forcing a
49 }
Julien - ping for review 2014/04/25 20:22:28 Let's have something in the output that says what
50 window.onload = boom;
51 </script>
52
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698