Closed Bug 1575674 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 18599 - Setting the MayHaveMargin flag with 'auto' values

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Javier Fernandez <jfernandez@igalia.com> wrote:

Setting the MayHaveMargin flag with 'auto' values

The MayHaveMargin flag is used to determine if a given style has a
non-zero value for any of its marging related fields. Based on that
field we take decissions during the layout to calculate or not the
margins.

When some of the margin CSS properties has 'auto' as value, we may
need to recalculate their computed value whenever the size constraints
change. This is not happening if we have the MayHaveMargin disabled, so
that the computed value remains based on the previous size.

In order to force the recalculation of the 'auto' margins, this patch
enables the MayHaveMargin if the associated style field has 'auto' as
value.

Additionally, grid items with auto margins must be marked for layout if
their corresponding grid areas' block-axis size changed since the last
layout.

Bug: 994300
Change-Id: I44658876f7c2f2067202e45c6a552593bddfe6c9

Reviewed-on: https://chromium-review.googlesource.com/1763749
WPT-Export-Revision: 3113e707c562bc38b2a4bda8c234d2294cf5f6bf

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 16 tests and 28 subtests
OK     : 14
PASS   : 30
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4b987ce2b96d
[wpt PR 18599] - [css-grid] Ignore previously computed auto margins when relayout, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.