m_absoluteBounds hack should be removed from SVG renderers Now that I've cleaned up the SVG render tree a little, we can! See attached patch.
Created attachment 29591 [details] Remove m_absoluteBounds hack from SVG renderers and move outlineBoundsForRepaint into RenderSVGModelObject 10 files changed, 96 insertions(+), 63 deletions(-)
Comment on attachment 29591 [details] Remove m_absoluteBounds hack from SVG renderers and move outlineBoundsForRepaint into RenderSVGModelObject > +void RenderSVGModelObject::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed , bool useTransforms, TransformState& transformState) const > +{ > + ASSERT(!fixed); // We should have no fixed content in the SVG rendering tree. > + > + // FIXME: If we don't respect useTransforms we break SVG text rendering. Seems SVG text has its own broken translation hacks. > + if (useTransforms) > + transformState.applyTransform(localToParentTransform()); I think calling mapLocalToContainer() with useTransforms == false in SVG is just wrong, and should never happen. We should either assert and fix callers, or just force it to true. > +// Copied from RenderBox, this method likely requires further refactoring to work easily for both SVG and CSS Box Model content. > +IntRect RenderSVGModelObject::outlineBoundsForRepaint(RenderBoxModelObject* /*repaintContainer*/) const > +{ > + IntRect box = enclosingIntRect(repaintRectInLocalCoordinates()); > + adjustRectForOutlineAndShadow(box); > + > + FloatQuad absOutlineQuad = localToAbsoluteQuad(FloatRect(box)); > + box = absOutlineQuad.enclosingBoundingBox(); Rather than follow the (broken: bug 25282) RenderBox, I think this should do: FloatQuad containerOutlineQuad = localToContainerQuad(FloatRect(box), repaintContainer) r=me
I did not change that back to an ASSERT, but I plan to do that once I fix <text> I fixed the localToContainerQuad issue.
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/rendering/RenderPath.cpp M WebCore/rendering/RenderPath.h M WebCore/rendering/RenderSVGContainer.cpp M WebCore/rendering/RenderSVGContainer.h M WebCore/rendering/RenderSVGModelObject.cpp M WebCore/rendering/RenderSVGModelObject.h M WebCore/rendering/RenderSVGRoot.cpp M WebCore/rendering/RenderSVGRoot.h M WebCore/rendering/RenderSVGViewportContainer.cpp Committed r42677