mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 22:28:59 +02:00
Automatic update from web-platform-tests[css-contain] Layout containment abspos and fixed descendants An element with "contain: layout" should be the containing block of any absolutely or fixed positioned descendants. The spec is very clear regarding this (https://drafts.csswg.org/css-contain/#containment-layout): "The element acts as a containing block for absolutely positioned and fixed positioned descendants." The patch just adds a new condition to ComputedStyle::CanContainFixedPositionObjects(). We already had the condition for paint containment before, so this takes advantage to add WPT tests to verify that case too. This patch causes that contain-layout-005.html starts to fail, but that's because of crbug.com/843329. There are more failing tests related to that bug, so TestExpectations is modified to reference it. BUG=785212 TEST=external/wpt/css/css-contain/contain-layout-006.html TEST=external/wpt/css/css-contain/contain-layout-007.html Change-Id: I8bb1d637bd7742961a414a5007b8ee8a8d3e66ea Reviewed-on: https://chromium-review.googlesource.com/1059557 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Manuel Rego Casasnovas <rego@igalia.com> Cr-Commit-Position: refs/heads/master@{#559045} -- wpt-commits: 90f40cbe8452a84496c3e83bbba5b1de3f26455f wpt-pr: 11026
28 lines
861 B
HTML
28 lines
861 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Containment Test: Layout containment absolutely positioned descendants</title>
|
|
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
|
|
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-layout">
|
|
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
|
|
<meta name=assert content="Layout containment makes an element to act as containing block for absolutely positioned descendants.">
|
|
<style>
|
|
#contain-layout {
|
|
contain: layout;
|
|
width: 100px;
|
|
height: 100px;
|
|
background: red;
|
|
}
|
|
|
|
#abspos {
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 0;
|
|
background: green;
|
|
width: 100px;
|
|
height: 100px;
|
|
}
|
|
</style>
|
|
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
|
<div id="contain-layout">
|
|
<div id="abspos"></div>
|
|
</div>
|