[Webkit-unassigned] [Bug 81515] SVG Resources layout needs refactoring

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 19 09:37:40 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=81515





--- Comment #1 from Nikolas Zimmermann <zimmermann at kde.org>  2012-03-19 09:37:40 PST ---
I think we only rely that layout for the resource is done, in order to access the "resourceBoundingBox" from SVGRenderSupport, when it figures out the repaint rect of an element, which has clipper/filter/maskers applied.

FloatRect RenderSVGResourceClipper::resourceBoundingBox(RenderObject* object)
{
    // Resource was not layouted yet. Give back the boundingBox of the object.
    if (selfNeedsLayout())
        return object->objectBoundingBox();
...

This could potentially lead to problems, agreed, but only regarding the repaint rect of an element, which may be too small.

For all other cases we don't need to access the resource renderers during layout, so its really independent. For rendering RenderSVGResourceContainers don't matter, they don't participate in that, as they are never directly painted.

All we do on layout() of a resource is:
void RenderSVGResourceContainer::layout()
{
    // Invalidate all resources if our layout changed.
    if (everHadLayout() && selfNeedsLayout())
        removeAllClientsFromCache();

    RenderSVGHiddenContainer::layout();
}

Note: we moved resources to create renderers explicitly some years ago, there were good reasons to do that. (I can elaborate on that if you want: manual style resolution, CSS style changes, etc.)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list