Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<meta charset="utf-8">
<title>ViewTimeline source lookup with single-axis scroll containers (outer)</title>
<link rel="author" title="Free Debreuil" href="mailto:freedebreuil@google.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
.inline-scroller,
#subject {
width: 100px;
height: 100px;
}
.inline-scroller {
overflow-block: clip;
overflow-inline: scroll;
}
.vertical-writing-mode { writing-mode: vertical-rl; }
.horizontal-writing-mode { writing-mode: horizontal-tb; }
</style>
<div id="outer" class="horizontal-writing-mode inline-scroller">
<div id="inner" class="vertical-writing-mode inline-scroller">
<div id="subject" class="horizontal-writing-mode"></div>
</div>
</div>
<script>
test(() => {
const timeline = new ViewTimeline({ subject, axis: 'block' });
assert_equals(timeline.source, outer);
}, 'ViewTimeline skips non-matching ancestor scroll containers');
</script>