RenderSVGContainer should not inherit from RenderContainer at least not now that RenderSVGRoot exists. :) This may mean implementing a little bit of RenderContainer logic in RenderSVGContainer manually (like RenderContainer::paint() for instance.
Created attachment 15070 [details] partial fix I'm not sure I'll have time/energy to finish this patch, but I thought I should post my partial work anyway.
Created attachment 15101 [details] working patch (rob to finish) Ok, so this patch works completely (no crashes, etc). There are two things which still need to be done. 1. It breaks 4 test cases. I believe this is something to do with hit-testing errors in RenderSVGContainer when it's being an <svg> 2. Still need to change RenderSVGRoot::rendererName() to return RenderSVGRoot and update tests accordingly.
Created attachment 15522 [details] Initial patch New patch incorporating Eric's patch, but bringing it to a working state w/o regressions. Inlcudes some fixes from Rob made during WWDC.
Comment on attachment 15522 [details] Initial patch // Only the root <svg> element should need any translations using the HTML/CSS system // parentX, parentY are also non-zero for first-level kids of these // CSS-transformed <svg> root-elements (due to RenderBox::paint) for any other element // they should be 0. m_x, m_y should always be 0 for non-root svg containers - ASSERT(m_x == 0); - ASSERT(m_y == 0); should the assertions not become isRoot || m_x == 0 etc?
(In reply to comment #4) > (From update of attachment 15522 [details] [edit]) > // Only the root <svg> element should need any translations using the > HTML/CSS system > // parentX, parentY are also non-zero for first-level kids of these > // CSS-transformed <svg> root-elements (due to RenderBox::paint) for any > other element > // they should be 0. m_x, m_y should always be 0 for non-root svg > containers > - ASSERT(m_x == 0); > - ASSERT(m_y == 0); > > should the assertions not become isRoot || m_x == 0 > etc? > The outermost <svg> element is handled by RenderSVGRoot nowadays. The commented is outdated, I'll fix it. Greetings, Niko
Landed in r24292.