Skip to content

Commit

Permalink
CIS: Apply contain-intrinsic-size: auto to content-visibility: hidden…
Browse files Browse the repository at this point in the history
… as well

Based on discussion on
w3c/csswg-drafts#6308 (comment)

and based on the spec as written, contain-intrinsic-size auto should
apply to all elements that skip their contents, not just
content-visibility: auto elements.

This patch does this.

R=chrishtr@chromium.org

Change-Id: Ibf38be014ae25ff64af027f6c1608caa7ded3514
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3777917
Reviewed-by: Oriol Brufau <obrufau@igalia.com>
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1030610}
  • Loading branch information
vmpstr authored and pull[bot] committed Dec 7, 2023
1 parent b576b7b commit 1236384
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions css/css-sizing/contain-intrinsic-size/auto-005.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#last-remembered">
<title>Tests that contain-intrinsic-size: auto only works with content-visibility: auto, not just hidden visibility</title>
<title>Tests that contain-intrinsic-size: auto also works with content-visibility: hidden</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

Expand All @@ -17,8 +17,7 @@
el.style.contain = "size";
el.style.contentVisibility = "hidden";
log.innerText = el.offsetHeight;
// No content-visibility: auto, so this should remain 1.
assert_equals(el.offsetHeight, 1);
assert_equals(el.offsetHeight, 50);
}

var t = async_test("contain-intrinsic-size: auto");
Expand Down

0 comments on commit 1236384

Please sign in to comment.