diff --git a/dom/svg/SVGUseElement.cpp b/dom/svg/SVGUseElement.cpp index a90cceb4ddc9..25521a5ba857 100644 --- a/dom/svg/SVGUseElement.cpp +++ b/dom/svg/SVGUseElement.cpp @@ -577,6 +577,10 @@ gfxMatrix SVGUseElement::PrependLocalTransformsTo( /* virtual */ bool SVGUseElement::HasValidDimensions() const { + if (!OurWidthAndHeightAreUsed()) { + return true; + } + return (!mLengthAttributes[ATTR_WIDTH].IsExplicitlySet() || mLengthAttributes[ATTR_WIDTH].GetAnimValInSpecifiedUnits() > 0) && (!mLengthAttributes[ATTR_HEIGHT].IsExplicitlySet() || diff --git a/layout/reftests/svg/dynamic-use-03.svg b/layout/reftests/svg/dynamic-use-03.svg index 345d7b30c8ee..542b7e93559b 100644 --- a/layout/reftests/svg/dynamic-use-03.svg +++ b/layout/reftests/svg/dynamic-use-03.svg @@ -6,7 +6,9 @@ xmlns:xlink="http://www.w3.org/1999/xlink" style="background: lime;" class="reftest-wait"> - + + +