Skip to content

Commit

Permalink
Bug 1737862 [wpt PR 31384] - Fix null dereference when constructing s…
Browse files Browse the repository at this point in the history
…croll timeline offsets, a=testonly

Automatic update from web-platform-tests
Fix null dereference when constructing scroll timeline offsets

Bug: 1242380
Change-Id: I9346b3432585bff7c62c15f4b4e748c15c126862
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3244932
Reviewed-by: Steve Kobes <[email protected]>
Commit-Queue: Kevin Ellis <[email protected]>
Cr-Commit-Position: refs/heads/main@{#935399}

--

wpt-commits: 818de8aacd25ace62589cc0773b1658714a3a46b
wpt-pr: 31384
  • Loading branch information
Kevin Ellis authored and moz-wptsync-bot committed Oct 29, 2021
1 parent c812cea commit da7e7fd
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#scrolltimeline-interface">
<style>
.scroller {
overflow: auto;
height: 100px;
width: 100px;
will-change: transform;
}

.contents {
height: 1000px;
width: 100%;
}
</style>
<div class="scroller">
<div class="contents"></div>
</div>
<script>
// Test passes if it does not crash.
// Scroll timeline animations are progress-based and not compatible with
// delays specified in milliseconds.
const scroller = document.querySelector('.scroller');
const animation = new Animation();
const timeline = animation.timeline;
const duration = timeline.duration;
const options = {
scrollSource: scroller,
scrollOffsets: [new CSSMathInvert(duration)]
};
const scroll_timeline = new ScrollTimeline(options);
</script>

0 comments on commit da7e7fd

Please sign in to comment.