| Summary: | Make SVGElement::getBoundingBox retrieve bbox from RenderObject | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Rob Buis <rbuis> | ||||||||
| Component: | SVG | Assignee: | Rob Buis <rbuis> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | cdumez, cmarcelo, dino, esprehn+autocc, ews-watchlist, fmalita, gyuyoung.kim, kangil.han, pdr, sabouhallawa, schenney, sergio, webkit-bug-importer, zalan, zimmermann | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | Other | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Rob Buis
2021-04-13 05:36:29 PDT
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]. (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. |