Closed Bug 1592635 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 19996 - [LayoutNG] SVGs with percentage dimensions on child-initiated relayouts

Categories

(Core :: SVG, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 19996 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/19996
Details from upstream follow.

Alison Maher <almaher@microsoft.com> wrote:

[LayoutNG] SVGs with percentage dimensions on child-initiated relayouts

On child-initiated re-layouts, SVG elements with percentage dimensions
overflow auto-sized parents when LayoutNG is enabled. The reason being
that ObjectIsRelayoutBoundary() treats all SVGs as layout roots upon
re-layout, even when the width and height are not fixed.

With LayoutNG enabled, this becomes a problem because
BoxLayoutExtraInput does not get set when LayoutSVGRoot is a layout
root, leading to a miscalculation in sizing.

One option would be to set BoxLayoutExtraInput for LayoutSVGRoots
when they are layout roots. However, in order to keep SVG behavior
consistent with other objects, this change fixes the above issue
by preventing layout root optimization altogether for SVG elements
that do not have a fixed height and width.

Bug: 1016759
Change-Id: Id0ccdafb20e5ce3a1b58be3577ca74dccc0c20c5
Reviewed-on: https://chromium-review.googlesource.com/1881691
WPT-Export-Revision: e4cbaf26a0701e0fd57083253f45f61865c620d5

Component: web-platform-tests → SVG
Product: Testing → Core

GitHub CI Results

wpt.fyi PR Results Base Results

Ran 1 tests

Firefox

PASS: 1

Chrome

FAIL: 1

Safari

PASS: 1

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f5acea8e4a7e
[wpt PR 19996] - [LayoutNG] SVGs with percentage dimensions on child-initiated relayouts, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.