Title: [293939] trunk/Source/WebCore
Revision
293939
Author
[email protected]
Date
2022-05-06 18:32:26 -0700 (Fri, 06 May 2022)

Log Message

Use dynamicDowncast in getPathFromPathOperation()
https://bugs.webkit.org/show_bug.cgi?id=240190

Reviewed by Chris Dumez.

Small cleanup.

* style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertPathOperation):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (293938 => 293939)


--- trunk/Source/WebCore/ChangeLog	2022-05-07 01:15:17 UTC (rev 293938)
+++ trunk/Source/WebCore/ChangeLog	2022-05-07 01:32:26 UTC (rev 293939)
@@ -1,3 +1,15 @@
+2022-05-06  Tim Nguyen  <[email protected]>
+
+        Use dynamicDowncast in getPathFromPathOperation()
+        https://bugs.webkit.org/show_bug.cgi?id=240190
+
+        Reviewed by Chris Dumez.
+
+        Small cleanup.
+
+        * style/StyleBuilderConverter.h:
+        (WebCore::Style::BuilderConverter::convertPathOperation):
+
 2022-05-06  Rob Buis  <[email protected]>
 
         Use correct document as root for lazy image observer

Modified: trunk/Source/WebCore/style/StyleBuilderConverter.h (293938 => 293939)


--- trunk/Source/WebCore/style/StyleBuilderConverter.h	2022-05-07 01:15:17 UTC (rev 293938)
+++ trunk/Source/WebCore/style/StyleBuilderConverter.h	2022-05-07 01:32:26 UTC (rev 293939)
@@ -629,9 +629,7 @@
             auto fragment = SVGURIReference::fragmentIdentifierFromIRIString(cssURLValue, builderState.document());
             // FIXME: It doesn't work with external SVG references (see https://bugs.webkit.org/show_bug.cgi?id=126133)
             auto target = SVGURIReference::targetElementFromIRIString(cssURLValue, builderState.document());
-            if (is<SVGElement>(target.element.get()))
-                return ReferencePathOperation::create(cssURLValue, fragment, downcast<SVGElement>(target.element.get()));
-            return ReferencePathOperation::create(cssURLValue, fragment, nullptr);
+            return ReferencePathOperation::create(cssURLValue, fragment, dynamicDowncast<SVGElement>(target.element.get()));
         }
         ASSERT(primitiveValue.valueID() == CSSValueNone);
         return nullptr;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to