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

Side by Side Diff: LayoutTests/fast/repaint/svg-layout-root-style-attr-update.html

Issue 933953003: Move the remaining rendering/svg/RenderSVG* files to layout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
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 18 matching lines...) Expand all
29 greenRect.setAttribute("fill", "green"); 29 greenRect.setAttribute("fill", "green");
30 greenRect.setAttribute("x", "0%"); 30 greenRect.setAttribute("x", "0%");
31 greenRect.setAttribute("y", "10"); 31 greenRect.setAttribute("y", "10");
32 greenRect.setAttribute("width", "50%"); 32 greenRect.setAttribute("width", "50%");
33 svgroot.appendChild(greenRect); 33 svgroot.appendChild(greenRect);
34 document.body.offsetLeft; 34 document.body.offsetLeft;
35 // dirty an SVG attribute 35 // dirty an SVG attribute
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 LayoutSVGRoot 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 LayoutSVG 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 // LayoutObject::markContainingBlocksForLayout() on the RenderSVGRoot. Sinc e the RenderSVGRoot's 46 // LayoutObject::markContainingBlocksForLayout() on the LayoutSVGRoot. Sinc e the LayoutSVGRoot's
47 // container already has m_posChildNeedsLayout set, the RenderSVGRoot's cont ainer's container 47 // container already has m_posChildNeedsLayout set, the LayoutSVGRoot'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 LayoutSVGRoot 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698