https://bugs.webkit.org/show_bug.cgi?id=197303
Patch by Said Abou-Hallawa <sabouhallawa@apple.com> 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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244690
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2019-04-26 Said Abou-Hallawa <sabouhallawa@apple.com>
+
+ 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 <youenn@apple.com>
[Mac WK2 iOS Sim] Layout Test imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html is a flaky failure
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg">
+ <rect x="10" y="10" width="100" height="100" fill="green"/>
+</svg>
--- /dev/null
+<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>
+2019-04-26 Said Abou-Hallawa <sabouhallawa@apple.com>
+
+ 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 <youenn@apple.com>
[Mac WK2 iOS Sim] Layout Test imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html is a flaky failure
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.
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
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