mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-01 04:47:31 +09:00
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.
This commit is contained in:
parent
2128ac642e
commit
91fc5614ec
1 changed files with 0 additions and 18 deletions
|
|
@ -1268,24 +1268,6 @@ nsSVGElement::UpdateContentStyleRule()
|
||||||
continue; // xml:lang has precedence
|
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;
|
nsAutoString value;
|
||||||
mAttrsAndChildren.AttrAt(i)->ToString(value);
|
mAttrsAndChildren.AttrAt(i)->ToString(value);
|
||||||
mappedAttrParser.ParseMappedAttrValue(attrName->Atom(), value);
|
mappedAttrParser.ParseMappedAttrValue(attrName->Atom(), value);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue