[Webkit-unassigned] [Bug 25532] Clean up SVG rendering tree more
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 4 17:37:23 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=25532
simon.fraser at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #29980|review? |review+
Flag| |
------- Comment #15 from simon.fraser at apple.com 2009-05-04 17:37 PDT -------
(From update of attachment 29980)
> +IntRect SVGRenderBase::clippedOverflowRectForRepaint(RenderObject* object, RenderBoxModelObject* repaintContainer)
> +{
Maybe assert that repaintContainer != this to make sure that someone isn't
trying to do a container-relative
repaint inside of SVG content?
> + // Return early for any cases where we don't actually paint
> + if (object->style()->visibility() != VISIBLE && !object->enclosingLayer()->hasVisibleContent())
> + return IntRect();
> +
> + // Pass our local paint rect to computeRectForRepaint() which will
> + // map to parent coords and recurse up the parent chain.
> + IntRect repaintRect = enclosingIntRect(object->repaintRectInLocalCoordinates());
> + object->computeRectForRepaint(repaintContainer, repaintRect);
> + return repaintRect;
> +void SVGRenderBase::computeRectForRepaint(RenderObject* object, RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed)
> +{
Assert that this != repaintContainer ?
> + // Translate to coords in our parent renderer, and then call computeRectForRepaint on our parent
> + repaintRect = object->localToParentTransform().mapRect(repaintRect);
> + object->parent()->computeRectForRepaint(repaintContainer, repaintRect, fixed);
Is object->parent() always non-null?
> +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());
> +
> + object->parent()->mapLocalToContainer(repaintContainer, fixed, useTransforms, transformState);
Is object->parent() always non-null?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list