Conversation
|
Hi @BorisChiou -- sorry to throw so many tasks your way at the same time. I added you as a reviewer of this because I think you did the shape interpolation in Gecko. Is that right? |
|
I did the CSS |
I contributed the |
There was a problem hiding this comment.
Overall looks good, but have some typos and nits. Would you mind updating them before merging? I request changes for now and will approve them after you update these nits. Thanks.
Basically, clip-path-shape-interpolation-*.html should be in the animation folder because these two files test the css animations. However, this is my bad because I added clip-path-path-interpolation-*.html in the same places. This patch looks good, and perhaps we should move them into animation folder in the future.
| test_valid_value("clip-path", "shape(from 10px 10px, arc to 50px 1pt of 10px 10px)", "shape(from 10px 10px, arc to 50px 1pt of 10px ccw small)"); | ||
| test_valid_value("clip-path", "shape(from 10px 10px, arc to 50px 1pt of 10px 10px small rotate 0deg)", "shape(from 10px 10px, arc to 50px 1pt of 10px ccw small)"); |
There was a problem hiding this comment.
Omitting rotate 0deg makes sense to me, but ccw and small are also default values, so I guess we don't have to serialize them, either?
So this should be something like:
test_valid_value("clip-path", "shape(from 10px 10px, arc to 50px 1pt of 10px 10px small rotate 0deg)", "shape(from 10px 10px, arc to 50px 1pt of 10px)");?
| test_valid_value("clip-path", "shape(from 10px 10px, smooth to 50px 1pt)"); | ||
| test_valid_value("clip-path", "shape(from 10px 10px, arc to 50px 1pt of 10px 10px)", "shape(from 10px 10px, arc to 50px 1pt of 10px ccw small)"); | ||
| test_valid_value("clip-path", "shape(from 10px 10px, arc to 50px 1pt of 10px 10px small rotate 0deg)", "shape(from 10px 10px, arc to 50px 1pt of 10px ccw small)"); | ||
| test_valid_value("clip-path", "shape(from 10% 1rem, arc to 50px 1pt of 20% cw large rotate 25deg)", "shape(from 10% 1rem, arc to 50px 1pt of 20% rotate 25deg cw large)"); |
There was a problem hiding this comment.
Perhaps we should follow the order when serializing these: [[<arc-sweep>] || [<arc-size>] || rotate [<angle>]]?
so this should be something like:
test_valid_value("clip-path", "shape(from 10% 1rem, arc to 50px 1pt of 20% rotate 25deg cw large)", "shape(from 10% 1rem, arc to 50px 1pt of 20% cw large rotate 25deg)");?
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>CSS Masking: Test clip-path property and shape function with nonzero fill</title> |
| <link rel="help" href="https://drafts.csswg.org/css-shapes-2/#funcdef-shape"> | ||
| <link rel="match" href="reference/clip-path-path-002-ref.html"> | ||
| <meta name="assert" content="The clip-path property takes the basic shape | ||
| 'shape()' for clipping. Test nonzero path function. On pass you should |
| <meta name="assert" content="The clip-path property takes the basic shape | ||
| 'shape()' for clipping. Test curves."> |
There was a problem hiding this comment.
nit: we don't need to add meta "assert" for reference file
| <link rel="match" href="reference/clip-path-path-002-ref.html"> | ||
| <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> | ||
| <meta name="assert" content="The clip-path property takes the basic shape | ||
| 'shape()' for clipping. Test nonzero path function. On pass you should |
| <!DOCTYPE html> | ||
| <html class="reftest-wait"> | ||
| <head> | ||
| <title>CSS Masking: Test clip-path nonzero path interpolation</title> |
| <link rel="help" href="https://drafts.csswg.org/css-shapes-2/#funcdef-shape"> | ||
| <link rel="match" href="reference/clip-path-path-interpolation-002-ref.html"> | ||
| <meta name="assert" content="The clip-path property takes the basic shape | ||
| 'shape()' for clipping. Test the interpolation of nonzero |
| test_interpolation({ | ||
| property: 'clip-path', | ||
| from: 'shape(from 5% 5px, smooth by 10% 10px via 0% 80px, smooth by 30% 20px)', | ||
| to: 'shape(from 15% 15px, smooth by 20% 0px via 10% 60px, smooth by 20% 30px)', | ||
| }, [ | ||
| {at: -0.3, expect: 'shape(from 2% 2px, smooth by 7% 13px via -3% 86px, smooth by 33% 17px)'}, | ||
| {at: 0, expect: 'shape(from 5% 5px, smooth by 10% 10px via 0% 80px, smooth by 30% 20px)'}, | ||
| {at: 0.5, expect: 'shape(from 10% 10px, smooth by 15% 5px via 5% 70px, smooth by 25% 25px)'}, | ||
| {at: 1.5, expect: 'shape(from 20% 20px, smooth by 25% -5px via 15% 50px, smooth by 15% 35px)'}, | ||
| ]); |
There was a problem hiding this comment.
Is this duplicated? Looks like this is the same as the previous one.
| test_interpolation({ | ||
| property: 'clip-path', | ||
| from: 'shape(from 5% 5px, curve by 10% 10px via 0% 80px, curve by 30% 20px via 20% 50px 25% 70px)', | ||
| to: 'shape(from 15% 15px, curve by 20% 0px via 10% 60px, curve by 20% 30px via 30% 40px -5% 100px)', | ||
| }, [ | ||
| {at: -0.3, expect: 'shape(from 2% 2px, curve by 7% 13px via -3% 86px, curve by 33% 17px via 17% 53px 34% 61px)'}, | ||
| {at: 0, expect: 'shape(from 5% 5px, curve by 10% 10px via 0% 80px, curve by 30% 20px via 20% 50px 25% 70px)'}, | ||
| {at: 0.5, expect: 'shape(from 10% 10px, curve by 15% 5px via 5% 70px, curve by 25% 25px via 25% 45px 10% 85px)'}, | ||
| {at: 1.5, expect: 'shape(from 20% 20px, curve by 25% -5px via 15% 50px, curve by 15% 35px via 35% 35px -20% 115px)'}, | ||
| ]); |
There was a problem hiding this comment.
Is this duplicated? Looks like this is the same as the previous one.
There was a problem hiding this comment.
It uses by instead of to
No description provided.