width and height are presentation attributes and can be set in an style sheet. Setting the style in a style sheet does not affect the presentation attribute style. SVGSVGElement::selfHasRelativeLengths currently checks baseVal of width and height on the presentation attribute style only. It must check the computed value instead. The problem: selfHasRelativeLengths does not depend on RenderObjects at the moment. Since width and height are computed in RenderStyle, we probably should move this whole logic to RenderObject (the individual renderers) somehow.
https://github.com/WebKit/WebKit/blob/b14bb0af35520a6d89e81d01423d4220890ed777/Source/WebCore/svg/SVGSVGElement.cpp#L507 I am not sure on whether this is still present or not but just wanted to share the code path, appreciate if someone can have a look. Thanks!