diff --git a/src/proxy-cssom.js b/src/proxy-cssom.js index 33f9268..519d338 100644 --- a/src/proxy-cssom.js +++ b/src/proxy-cssom.js @@ -166,6 +166,10 @@ export function installCSSOM() { get value() { return privateDetails.get(this).values[0]; } + + type() { + return this.value.type(); + } }, 'CSSMathInvert': class extends CSSMathValue { diff --git a/src/scroll-timeline-base.js b/src/scroll-timeline-base.js index 195d1b8..9100a49 100644 --- a/src/scroll-timeline-base.js +++ b/src/scroll-timeline-base.js @@ -570,7 +570,7 @@ function getContainingBlock(element) { } export function getScrollParent(node) { - if (!node) + if (!node || !node.isConnected) return undefined; while (node = getContainingBlock(node)) { @@ -718,7 +718,7 @@ function parseInset(value) { if (!value) return inset; - let parts = value; + let parts; // Parse string parts to if (typeof value === 'string') { parts = splitIntoComponentValues(value).map(str => { @@ -731,6 +731,10 @@ function parseInset(value) { throw TypeError(`Could not parse inset "${value}"`); } }); + } else if (Array.isArray(value)) { + parts = value; + } else { + parts = [value]; } if (parts.length === 0 || parts.length > 2) { throw TypeError('Invalid inset'); diff --git a/test/expected.txt b/test/expected.txt index d7913de..5544850 100644 --- a/test/expected.txt +++ b/test/expected.txt @@ -1052,7 +1052,7 @@ FAIL /scroll-animations/view-timelines/timeline-offset-in-keyframe.html String o PASS /scroll-animations/view-timelines/timeline-offset-in-keyframe.html Invalid timeline offset in programmatic keyframe throws FAIL /scroll-animations/view-timelines/timeline-offset-in-keyframe.html Timeline offsets in programmatic keyframes adjust for change in timeline FAIL /scroll-animations/view-timelines/timeline-offset-in-keyframe.html Timeline offsets in programmatic keyframes resolved when updating the animation effect -FAIL /scroll-animations/view-timelines/unattached-subject-inset.html Creating a view timeline with a subject that is not attached to the document works as expected +PASS /scroll-animations/view-timelines/unattached-subject-inset.html Creating a view timeline with a subject that is not attached to the document works as expected FAIL /scroll-animations/view-timelines/view-timeline-get-current-time-range-name.html View timeline current time for named range FAIL /scroll-animations/view-timelines/view-timeline-get-set-range.html Getting and setting the animation range PASS /scroll-animations/view-timelines/view-timeline-inset.html View timeline with px based inset.