Bug 133046

Summary: SVGSVGElement::selfHasRelativeLengths probably can return bogus results for width and height
Product: WebKit Reporter: Dirk Schulze <krit>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ahmad.saleem792, ap, bfulgham, mmaxfield, pdr, rniwa, simon.fraser, zalan, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Dirk Schulze
Reported 2014-05-18 02:32:24 PDT
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.
Attachments
Ahmad Saleem
Comment 1 2022-08-13 15:20:29 PDT
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!
Note You need to log in before you can comment on or make changes to this bug.