[wpt-sync] Sync PR 53392 - [SVG] Fixing nullptr exception during SVG style and layout recalculation
Categories
(Core :: SVG, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox142 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 53392 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/53392
Details from upstream follow.
Divyansh Mangal <dmangal@microsoft.com> wrote:
[SVG] Fixing nullptr exception during SVG style and layout recalculation
CSS properties like
{position:absolute}
are not applied for
inner svg elements as inner svg elements don't follow CSS box model.
Below piece of code inStyleAdjuster::AdjustStyleForSvgElement
to used to handle this for inner svg elementsbool is_svg_root = element.IsOutermostSVGSVGElement();
if (!is_svg_root) {
builder.SetPosition(ComputedStyleInitialValues::InitialPosition());
}However, if the style calculation is forced and CSS styles like
{position:absolute}
are applied to svg elements along with
\<use> a nullptr exception is observed. (see the new test added in
this CL). This exception become more pronounced due to our change
in CL:6623901 which made it possible to replicate the crash.In this CL, we remedy this problem by updating the above condition
based on the element that is actually being styled.Bug: 425405650
Change-Id: Idf0b6e162d7017660ae46580a8154c521526922a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6653468
Reviewed-by: Fredrik Söderquist \<fs@opera.com>
Commit-Queue: Divyansh Mangal \<dmangal@microsoft.com>
Reviewed-by: Kurt Catti-Schmidt \<kschmi@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1478629}
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 1•2 months ago
|
||
Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests
Status Summary
Firefox
PASS
: 1
Chrome
CRASH
: 1
Safari
PASS
: 1
Description
•