WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
252903
[Resize-observer] The `getBoundingBox` of a non-empty SVG element is 0x0
https://bugs.webkit.org/show_bug.cgi?id=252903
Summary
[Resize-observer] The `getBoundingBox` of a non-empty SVG element is 0x0
cathiechen
Reported
2023-02-24 07:30:40 PST
Created
attachment 465152
[details]
test-case In ResizeObservation::computeObservedSizes(), it calls `downcast<SVGElement>(*m_target).getBoundingBox()` which returns 0x0 when the layout size of SVG is not empty. See the attached test.
Attachments
test-case
(785 bytes, text/html)
2023-02-24 07:30 PST
,
cathiechen
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
cathiechen
Comment 1
2023-02-24 08:50:12 PST
According to [1],
> Web content can also contain SVG elements. SVG elements that do not have associated CSS layout boxes define bounding box instead of a content box. Content rect for the SVGGraphicsElements without CSS layout boxes is a rect whose: > width is bounding box width > height is bounding box height
So from ResizeObserver size, it is correct to call `downcast<SVGElement>(*m_target).getBoundingBox()` in `ResizeObservation::computeObservedSizes()`. I'll leave this bug to an SVG Expert. [1]
https://drafts.csswg.org/resize-observer/
cathiechen
Comment 2
2023-03-02 13:28:54 PST
Pull request:
https://github.com/WebKit/WebKit/pull/10955
Radar WebKit Bug Importer
Comment 3
2023-03-03 07:31:14 PST
<
rdar://problem/106194536
>
EWS
Comment 4
2023-03-27 06:24:00 PDT
Committed
262145@main
(afa718b1cfd9): <
https://commits.webkit.org/262145@main
> Reviewed commits have been landed. Closing PR #10955 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug