Sync web-platform-tests PR 24627 into mozilla-central (this bug is closed when the sync is complete).
[FlexNG] Fix %-relpos for a grandchild of a flexbox.
When we resolve %-based offsets for a relative position child, if its
parent is a flex-item we'll read the constraint-space used to generate
this fragment, and resolve the %-based offset using that block-size. I.e.
However flex can have two passes, one without a fixed block-size, and one
with. If we can determine ahead of time that these would result in the
same fragment we'll hit the cache, but the constraint space would
be the one within the fixed block-size.
In other words, if a flex-item remained the same size between the
measure, and layout passes, a relative position grandchild would resolve
its %-based offsets incorrectly.
This patch introduces some logic from another patch current WIP:
which got reverted for unrelated reasons.
Effectively if we have a %-based grandchild like this, we'll miss the
cache, meaning that when we later read the constraint space fixed
block-size, it'll resolve against the correct size.