Bug 133046 - SVGSVGElement::selfHasRelativeLengths probably can return bogus results for width and height
Summary: SVGSVGElement::selfHasRelativeLengths probably can return bogus results for w...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-18 02:32 PDT by Dirk Schulze
Modified: 2022-08-13 15:20 PDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schulze 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.
Comment 1 Ahmad Saleem 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!