Changeset 100036 in webkit


Ignore:
Timestamp:
Nov 11, 2011 3:40:57 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Repaint broken when children of filtered SVG elements are updated
https://bugs.webkit.org/show_bug.cgi?id=71733

Patch by Joel Webber <jgw@google.com> on 2011-11-11
Reviewed by Nikolas Zimmermann.

Source/WebCore:

Test: svg/repaint/filter-child-repaint.svg

  • rendering/svg/RenderSVGContainer.cpp:

(WebCore::RenderSVGContainer::layout):

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::layout):

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGRenderSupport::setNeedsLayoutForFilteredContainer):

LayoutTests:

  • platform/chromium-linux/svg/repaint/filter-child-repaint-expected.png: Added.
  • platform/chromium-linux/svg/repaint/filter-child-repaint-expected.txt: Added.
  • svg/repaint/filter-child-repaint.svg: Added.
Location:
trunk
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r100028 r100036  
     12011-11-11  Joel Webber  <jgw@google.com>
     2
     3        Repaint broken when children of filtered SVG elements are updated
     4        https://bugs.webkit.org/show_bug.cgi?id=71733
     5
     6        Reviewed by Nikolas Zimmermann.
     7
     8        * platform/chromium-linux/svg/repaint/filter-child-repaint-expected.png: Added.
     9        * platform/chromium-linux/svg/repaint/filter-child-repaint-expected.txt: Added.
     10        * svg/repaint/filter-child-repaint.svg: Added.
     11
    1122011-11-11  Ojan Vafai  <ojan@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r100035 r100036  
     12011-11-11  Joel Webber  <jgw@google.com>
     2
     3        Repaint broken when children of filtered SVG elements are updated
     4        https://bugs.webkit.org/show_bug.cgi?id=71733
     5
     6        Reviewed by Nikolas Zimmermann.
     7
     8        Test: svg/repaint/filter-child-repaint.svg
     9
     10        * rendering/svg/RenderSVGContainer.cpp:
     11        (WebCore::RenderSVGContainer::layout):
     12        * rendering/svg/RenderSVGRoot.cpp:
     13        (WebCore::RenderSVGRoot::layout):
     14        * rendering/svg/SVGRenderSupport.cpp:
     15        (WebCore::SVGRenderSupport::setNeedsLayoutForFilteredContainer):
     16
    1172011-11-11  Timothy Hatcher  <timothy@apple.com>
    218
  • trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp

    r98989 r100036  
    6363    bool updatedTransform = calculateLocalTransform();
    6464
    65     SVGRenderSupport::layoutChildren(this, selfNeedsLayout());
     65    SVGRenderSupport::layoutChildren(this, selfNeedsLayout() || SVGRenderSupport::filtersForceContainerLayout(this));
    6666
    6767    // Invalidate all resources of this client if our layout changed.
  • trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp

    r99937 r100036  
    255255        ASSERT(!m_needsSizeNegotiationWithHostDocument);
    256256
    257     SVGRenderSupport::layoutChildren(this, needsLayout);
     257    SVGRenderSupport::layoutChildren(this, needsLayout || SVGRenderSupport::filtersForceContainerLayout(this));
    258258    m_isLayoutSizeChanged = false;
    259259
  • trunk/Source/WebCore/rendering/svg/SVGRenderSupport.cpp

    r97870 r100036  
    304304}
    305305
     306bool SVGRenderSupport::filtersForceContainerLayout(RenderObject* object)
     307{
     308    // If any of this container's children need to be laid out, and a filter is applied
     309    // to the container, we need to repaint the entire container.
     310    if (!object->normalChildNeedsLayout())
     311        return false;
     312
     313    SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(object);
     314    if (!resources || !resources->filter())
     315        return false;
     316
     317    return true;
     318}
     319
    306320bool SVGRenderSupport::pointInClippingArea(RenderObject* object, const FloatPoint& point)
    307321{
  • trunk/Source/WebCore/rendering/svg/SVGRenderSupport.h

    r98931 r100036  
    5656    static void intersectRepaintRectWithResources(const RenderObject*, FloatRect&);
    5757
     58    // Determines whether a container needs to be laid out because it's filtered and a child is being laid out.
     59    static bool filtersForceContainerLayout(RenderObject*);
     60
    5861    // Determines whether the passed point lies in a clipping area
    5962    static bool pointInClippingArea(RenderObject*, const FloatPoint&);
Note: See TracChangeset for help on using the changeset viewer.