Commit 1c5aca14 authored by eric@webkit.org's avatar eric@webkit.org

Reviewed by Simon Fraser.

        ASSERT(useTransforms) in SVG mapLocalToContainer implementations
        https://bugs.webkit.org/show_bug.cgi?id=25532

        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::mapLocalToContainer):
        * rendering/SVGRenderSupport.cpp:
        (WebCore::SVGRenderBase::mapLocalToContainer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5255f7a8
2009-05-03 Eric Seidel <eric@webkit.org>
Reviewed by Simon Fraser.
ASSERT(useTransforms) in SVG mapLocalToContainer implementations
https://bugs.webkit.org/show_bug.cgi?id=25532
* rendering/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::mapLocalToContainer):
* rendering/SVGRenderSupport.cpp:
(WebCore::SVGRenderBase::mapLocalToContainer):
2009-05-03 Eric Seidel <eric@webkit.org>
Reviewed by Simon Fraser.
......@@ -271,13 +271,10 @@ void RenderSVGRoot::computeRectForRepaint(RenderBoxModelObject* repaintContainer
void RenderSVGRoot::mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed , bool useTransforms, TransformState& transformState) const
{
ASSERT(!fixed); // We should have no fixed content in the SVG rendering tree.
ASSERT(useTransforms); // mapping a point through SVG w/o respecting trasnforms is useless.
// FIXME: If we don't respect useTransforms we break SVG text rendering.
// Seems RenderSVGInlineText has some own broken translation hacks which depend useTransforms=false
// This should instead be ASSERT(useTransforms) once we fix RenderSVGInlineText
if (useTransforms)
transformState.applyTransform(localToBorderBoxTransform());
// Transform to our border box and let RenderBox transform the rest of the way.
transformState.applyTransform(localToBorderBoxTransform());
RenderBox::mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState);
}
......
......@@ -64,13 +64,8 @@ void SVGRenderBase::computeRectForRepaint(RenderObject* object, RenderBoxModelOb
void SVGRenderBase::mapLocalToContainer(const RenderObject* object, RenderBoxModelObject* repaintContainer, bool fixed , bool useTransforms, TransformState& transformState)
{
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 RenderSVGInlineText has some own broken translation hacks which depend useTransforms=false
// This should instead be ASSERT(useTransforms) once we fix RenderSVGInlineText
if (useTransforms)
transformState.applyTransform(object->localToParentTransform());
ASSERT(useTransforms); // mapping a point through SVG w/o respecting trasnforms is useless.
transformState.applyTransform(object->localToParentTransform());
object->parent()->mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment