diff options
author | Moonchild <moonchild@palemoon.org> | 2021-03-20 07:35:30 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-03-20 07:35:30 +0000 |
commit | a94a86ff785e246caa9c71b2914e0bb5f7b03333 (patch) | |
tree | 5d234c05723448449687b968d5953c91df85cc15 /dom/svg/nsSVGElement.cpp | |
parent | d249dd517bfd3e2f21b824994e13e88e975a3c4f (diff) | |
download | uxp-a94a86ff785e246caa9c71b2914e0bb5f7b03333.tar.gz |
Issue #1749 - Remove restriction of SVG width/height element attributes.
According to the original SVG spec, the SVG element in documents had to follow
special rules as to what was allowed for width/height attributes. This is no
longer the case, so we can decouple it from whatever internal units SVG/XML
language uses and allow all units like every other element.
Diffstat (limited to 'dom/svg/nsSVGElement.cpp')
-rw-r--r-- | dom/svg/nsSVGElement.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp index 3596235ceb..30ba920c9f 100644 --- a/dom/svg/nsSVGElement.cpp +++ b/dom/svg/nsSVGElement.cpp @@ -1292,24 +1292,6 @@ nsSVGElement::UpdateContentStyleRule() continue; // xml:lang has precedence } - if (IsSVGElement(nsGkAtoms::svg)) { - // Special case: we don't want <svg> 'width'/'height' mapped into style - // if the attribute value isn't a valid <length> according to SVG (which - // only supports a subset of the CSS <length> values). We don't enforce - // this by checking the attribute value in SVGSVGElement:: - // IsAttributeMapped since we don't want that method to depend on the - // value of the attribute that is being checked. Rather we just prevent - // the actual mapping here, as necessary. - if (attrName->Atom() == nsGkAtoms::width && - !GetAnimatedLength(nsGkAtoms::width)->HasBaseVal()) { - continue; - } - if (attrName->Atom() == nsGkAtoms::height && - !GetAnimatedLength(nsGkAtoms::height)->HasBaseVal()) { - continue; - } - } - nsAutoString value; mAttrsAndChildren.AttrAt(i)->ToString(value); mappedAttrParser.ParseMappedAttrValue(attrName->Atom(), value); |