Commit 88a0ba42 authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Don't consider 'fill' a presentation attribute on animation elements

Bug: 1056055
Change-Id: Id2f1c1af971c3b4e908562e9bec20b76779f0bd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2080237Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#745954}
parent bfb46a62
......@@ -530,6 +530,14 @@ void SVGSMILElement::SvgAttributeChanged(const QualifiedName& attr_name) {
SVGElement::SvgAttributeChanged(attr_name);
}
bool SVGSMILElement::IsPresentationAttribute(
const QualifiedName& attr_name) const {
// Don't map 'fill' to the 'fill' property for animation elements.
if (attr_name == svg_names::kFillAttr)
return false;
return SVGElement::IsPresentationAttribute(attr_name);
}
void SVGSMILElement::ConnectConditions() {
if (conditions_connected_)
DisconnectConditions();
......
......@@ -135,6 +135,8 @@ class CORE_EXPORT SVGSMILElement : public SVGElement, public SVGTests {
const ProgressState& GetProgressState() const { return last_progress_; }
private:
bool IsPresentationAttribute(const QualifiedName&) const override;
void BuildPendingResource() override;
void ClearResourceAndEventBaseReferences();
void ClearConditions();
......
......@@ -16,7 +16,11 @@ PASS x, y, width, and height presentation attributes not supported on other elem
PASS r presentation attribute not supported on other elements
PASS rx and ry presentation attributes not supported on other elements
PASS d presentation attribute not supported on other elements
FAIL fill presentation attribute not supported on animation elements assert_false: Presentation attribute fill="blue" should be supported on animate element expected false got true
PASS fill presentation attribute not supported on animate
PASS fill presentation attribute not supported on animateMotion
PASS fill presentation attribute not supported on animateTransform
FAIL fill presentation attribute not supported on discard assert_false: Presentation attribute fill="blue" should be supported on discard element expected false got true
PASS fill presentation attribute not supported on set
PASS transform presentation attribute supported on g
PASS patternTransform presentation attribute supported on pattern
PASS patternTransform presentation attribute supported on linearGradient
......
......@@ -98,11 +98,11 @@ if (CSS.supports("d", "initial")) {
// animation elements.
if (CSS.supports("fill", "initial")) {
test(function() {
for (let e of ["animate", "animateMotion", "animateTransform", "discard", "set"]) {
for (let e of ["animate", "animateMotion", "animateTransform", "discard", "set"]) {
test(function() {
assertPresentationAttributeIsNotSupported(e, "fill", "blue", "fill");
}
}, `fill presentation attribute not supported on animation elements`);
}, `fill presentation attribute not supported on ${e}`);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment