fune/testing/web-platform/tests/css/css-overflow/overflow-abpos-transform.html
Aleks Totic 4546eee14c Bug 1523562 [wpt PR 14808] - [LayoutNG] Children ScrollableOverflow applies transforms, a=testonly
Automatic update from web-platform-tests
[LayoutNG] Children ScrollableOverflow applies transforms

Scrollable overflow of container fragments is a union of
children scrollable overflows. If children have transforms,
those transforms should be applied before the union.

Added overflow-abpos-transform.html test case to explicitly
test abspos fragment with transforms.

Bug: 849751
Change-Id: Iaa43ea1617113c658accf2d02bf7574e08a03518
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/1406235
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622520}

--

wpt-commits: c46c9680c51fd9dd310578246febd44dad559d24
wpt-pr: 14808
2019-02-07 21:50:21 +00:00

32 lines
960 B
HTML

<!DOCTYPE html>
<title>CSS Overflow and Transforms: css-overflow-3</title>
<link rel="author" title="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="css transform is used to compute scroll overflow of abspos children">
<style>
#container {
position: relative;
overflow: auto;
width: 200px;
height: 200px;
}
#target {
position: absolute;
width: 150px;
height: 150px;
margin-left: 100px;
transform: translateX(-100px);
background: green;
}
</style>
<!-- There should be no scrollbars on this page -->
<div id="container">
<div id="target"></div>
</div>
<script>
test(() => {
assert_equals(document.querySelector("#container").scrollWidth, 200);
}, '#target used transform when computing scroll overflow');
</script>