Skip to content

Commit

Permalink
Fix unattached subject inset test (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesodland authored Feb 5, 2024
1 parent 32b7ea4 commit 2d23e03
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/proxy-cssom.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ export function installCSSOM() {
get value() {
return privateDetails.get(this).values[0];
}

type() {
return this.value.type();
}
},

'CSSMathInvert': class extends CSSMathValue {
Expand Down
8 changes: 6 additions & 2 deletions src/scroll-timeline-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ function getContainingBlock(element) {
}

export function getScrollParent(node) {
if (!node)
if (!node || !node.isConnected)
return undefined;

while (node = getContainingBlock(node)) {
Expand Down Expand Up @@ -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 => {
Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion test/expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2d23e03

Please sign in to comment.