Bug 1584586 [wpt PR 19374] - [LayoutNG] testcase for codependent scrollbars, a=testonly

Automatic update from web-platform-tests
[LayoutNG] testcase for codependent scrollbars

Just a testcase, because the bug cannot be fixed at this time.

Aborted attempt to fix this is at:
https://chromium-review.googlesource.com/c/chromium/src/+/1820177/4

Bug: 1007065
Change-Id: I44195ec77cc8b0924c81a567a9505e8a77f7d492
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829878
Auto-Submit: Aleks Totic <atotic@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701345}

--

wpt-commits: e2f322248d49cfb11a1bbfebc49f4661b913dd96
wpt-pr: 19374
This commit is contained in:
Aleks Totic 2019-10-03 09:54:54 +00:00 committed by moz-wptsync-bot
parent 3057cad614
commit c76722fa45

View File

@ -0,0 +1,38 @@
<!DOCTYPE html>
<link rel="author" href="mailto:atotic@google.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://www.w3.org/TR/css-overflow-3/#scrollable">
<meta name="assert" content="What happens when appearance of one scrollbar triggers the other one?">
<style>
.container {
width: 100px;
height: 100px;
overflow: auto;
background: #DDD;
--too-big: 120px;
--slightly-smaller: 95px;
}
.target {
width: 120px;
height: 95px;
background: rgba(0,255,0,0.3);
}
</style>
<!-- -->
<div class="container">
<div class="target" style="width:var(--too-big);height:var(--slightly-smaller)" ></div>
</div>
<div class="container">
<div class="target" style="height:var(--too-big);width:var(--slightly-smaller)" ></div>
</div>
<script>
test(() => {
Array.from(document.querySelectorAll(".container")).forEach( el => {
let verticalScrollbar = el.offsetWidth - el.clientWidth;
let horizontalScrollbar = el.offsetHeight - el.clientHeight;
assert_equals(verticalScrollbar, horizontalScrollbar, "both scrollbars are visible.");
});
}, 'appearance of one scrollbar caused the other scrollbar to appear.');
</script>