Skip to content

Commit

Permalink
Removed scroll start and end offset properties of ScrollTimeline
Browse files Browse the repository at this point in the history
Made modifications spec'ed in
w3c/csswg-drafts#5803:
- Removed startOffset and endOffset attributes.
- Updated procedures based on spec changes, including allowing single
scroll offset of 'auto'.

Bug: 1094014
Change-Id: Id08c9ce1818bd561ac291ca3e1f99c22dbb15674
  • Loading branch information
ogerchikov authored and chromium-wpt-export-bot committed Apr 21, 2021
1 parent cac1166 commit 48a3ca4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scroll-animations/constructor.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@

test(t => {
let constructorFunc = function() {
new ScrollTimeline({timeRange: 100, scrollOffsets: ['auto']})
new ScrollTimeline({timeRange: 100, scrollOffsets: [CSS.percent(20), 'auto', CSS.percent(50)]})
};
assert_throws_js(TypeError, constructorFunc);
}, 'Creating a ScrollTimeline with an scrollOffsets value of [\'auto\'] should throw');
}, 'Creating a ScrollTimeline with an scrollOffsets value of [CSS.percent(20), \'auto\', CSS.percent(50)] should throw');

const gValidScrollOffsetValues = [
CSS.px(0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@
let timeline4 = new ScrollTimeline({
scrollSource: scroller4,
timeRange: 1e13,
startScrollOffset: CSS.px(0),
endScrollOffset: CSS.px(100)
scrollOffsets: [CSS.px(0), CSS.px(100)]
});

element.getAnimations()[0].timeline = timeline4;
Expand Down
2 changes: 1 addition & 1 deletion scroll-animations/multiple-scroll-offsets.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
scrollSource: scroller,
timeRange: scrollerSize,
orientation: 'block',
scrollOffsets: [CSS.px(0), CSS.px(400), CSS.px(200)],
scrollOffsets: ['auto', CSS.px(400), CSS.px(200)],
});

scroller.scrollTop = 100;
Expand Down

0 comments on commit 48a3ca4

Please sign in to comment.