-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland "Implementing grid-template-columns/rows interpolation support"
This is a reland of commit b266b143ec994a7a97349cd2d54e18f52bf9534f It was reverted due to failures in MSAN builds: https://crrev.com/c/3704863. The variable |progress_| in InterpolableGridTrackList was uninitialized, resulting in crashes in Add(...) and RawClone(). Original change's description: > Implementing grid-template-columns/rows interpolation support > > This CL adds new interpolation types to represent grid track lists and > their track sizes, allowing interpolation of grid-template-columns and > grid-template-rows. A more detailed explanation of the design can be > found in this doc: https://docs.google.com/document/d/1byO4UU-gFRNrqAEuhL3AKgUuFprz4ZQYNEeXSF9T6w0/edit?usp=sharing > > Bug: 759665 > Change-Id: Iecef825cd843c60bf6268cdbfc2f9180c884f853 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3403003 > Reviewed-by: Ethan Jimenez <[email protected]> > Commit-Queue: Ana Sollano Kim <[email protected]> > Reviewed-by: Robert Flack <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1013983} Bug: 759665 Change-Id: I71aba0c2be7e4cd56aa92521b9b0008ab25c0ed6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3705054 Commit-Queue: Ana Sollano Kim <[email protected]> Reviewed-by: Robert Flack <[email protected]> Reviewed-by: Daniel Libby <[email protected]> Cr-Commit-Position: refs/heads/main@{#1015433}
- Loading branch information
1 parent
8b9da29
commit 9733094
Showing
8 changed files
with
212 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
css/css-grid/animation/grid-template-columns-neutral-keyframe-001.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>grid-template-columns neutral keyframe</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-grid/#track-sizing"> | ||
<meta name="assert" content="grid-template-columns supports neutral keyframe."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/interpolation-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test(() => { | ||
target.style.gridTemplateColumns = '1fr 200px'; | ||
var animation = target.animate([{}, {gridTemplateColumns: '30px 300px'}], 1000); | ||
animation.pause(); | ||
animation.currentTime = 500; | ||
assert_equals(getComputedStyle(target).gridTemplateColumns, '30px 250px'); | ||
target.style.gridTemplateColumns = '20px 200px'; | ||
assert_equals(getComputedStyle(target).gridTemplateColumns, '25px 250px'); | ||
}, 'Invalidate the result for the neutral keyframe if the value of the <track-breadth> changes.'); | ||
</script> | ||
</body> | ||
</html> |
26 changes: 26 additions & 0 deletions
26
css/css-grid/animation/grid-template-columns-neutral-keyframe-002.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>grid-template-columns neutral keyframe</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-grid/#track-sizing"> | ||
<meta name="assert" content="grid-template-columns supports neutral keyframe."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/interpolation-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test(() => { | ||
target.style.gridTemplateColumns = '10px minmax(10px, 1fr)'; | ||
var animation = target.animate([{}, {gridTemplateColumns: '30px minmax(30px, 3fr)'}], 1000); | ||
animation.pause(); | ||
animation.currentTime = 500; | ||
assert_equals(getComputedStyle(target).gridTemplateColumns, '20px minmax(20px, 2fr)'); | ||
target.style.gridTemplateColumns = '10px fit-content(10px)'; | ||
assert_equals(getComputedStyle(target).gridTemplateColumns, '20px minmax(30px, 3fr)'); | ||
}, 'Invalidate the result for the neutral keyframe if the type of <track-size> changes.'); | ||
</script> | ||
</body> | ||
</html> |
28 changes: 28 additions & 0 deletions
28
css/css-grid/animation/grid-template-columns-neutral-keyframe-003.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>grid-template-columns neutral keyframe</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-grid/#track-sizing"> | ||
<meta name="assert" content="grid-template-columns supports neutral keyframe."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/interpolation-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test(() => { | ||
target.style.gridTemplateColumns = '200px'; | ||
var animation = target.animate([{}, {gridTemplateColumns: '30px 300px'}], 1000); | ||
animation.pause(); | ||
animation.currentTime = 500; | ||
assert_equals(getComputedStyle(target).gridTemplateColumns, '30px 300px'); | ||
target.style.gridTemplateColumns = '20px 200px'; | ||
assert_equals(getComputedStyle(target).gridTemplateColumns, '25px 250px'); | ||
target.style.gridTemplateColumns = '200px'; | ||
assert_equals(getComputedStyle(target).gridTemplateColumns, '30px 300px'); | ||
}, 'Invalidate the result for the neutral keyframe if the size of the list changes.'); | ||
</script> | ||
</body> | ||
</html> |
26 changes: 26 additions & 0 deletions
26
css/css-grid/animation/grid-template-columns-neutral-keyframe-004.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>grid-template-columns neutral keyframe</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-grid/#track-sizing"> | ||
<meta name="assert" content="grid-template-columns supports neutral keyframe."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/interpolation-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test(() => { | ||
target.style.gridTemplateColumns = '10px [a] 20px [b]'; | ||
var animation = target.animate([{}, {gridTemplateColumns: '30px 40px [c]'}], 1000); | ||
animation.pause(); | ||
animation.currentTime = 250; | ||
assert_equals(getComputedStyle(target).gridTemplateColumns, '15px [a] 25px [b]'); | ||
target.style.gridTemplateColumns = '10px 20px [d]'; | ||
assert_equals(getComputedStyle(target).gridTemplateColumns, '15px 25px [d]'); | ||
}, 'Invalidate the result for the neutral keyframe if the named lines change.'); | ||
</script> | ||
</body> | ||
</html> |
26 changes: 26 additions & 0 deletions
26
css/css-grid/animation/grid-template-rows-neutral-keyframe-001.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>grid-template-rows neutral keyframe</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-grid/#track-sizing"> | ||
<meta name="assert" content="grid-template-rows supports neutral keyframe."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/interpolation-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test(() => { | ||
target.style.gridTemplateRows = '1fr 200px'; | ||
var animation = target.animate([{}, {gridTemplateRows: '30px 300px'}], 1000); | ||
animation.pause(); | ||
animation.currentTime = 500; | ||
assert_equals(getComputedStyle(target).gridTemplateRows, '30px 250px'); | ||
target.style.gridTemplateRows = '20px 200px'; | ||
assert_equals(getComputedStyle(target).gridTemplateRows, '25px 250px'); | ||
}, 'Invalidate the result for the neutral keyframe if the value of the <track-breadth> changes.'); | ||
</script> | ||
</body> | ||
</html> |
26 changes: 26 additions & 0 deletions
26
css/css-grid/animation/grid-template-rows-neutral-keyframe-002.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>grid-template-rows neutral keyframe</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-grid/#track-sizing"> | ||
<meta name="assert" content="grid-template-rows supports neutral keyframe."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/interpolation-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test(() => { | ||
target.style.gridTemplateRows = '10px minmax(10px, 1fr)'; | ||
var animation = target.animate([{}, {gridTemplateRows: '30px minmax(30px, 3fr)'}], 1000); | ||
animation.pause(); | ||
animation.currentTime = 500; | ||
assert_equals(getComputedStyle(target).gridTemplateRows, '20px minmax(20px, 2fr)'); | ||
target.style.gridTemplateRows = '10px fit-content(10px)'; | ||
assert_equals(getComputedStyle(target).gridTemplateRows, '20px minmax(30px, 3fr)'); | ||
}, 'Invalidate the result for the neutral keyframe if the type of <track-size> changes.'); | ||
</script> | ||
</body> | ||
</html> |
28 changes: 28 additions & 0 deletions
28
css/css-grid/animation/grid-template-rows-neutral-keyframe-003.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>grid-template-rows neutral keyframe</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-grid/#track-sizing"> | ||
<meta name="assert" content="grid-template-rows supports neutral keyframe."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/interpolation-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test(() => { | ||
target.style.gridTemplateRows = '200px'; | ||
var animation = target.animate([{}, {gridTemplateRows: '30px 300px'}], 1000); | ||
animation.pause(); | ||
animation.currentTime = 500; | ||
assert_equals(getComputedStyle(target).gridTemplateRows, '30px 300px'); | ||
target.style.gridTemplateRows = '20px 200px'; | ||
assert_equals(getComputedStyle(target).gridTemplateRows, '25px 250px'); | ||
target.style.gridTemplateRows = '200px'; | ||
assert_equals(getComputedStyle(target).gridTemplateRows, '30px 300px'); | ||
}, 'Invalidate the result for the neutral keyframe if the size of the list changes.'); | ||
</script> | ||
</body> | ||
</html> |
26 changes: 26 additions & 0 deletions
26
css/css-grid/animation/grid-template-rows-neutral-keyframe-004.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>grid-template-rows neutral keyframe</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-grid/#track-sizing"> | ||
<meta name="assert" content="grid-template-rows supports neutral keyframe."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/css/support/interpolation-testcommon.js"></script> | ||
</head> | ||
<body> | ||
<div id="target"></div> | ||
<script> | ||
test(() => { | ||
target.style.gridTemplateRows = '10px [a] 20px [b]'; | ||
var animation = target.animate([{}, {gridTemplateRows: '30px 40px [c]'}], 1000); | ||
animation.pause(); | ||
animation.currentTime = 250; | ||
assert_equals(getComputedStyle(target).gridTemplateRows, '15px [a] 25px [b]'); | ||
target.style.gridTemplateRows = '10px 20px [d]'; | ||
assert_equals(getComputedStyle(target).gridTemplateRows, '15px 25px [d]'); | ||
}, 'Invalidate the result for the neutral keyframe if the named lines change.'); | ||
</script> | ||
</body> | ||
</html> |