[css-contain] Layout containment abspos and fixed descendants #11026
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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}