gecko-dev/testing/web-platform/tests/css/css-flexbox/position-absolute-006.html
David Grogan 85565aa29e Bug 1629196 [wpt PR 22863] - [FlexNG] Fix static position for abspos flex items, a=testonly
Automatic update from web-platform-tests
[FlexNG] Fix static position for abspos flex items

Absolutely positioned flex items were getting placed wrong when the
containing block was legacy. This patch stores the relevant edges in
legacy and makes NG pick them up on the other side.

The above only works for abspos items controlled by NG. Legacy abspos
flex items with a legacy containing block, e.g.
position-absolute-009.html in this CL, still don't work.

Bug: 845235, 1066859
Change-Id: I3d6beb0bfe80292181b81d2e42bf79bf73ddc834
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2146133
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: David Grogan <dgrogan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760290}

--

wpt-commits: 838f1813d0ad18b9fefb836936af6bfc2c8051c1
wpt-pr: 22863
2020-04-28 11:28:42 +00:00

22 lines
770 B
HTML

<!DOCTYPE html>
<title>abspos items</title>
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#abspos-items">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<link rel="bookmark" href="https://crbug.com/1066859">
<meta name="assert" content="Flex sets correct static position for abspos item when containing block is grid." />
<style>
div {
height: 100px;
width: 100px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="display: grid; position: relative;">
<div style="display: flex; align-items: center; background: red">
<div style="position: absolute; background: green">
</div>
</div>