Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 | 2 |
| 3 <head> | 3 <head> |
| 4 <script> | 4 <script> |
| 5 function test() { | 5 function test() { |
| 6 if(window.testRunner) | 6 if (window.testRunner) { |
| 7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
| 8 | 8 } |
| 9 | |
| 9 var textnode1 = document.getElementById("node").firstChild; | 10 var textnode1 = document.getElementById("node").firstChild; |
| 10 var textnode2 = textnode1.splitText(3); | 11 var textnode2 = textnode1.splitText(3); |
| 11 textnode2.nodeValue = ""; | 12 textnode2.nodeValue = ""; |
| 12 | 13 |
| 13 var root = document.body; | 14 var root = document.body; |
| 14 var it = document.createNodeIterator(root, NodeFilter.SHOW_ELEMENT, NodeFilt er.FILTER_ACCEPT, false); | 15 var it = document.createNodeIterator(root, NodeFilter.SHOW_ELEMENT, NodeFilt er.FILTER_ACCEPT, false); |
| 15 | 16 |
| 16 var n = it.nextNode(); | 17 var n = it.nextNode(); |
| 17 while(n) { | 18 while(n) { |
| 18 n = it.nextNode(); | 19 n = it.nextNode(); |
| 19 } | 20 } |
| 20 | 21 |
| 21 var text = document.getElementById("node").innerText; | 22 var text = document.getElementById("node").innerText; |
| 22 } | 23 } |
| 23 </script> | 24 </script> |
| 24 </head> | 25 </head> |
| 25 | 26 |
| 26 <body onload="test();"> | 27 <body onload="test();"> |
| 27 <p>If a zero lengthed render object (such as a text node that has been set to "" ) occured at the end of a line, it was previously given a non-zero sized run.</p > | 28 <p>If a zero-length render object (such as a text node that has been set |
| 28 <p>A crash would occur on iteration over a node containing such a run. NodeIter ators, the innerText property, and hovering over a link all use iteration.</p> | 29 to "") occurred at the end of a line, it was previously given a non-zero |
|
qyearsley
2016/07/27 17:48:12
This spelling correction (and the change above) sh
| |
| 29 <p>This tests iteration using both the innerText property and NodeIterators. It is successful if it doesn't crash Safari.</p> | 30 sized run.</p> |
| 31 <p>A crash would occur on iteration over a node containing such a run. | |
| 32 NodeIterators, the innerText property, and hovering over a link all | |
| 33 use iteration.</p> | |
| 34 <p>This tests iteration using both the innerText property and | |
| 35 NodeIterators. It is successful if it doesn't crash Safari.</p> | |
| 30 <hr> | 36 <hr> |
| 31 <a href="#" id="node">hello</a></body></html> | 37 <a href="#" id="node">hello</a></body></html> |
| OLD | NEW |