Make SVGElement::getBoundingBox retrieve bbox from RenderObject.
Created attachment 425865 [details] Patch
Created attachment 425867 [details] Patch
Created attachment 425873 [details] Patch
Wouldn't this return incorrect rect for SVGPathElement?
(In reply to zalan from comment #4) > Wouldn't this return incorrect rect for SVGPathElement? I do not think so, an SVGPathElement is a SVGGraphicsElement too. There should be no change in behaviour.
The difference is 1. path().boundingRect() (SVGPathElement::getBBox -> RenderSVGPath::path().boundingRect()) vs. 2. some cached path().boundingRect() value (through RenderSVGPath::objectBoundingBox() which returns m_fillBoundingBox which is populated at updateShapeFromElement by calling calculateObjectBoundingBox (which is indeed path().boundingRect()), but I think it should be fine.
ResizeObservation::computeObservedSize (and some of the other call sites) are also "change in functionality" but let's consider them progressions.
(In reply to zalan from comment #7) > ResizeObservation::computeObservedSize (and some of the other call sites) > are also "change in functionality" but let's consider them progressions. Ah sorry, I missed this and the Path specific code, I thought there was only SVGLocatable::getBBox. Thanks for analysing and given it turned out green, the change should be safe.
Committed r275935 (236497@main): <https://commits.webkit.org/236497@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 425873 [details].
<rdar://problem/76631485>
(In reply to Rob Buis from comment #8) > (In reply to zalan from comment #7) > > ResizeObservation::computeObservedSize (and some of the other call sites) > > are also "change in functionality" but let's consider them progressions. > > Ah sorry, I missed this and the Path specific code, I thought there was only > SVGLocatable::getBBox. Thanks for analysing and given it turned out green, > the change should be safe. Thanks for fixing it.