Changeset 259031 in webkit


Ignore:
Timestamp:
Mar 25, 2020, 9:28:40 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[ macOS ] svg/custom/textPath-change-id-pattern.svg is flakey failing
https://bugs.webkit.org/show_bug.cgi?id=208532

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-03-25
Reviewed by Darin Adler.

Source/WebCore:

In this layout test, the id of a <path> element changes. This <path> is
referenced by a <textPath> element which is a child of a <pattern> element.
The <pattern> element is used to fill a <rect> element.

This patch ensures all clients (<rect>) of the resource ancestor (<pattern>)
of any sub-resource (<textPath>) is marked for repaint when the id of a
sub-sub-resource (<path>) changes.

  • rendering/svg/RenderSVGResourceContainer.cpp:

(WebCore::RenderSVGResourceContainer::markAllClientsForRepaint):

  • rendering/svg/RenderSVGResourceContainer.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::buildPendingResourcesIfNeeded):
(WebCore::SVGElement::invalidateInstances):
Unrelated change. This is a leftover from r179807 which was converting a
"do { } while();" statement to "while() { }" statement.

LayoutTests:

  • platform/mac-wk1/TestExpectations:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r259027 r259031  
     12020-03-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        [ macOS ] svg/custom/textPath-change-id-pattern.svg is flakey failing
     4        https://bugs.webkit.org/show_bug.cgi?id=208532
     5
     6        Reviewed by Darin Adler.
     7
     8        * platform/mac-wk1/TestExpectations:
     9
    1102020-03-25  Jack Lee  <shihchieh_lee@apple.com>
    211
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r259009 r259031  
    944944webkit.org/b/209480 [ Debug ] webgl/2.0.0/conformance/attribs/gl-vertexattribpointer.html [ Pass Timeout ]
    945945
    946 webkit.org/b/208532 svg/custom/textPath-change-id-pattern.svg [ Pass Failure ]
    947 
    948946webkit.org/b/208825 [ Debug ] inspector/script-profiler/event-type-Microtask.html [ Pass Failure ]
    949947
  • trunk/Source/WebCore/ChangeLog

    r259027 r259031  
     12020-03-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        [ macOS ] svg/custom/textPath-change-id-pattern.svg is flakey failing
     4        https://bugs.webkit.org/show_bug.cgi?id=208532
     5
     6        Reviewed by Darin Adler.
     7
     8        In this layout test, the id of a <path> element changes. This <path> is
     9        referenced by a <textPath> element which is a child of a <pattern> element.
     10        The <pattern> element is used to fill a <rect> element.
     11
     12        This patch ensures all clients (<rect>) of the resource ancestor (<pattern>)
     13        of any sub-resource (<textPath>) is marked for repaint when the id of a
     14        sub-sub-resource (<path>) changes.
     15
     16        * rendering/svg/RenderSVGResourceContainer.cpp:
     17        (WebCore::RenderSVGResourceContainer::markAllClientsForRepaint):
     18        * rendering/svg/RenderSVGResourceContainer.h:
     19        * svg/SVGElement.cpp:
     20        (WebCore::SVGElement::buildPendingResourcesIfNeeded):
     21        (WebCore::SVGElement::invalidateInstances):
     22        Unrelated change. This is a leftover from r179807 which was converting a
     23        "do { } while();" statement to "while() { }" statement.
     24
    1252020-03-25  Jack Lee  <shihchieh_lee@apple.com>
    226
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp

    r258278 r259031  
    9191}
    9292
     93void RenderSVGResourceContainer::markAllClientsForRepaint()
     94{
     95    markAllClientsForInvalidation(RepaintInvalidation);
     96}
     97
    9398void RenderSVGResourceContainer::markAllClientsForInvalidation(InvalidationMode mode)
    9499{
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.h

    r246490 r259031  
    4343
    4444    void idChanged();
     45    void markAllClientsForRepaint();
    4546    void addClientRenderLayer(RenderLayer*);
    4647    void removeClientRenderLayer(RenderLayer*);
  • trunk/Source/WebCore/svg/SVGElement.cpp

    r258464 r259031  
    3535#include "HTMLNames.h"
    3636#include "HTMLParserIdioms.h"
     37#include "RenderAncestorIterator.h"
    3738#include "RenderSVGResourceFilter.h"
    3839#include "RenderSVGResourceMasker.h"
     
    868869        if (clientElement->hasPendingResources()) {
    869870            clientElement->buildPendingResource();
     871            if (auto renderer = clientElement->renderer()) {
     872                for (auto& ancestor : ancestorsOfType<RenderSVGResourceContainer>(*renderer))
     873                    ancestor.markAllClientsForRepaint();
     874            }
    870875            extensions.clearHasPendingResourcesIfPossible(*clientElement);
    871876        }
     
    947952            useElement->invalidateShadowTree();
    948953        instance->setCorrespondingElement(nullptr);
    949     } while (!instances.isEmpty());
    950 }
    951 
    952 }
     954    }
     955}
     956
     957}
Note: See TracChangeset for help on using the changeset viewer.