| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <body style="overflow:hidden" onload="test()"> | 2 <body style="overflow:hidden" onload="test()"> |
| 3 <div id="other"> </div> | 3 <div id="other"> </div> |
| 4 <div> | 4 <div> |
| 5 <div style="position:absolute; top: 0px; overflow:hidden; width:500px; height:
500px;" id="grandparent"> | 5 <div style="position:absolute; top: 0px; overflow:hidden; width:500px; height:
500px;" id="grandparent"> |
| 6 <div style="position:absolute; top: 0px; overflow:hidden; width:500px; heigh
t:500px;" id="root"> | 6 <div style="position:absolute; top: 0px; overflow:hidden; width:500px; heigh
t:500px;" id="root"> |
| 7 </div> | 7 </div> |
| 8 </div> | 8 </div> |
| 9 </div> | 9 </div> |
| 10 <script type="text/javascript"> | 10 <script type="text/javascript"> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 greenRect.setAttribute("height", "50%"); | 36 greenRect.setAttribute("height", "50%"); |
| 37 // make sure the svg root's .style attribute is out of date | 37 // make sure the svg root's .style attribute is out of date |
| 38 svgroot.style.position = "absolute"; | 38 svgroot.style.position = "absolute"; |
| 39 // force layout. this will be rooted at the RenderSVGRoot and will set m_pos
ChildNeedsLayout on its | 39 // force layout. this will be rooted at the RenderSVGRoot and will set m_pos
ChildNeedsLayout on its |
| 40 // containing RenderBlock (corresponding to DIV#root) | 40 // containing RenderBlock (corresponding to DIV#root) |
| 41 document.body.offsetWidth; | 41 document.body.offsetWidth; |
| 42 // dirty an SVG attribute, will set FrameView::m_layoutRoot to the RenderSVG
Root | 42 // dirty an SVG attribute, will set FrameView::m_layoutRoot to the RenderSVG
Root |
| 43 greenRect.setAttribute("width", "50%"); | 43 greenRect.setAttribute("width", "50%"); |
| 44 // dirty a normal DOM attribute in a separate part of the DOM. this is wher
e things go awry since | 44 // dirty a normal DOM attribute in a separate part of the DOM. this is wher
e things go awry since |
| 45 // FrameView::scheduleRelayoutOfSubtree will clear out its m_layoutRoot and
call | 45 // FrameView::scheduleRelayoutOfSubtree will clear out its m_layoutRoot and
call |
| 46 // RenderObject::markContainingBlocksForLayout() on the RenderSVGRoot. Sinc
e the RenderSVGRoot's | 46 // LayoutObject::markContainingBlocksForLayout() on the RenderSVGRoot. Sinc
e the RenderSVGRoot's |
| 47 // container already has m_posChildNeedsLayout set, the RenderSVGRoot's cont
ainer's container | 47 // container already has m_posChildNeedsLayout set, the RenderSVGRoot's cont
ainer's container |
| 48 // (corresponding to the DIV#grandparent) will not have any needs layout fla
gs set on it. | 48 // (corresponding to the DIV#grandparent) will not have any needs layout fla
gs set on it. |
| 49 document.getElementById('other').style.width="500px"; | 49 document.getElementById('other').style.width="500px"; |
| 50 // Run a layout pass. This will propagate the render tree up to the DIV#oth
er's render object but | 50 // Run a layout pass. This will propagate the render tree up to the DIV#oth
er's render object but |
| 51 // will not traverse into the svg subtree at all since the DIV#grandparent's
render object is | 51 // will not traverse into the svg subtree at all since the DIV#grandparent's
render object is |
| 52 // not marked as needing layout. | 52 // not marked as needing layout. |
| 53 document.body.offsetWidth; | 53 document.body.offsetWidth; |
| 54 // This goes into the void since the RenderSVGRoot is already marked as need
sLayout but there is no | 54 // This goes into the void since the RenderSVGRoot is already marked as need
sLayout but there is no |
| 55 // layout pending. | 55 // layout pending. |
| 56 greenRect.setAttribute("x", "50%"); | 56 greenRect.setAttribute("x", "50%"); |
| 57 } | 57 } |
| 58 </script> | 58 </script> |
| 59 </body> | 59 </body> |
| 60 | 60 |
| OLD | NEW |