Skip to content

Commit

Permalink
[anchor-position] Add block fragmentation tests
Browse files Browse the repository at this point in the history
The block fragmentation support should be covered by the
inline fragmentation support in r1028600 crrev.com/c/3787752,
though it was not tested.

This patch adds tests for block fragmentation using multicol.
The tests pass without further code changes.

This patch has no behavior changes.

Bug: 1309178
Change-Id: I6cc1ff722fdccddcc494da10705f4a4112e4167b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3787518
Reviewed-by: Kent Tamura <tkent@chromium.org>
Auto-Submit: Koji Ishii <kojii@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1028608}
  • Loading branch information
kojiishi authored and Chromium LUCI CQ committed Jul 27, 2022
1 parent fde46b2 commit cd10df2
Showing 1 changed file with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<link rel="help" href="https://tabatkins.github.io/specs/css-anchor-position/#propdef-anchor-name">
<link rel="author" href="mailto:kojii@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<style>
#container {
position: relative;
font-family: Ahem;
font-size: 10px;
line-height: 1;
width: 10em;
}
.columns {
column-width: 100px;
column-count: 3;
column-gap: 10px;
height: 100px;
}
#anchor1 {
anchor-name: --a1;
background: blue;
}
.target {
position: absolute;
}
</style>
<body onload="checkLayout('.target')">
<div id="container">
<div>spacer</div>
<div class="columns">
<div style="height: 150px"></div>
<div id="anchor1" style="height: 100px"></div>
</div>

<div class="target" style="left: anchor(--a1 left)" data-offset-x=110></div>
<div class="target" style="right: anchor(--a1 right)" data-offset-x=320></div>
<div class="target" style="top: anchor(--a1 top)" data-offset-y=10></div>
<div class="target" style="bottom: anchor(--a1 bottom)" data-offset-y=110></div>
</div>
</body>

0 comments on commit cd10df2

Please sign in to comment.