Title: [259031] trunk
Revision
259031
Author
commit-qu...@webkit.org
Date
2020-03-25 21:28:40 -0700 (Wed, 25 Mar 2020)

Log 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 <sabouhall...@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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (259030 => 259031)


--- trunk/LayoutTests/ChangeLog	2020-03-26 03:26:41 UTC (rev 259030)
+++ trunk/LayoutTests/ChangeLog	2020-03-26 04:28:40 UTC (rev 259031)
@@ -1,3 +1,12 @@
+2020-03-25  Said Abou-Hallawa  <sabouhall...@apple.com>
+
+        [ macOS ] svg/custom/textPath-change-id-pattern.svg is flakey failing
+        https://bugs.webkit.org/show_bug.cgi?id=208532
+
+        Reviewed by Darin Adler.
+
+        * platform/mac-wk1/TestExpectations:
+
 2020-03-25  Jack Lee  <shihchieh_...@apple.com>
 
         Nullptr crash in WebCore::Node::isDescendantOf when inserting list

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (259030 => 259031)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2020-03-26 03:26:41 UTC (rev 259030)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2020-03-26 04:28:40 UTC (rev 259031)
@@ -943,8 +943,6 @@
 
 webkit.org/b/209480 [ Debug ] webgl/2.0.0/conformance/attribs/gl-vertexattribpointer.html [ Pass Timeout ]
 
-webkit.org/b/208532 svg/custom/textPath-change-id-pattern.svg [ Pass Failure ]
-
 webkit.org/b/208825 [ Debug ] inspector/script-profiler/event-type-Microtask.html [ Pass Failure ]
 
 webkit.org/b/208890 imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_openKeyCursor.htm [ Pass Failure ]

Modified: trunk/Source/WebCore/ChangeLog (259030 => 259031)


--- trunk/Source/WebCore/ChangeLog	2020-03-26 03:26:41 UTC (rev 259030)
+++ trunk/Source/WebCore/ChangeLog	2020-03-26 04:28:40 UTC (rev 259031)
@@ -1,3 +1,27 @@
+2020-03-25  Said Abou-Hallawa  <sabouhall...@apple.com>
+
+        [ macOS ] svg/custom/textPath-change-id-pattern.svg is flakey failing
+        https://bugs.webkit.org/show_bug.cgi?id=208532
+
+        Reviewed by Darin Adler.
+
+        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.
+
 2020-03-25  Jack Lee  <shihchieh_...@apple.com>
 
         Nullptr crash in WebCore::Node::isDescendantOf when inserting list

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp (259030 => 259031)


--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp	2020-03-26 03:26:41 UTC (rev 259030)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp	2020-03-26 04:28:40 UTC (rev 259031)
@@ -90,6 +90,11 @@
     registerResource();
 }
 
+void RenderSVGResourceContainer::markAllClientsForRepaint()
+{
+    markAllClientsForInvalidation(RepaintInvalidation);
+}
+
 void RenderSVGResourceContainer::markAllClientsForInvalidation(InvalidationMode mode)
 {
     // FIXME: Style invalidation should either be a pre-layout task or this function

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.h (259030 => 259031)


--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.h	2020-03-26 03:26:41 UTC (rev 259030)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceContainer.h	2020-03-26 04:28:40 UTC (rev 259031)
@@ -42,6 +42,7 @@
     static AffineTransform transformOnNonScalingStroke(RenderObject*, const AffineTransform& resourceTransform);
 
     void idChanged();
+    void markAllClientsForRepaint();
     void addClientRenderLayer(RenderLayer*);
     void removeClientRenderLayer(RenderLayer*);
 

Modified: trunk/Source/WebCore/svg/SVGElement.cpp (259030 => 259031)


--- trunk/Source/WebCore/svg/SVGElement.cpp	2020-03-26 03:26:41 UTC (rev 259030)
+++ trunk/Source/WebCore/svg/SVGElement.cpp	2020-03-26 04:28:40 UTC (rev 259031)
@@ -34,6 +34,7 @@
 #include "HTMLElement.h"
 #include "HTMLNames.h"
 #include "HTMLParserIdioms.h"
+#include "RenderAncestorIterator.h"
 #include "RenderSVGResourceFilter.h"
 #include "RenderSVGResourceMasker.h"
 #include "SVGDocumentExtensions.h"
@@ -867,6 +868,10 @@
         ASSERT(clientElement->hasPendingResources());
         if (clientElement->hasPendingResources()) {
             clientElement->buildPendingResource();
+            if (auto renderer = clientElement->renderer()) {
+                for (auto& ancestor : ancestorsOfType<RenderSVGResourceContainer>(*renderer))
+                    ancestor.markAllClientsForRepaint();
+            }
             extensions.clearHasPendingResourcesIfPossible(*clientElement);
         }
     }
@@ -946,7 +951,7 @@
         if (auto useElement = instance->correspondingUseElement())
             useElement->invalidateShadowTree();
         instance->setCorrespondingElement(nullptr);
-    } while (!instances.isEmpty());
+    }
 }
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to