|
Lines 125-130
a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative.html_sec1
|
| 125 |
to { margin-top: 20px; margin-right: 20px; margin-bottom: 20px; } |
125 |
to { margin-top: 20px; margin-right: 20px; margin-bottom: 20px; } |
| 126 |
} |
126 |
} |
| 127 |
|
127 |
|
|
|
128 |
@keyframes anim-merge-offset-and-composite { |
| 129 |
from { color: rgb(0, 0, 0); animation-composition: add; } |
| 130 |
to { color: rgb(255, 255, 255); } |
| 131 |
from { margin-top: 8px; animation-composition: accumulate; } |
| 132 |
to { margin-top: 16px; } |
| 133 |
from { font-size: 16px; animation-composition: add; } |
| 134 |
to { font-size: 32px; } |
| 135 |
from { padding-left: 2px; animation-composition: accumulate; } |
| 136 |
to { padding-left: 4px; } |
| 137 |
} |
| 138 |
|
| 139 |
@keyframes anim-merge-offset-easing-and-composite { |
| 140 |
from { color: rgb(0, 0, 0); animation-composition: add; } |
| 141 |
to { color: rgb(255, 255, 255); } |
| 142 |
from { margin-top: 8px; animation-composition: accumulate; } |
| 143 |
to { margin-top: 16px; } |
| 144 |
from { font-size: 16px; animation-composition: add; animation-timing-function: linear; } |
| 145 |
to { font-size: 32px; } |
| 146 |
from { padding-left: 2px; animation-composition: accumulate; } |
| 147 |
to { padding-left: 4px; } |
| 148 |
} |
| 149 |
|
| 128 |
@keyframes anim-overriding { |
150 |
@keyframes anim-overriding { |
| 129 |
from { padding-top: 50px } |
151 |
from { padding-top: 50px } |
| 130 |
50%, from { padding-top: 30px } /* wins: 0% */ |
152 |
50%, from { padding-top: 30px } /* wins: 0% */ |
|
Lines 528-533
test(t => {
a/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative.html_sec2
|
| 528 |
'animation with multiple keyframes for the same time and with ' + |
550 |
'animation with multiple keyframes for the same time and with ' + |
| 529 |
'different but equivalent easing functions'); |
551 |
'different but equivalent easing functions'); |
| 530 |
|
552 |
|
|
|
553 |
test(t => { |
| 554 |
const div = addDiv(t); |
| 555 |
div.style.animation = 'anim-merge-offset-and-composite 100s'; |
| 556 |
|
| 557 |
const frames = getKeyframes(div); |
| 558 |
|
| 559 |
const expected = [ |
| 560 |
{ offset: 0, computedOffset: 0, easing: "ease", composite: "add", |
| 561 |
color: "rgb(0, 0, 0)", fontSize: "16px" }, |
| 562 |
{ offset: 0, computedOffset: 0, easing: "ease", composite: "accumulate", |
| 563 |
marginTop: "8px", paddingLeft: "2px" }, |
| 564 |
{ offset: 1, computedOffset: 1, easing: "ease", composite: "auto", |
| 565 |
color: "rgb(255, 255, 255)", fontSize: "32px", marginTop: "16px", |
| 566 |
paddingLeft: "4px" }, |
| 567 |
]; |
| 568 |
assert_frame_lists_equal(frames, expected); |
| 569 |
}, 'KeyframeEffect.getKeyframes() returns expected frames for an ' + |
| 570 |
'animation with multiple keyframes for the same time and with ' + |
| 571 |
'different composite operations'); |
| 572 |
|
| 573 |
test(t => { |
| 574 |
const div = addDiv(t); |
| 575 |
div.style.animation = 'anim-merge-offset-easing-and-composite 100s'; |
| 576 |
|
| 577 |
const frames = getKeyframes(div); |
| 578 |
|
| 579 |
const expected = [ |
| 580 |
{ offset: 0, computedOffset: 0, easing: "ease", composite: "add", |
| 581 |
color: "rgb(0, 0, 0)" }, |
| 582 |
{ offset: 0, computedOffset: 0, easing: "ease", composite: "accumulate", |
| 583 |
marginTop: "8px", paddingLeft: "2px" }, |
| 584 |
{ offset: 0, computedOffset: 0, easing: "linear", composite: "add", |
| 585 |
fontSize: "16px" }, |
| 586 |
{ offset: 1, computedOffset: 1, easing: "ease", composite: "auto", |
| 587 |
color: "rgb(255, 255, 255)", fontSize: "32px", marginTop: "16px", |
| 588 |
paddingLeft: "4px" }, |
| 589 |
]; |
| 590 |
assert_frame_lists_equal(frames, expected); |
| 591 |
}, 'KeyframeEffect.getKeyframes() returns expected frames for an ' + |
| 592 |
'animation with multiple keyframes for the same time and with ' + |
| 593 |
'different easing functions and composite operations'); |
| 594 |
|
| 531 |
test(t => { |
595 |
test(t => { |
| 532 |
const div = addDiv(t); |
596 |
const div = addDiv(t); |
| 533 |
div.style.animation = 'anim-overriding 100s'; |
597 |
div.style.animation = 'anim-overriding 100s'; |