| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 #container { | 3 #container { |
| 4 width: 200px; | 4 width: 200px; |
| 5 } | 5 } |
| 6 #inner { | 6 #inner { |
| 7 position: relative; | 7 position: relative; |
| 8 top: -3px; | 8 top: -3px; |
| 9 } | 9 } |
| 10 </style> | 10 </style> |
| 11 <script src="../../resources/js-test.js"></script> | 11 <script src="../../resources/js-test.js"></script> |
| 12 <script> | 12 <script> |
| 13 description('When adding focus ring rects, we should avoid adding line box rects
of recursive inlines repeatedly'); | 13 description('When adding focus ring rects, we should avoid adding line box rects
of recursive inlines repeatedly'); |
| 14 onload = function() { | 14 onload = function() { |
| 15 document.body.offsetTop; | 15 document.body.offsetTop; |
| 16 // 5 focus ring rects: | 16 // 5 focus ring rects: |
| 17 // - 0-2: line boxes of the focused span; | 17 // - 0-2: line boxes of the focused span; |
| 18 // - 3: the inner block | 18 // - 3: the inner block |
| 19 // - 4: root line box of the inner block | 19 // - 4: root line box of the inner block |
| 20 if (window.testRunner && window.internals) | 20 if (window.testRunner && window.internals) |
| 21 shouldBe("internals.focusRingRects(document.getElementById('focus')).length"
, "5"); | 21 shouldBe("internals.outlineRects(document.getElementById('focus')).length",
"5"); |
| 22 }; | 22 }; |
| 23 </script> | 23 </script> |
| 24 <div id="container"> | 24 <div id="container"> |
| 25 <span id="focus"> | 25 <span id="focus"> |
| 26 <b><b><b><i><i><i>INLINE</i></i> <i><i>TEXT</i></i> | 26 <b><b><b><i><i><i>INLINE</i></i> <i><i>TEXT</i></i> |
| 27 <div id="inner"><b><b>BLOCK</b> <i>CONTENTS</i></b></div> | 27 <div id="inner"><b><b>BLOCK</b> <i>CONTENTS</i></b></div> |
| 28 </i></b></b></b> | 28 </i></b></b></b> |
| 29 </span> | 29 </span> |
| 30 </div> | 30 </div> |
| OLD | NEW |