Title: [244690] trunk
Revision
244690
Author
[email protected]
Date
2019-04-26 09:32:25 -0700 (Fri, 26 Apr 2019)

Log Message

propertyRegistry() was not overridden for SVGFEFloodElement and SVGFEMergeElement
https://bugs.webkit.org/show_bug.cgi?id=197303

Patch by Said Abou-Hallawa <[email protected]> on 2019-04-26
Reviewed by Alex Christensen.

Source/WebCore:

Therefore SVGElement::propertyRegistry() was called instead. This means
these two elements will not have access to the properties of the base
class SVGFilterPrimitiveStandardAttributes.

Tests: svg/dom/SVGFEFloodElement-filter-standard-attributes.svg

* svg/SVGElement.cpp:
(WebCore::SVGElement::commitPropertyChange):
* svg/SVGFEFloodElement.h:
* svg/SVGFEMergeElement.h:

LayoutTests:

* svg/dom/SVGFEFloodElement-filter-standard-attributes-expected.svg: Added.
* svg/dom/SVGFEFloodElement-filter-standard-attributes.svg: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (244689 => 244690)


--- trunk/LayoutTests/ChangeLog	2019-04-26 16:29:15 UTC (rev 244689)
+++ trunk/LayoutTests/ChangeLog	2019-04-26 16:32:25 UTC (rev 244690)
@@ -1,3 +1,13 @@
+2019-04-26  Said Abou-Hallawa  <[email protected]>
+
+        propertyRegistry() was not overridden for SVGFEFloodElement and SVGFEMergeElement
+        https://bugs.webkit.org/show_bug.cgi?id=197303
+
+        Reviewed by Alex Christensen.
+
+        * svg/dom/SVGFEFloodElement-filter-standard-attributes-expected.svg: Added.
+        * svg/dom/SVGFEFloodElement-filter-standard-attributes.svg: Added.
+
 2019-04-26  Youenn Fablet  <[email protected]>
 
         [Mac WK2 iOS Sim] Layout Test imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html is a flaky failure

Added: trunk/LayoutTests/svg/dom/SVGFEFloodElement-filter-standard-attributes-expected.svg (0 => 244690)


--- trunk/LayoutTests/svg/dom/SVGFEFloodElement-filter-standard-attributes-expected.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/dom/SVGFEFloodElement-filter-standard-attributes-expected.svg	2019-04-26 16:32:25 UTC (rev 244690)
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+    <rect x="10" y="10" width="100" height="100" fill="green"/>
+</svg>

Added: trunk/LayoutTests/svg/dom/SVGFEFloodElement-filter-standard-attributes.svg (0 => 244690)


--- trunk/LayoutTests/svg/dom/SVGFEFloodElement-filter-standard-attributes.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/dom/SVGFEFloodElement-filter-standard-attributes.svg	2019-04-26 16:32:25 UTC (rev 244690)
@@ -0,0 +1,15 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+    <defs>
+        <filter id="filter" filterUnits="userSpaceOnUse">
+            <feFlood id="feFlood" x="0" y="0" width="50" height="50" flood-color="green"/>
+        </filter>
+    </defs>
+    <use style="filter: url(#filter);"/>
+    <script>
+        var feFlood = document.querySelector("#feFlood");
+        feFlood.x.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_NUMBER, 10);
+        feFlood.y.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_NUMBER, 10);
+        feFlood.width.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_NUMBER, 100);
+        feFlood.height.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_NUMBER, 100);
+    </script>
+</svg>

Modified: trunk/Source/WebCore/ChangeLog (244689 => 244690)


--- trunk/Source/WebCore/ChangeLog	2019-04-26 16:29:15 UTC (rev 244689)
+++ trunk/Source/WebCore/ChangeLog	2019-04-26 16:32:25 UTC (rev 244690)
@@ -1,3 +1,21 @@
+2019-04-26  Said Abou-Hallawa  <[email protected]>
+
+        propertyRegistry() was not overridden for SVGFEFloodElement and SVGFEMergeElement
+        https://bugs.webkit.org/show_bug.cgi?id=197303
+
+        Reviewed by Alex Christensen.
+
+        Therefore SVGElement::propertyRegistry() was called instead. This means
+        these two elements will not have access to the properties of the base
+        class SVGFilterPrimitiveStandardAttributes.
+
+        Tests: svg/dom/SVGFEFloodElement-filter-standard-attributes.svg
+
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::commitPropertyChange):
+        * svg/SVGFEFloodElement.h:
+        * svg/SVGFEMergeElement.h:
+
 2019-04-26  Youenn Fablet  <[email protected]>
 
         [Mac WK2 iOS Sim] Layout Test imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html is a flaky failure

Modified: trunk/Source/WebCore/svg/SVGElement.cpp (244689 => 244690)


--- trunk/Source/WebCore/svg/SVGElement.cpp	2019-04-26 16:29:15 UTC (rev 244689)
+++ trunk/Source/WebCore/svg/SVGElement.cpp	2019-04-26 16:32:25 UTC (rev 244690)
@@ -583,6 +583,7 @@
 void SVGElement::commitPropertyChange(SVGAnimatedProperty& animatedProperty)
 {
     QualifiedName attributeName = propertyRegistry().animatedPropertyAttributeName(animatedProperty);
+    ASSERT(attributeName != nullQName());
 
     // A change in a style property, e.g SVGRectElement::x should be serialized to
     // the attribute immediately. Otherwise it is okay to be lazy in this regard.

Modified: trunk/Source/WebCore/svg/SVGFEFloodElement.h (244689 => 244690)


--- trunk/Source/WebCore/svg/SVGFEFloodElement.h	2019-04-26 16:29:15 UTC (rev 244689)
+++ trunk/Source/WebCore/svg/SVGFEFloodElement.h	2019-04-26 16:32:25 UTC (rev 244690)
@@ -32,8 +32,13 @@
 private:
     SVGFEFloodElement(const QualifiedName&, Document&);
 
+    using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEFloodElement, SVGFilterPrimitiveStandardAttributes>;
+    const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
+
     bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName) override;
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) const override;
+
+    PropertyRegistry m_propertyRegistry { *this };
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/svg/SVGFEMergeElement.h (244689 => 244690)


--- trunk/Source/WebCore/svg/SVGFEMergeElement.h	2019-04-26 16:29:15 UTC (rev 244689)
+++ trunk/Source/WebCore/svg/SVGFEMergeElement.h	2019-04-26 16:32:25 UTC (rev 244690)
@@ -32,7 +32,12 @@
 private:
     SVGFEMergeElement(const QualifiedName&, Document&);
 
+    using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEMergeElement, SVGFilterPrimitiveStandardAttributes>;
+    const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
+
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) const override;
+
+    PropertyRegistry m_propertyRegistry { *this };
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to