mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from UXP: Issue #1749 - Remove restriction of SVG width/height element attributes. (91fc5614)
This commit is contained in:
@@ -1313,24 +1313,6 @@ nsSVGElement::UpdateContentDeclarationBlock()
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user