Skip to content
Permalink
Browse files
propertyRegistry() was not overridden for SVGFEFloodElement and SVGFE…
…MergeElement

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.

Canonical link: https://commits.webkit.org/211525@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Said Abou-Hallawa authored and webkit-commit-queue committed Apr 26, 2019
1 parent 2db1214 commit 841df53238d8a57f09f52986f47547825bda6565
Showing 7 changed files with 57 additions and 0 deletions.
@@ -1,3 +1,13 @@
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,3 +1,21 @@
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
@@ -583,6 +583,7 @@ void SVGElement::commitPropertyChange(SVGProperty* property)
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.
@@ -32,8 +32,13 @@ class SVGFEFloodElement final : public SVGFilterPrimitiveStandardAttributes {
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
@@ -32,7 +32,12 @@ class SVGFEMergeElement final : public SVGFilterPrimitiveStandardAttributes {
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

0 comments on commit 841df53

Please sign in to comment.