summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/overflow/transform-should-update-container-overflow.html
blob: 71905a93e817ad4c35ffc1cb5b95e606c6d2820f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<style>
#container {
    width: 100px;
    height: 100px;
    position: relative;
    overflow: hidden;
}

#composited {
    transform: translateZ(0);
    width: 100px;
    height: 100px;
    background-color: green;
}
</style>
This test verifies layout overflow will be recomputed when CSS transform is changed.
<div id="container" data-expected-scroll-width="100" data-expected-scroll-height="100">
    <div id="composited">
    </div>
</div>
<script src="../../resources/check-layout.js"></script>
<script>
    checkLayout("#container");
    var composited = document.getElementById('composited');
    composited.style.webkitTransform = 'translate3d(100px, 100px, 0)';
    var container = document.getElementById('container');
    container.setAttribute("data-expected-scroll-width", 200);
    container.setAttribute("data-expected-scroll-height", 200);
    checkLayout("#container");
</script>