forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1862636 [wpt PR 42916] - Support mask-position and mask-repeat on…
… SVG content, a=testonly Automatic update from web-platform-tests Support mask-position and mask-repeat on SVG content Bug: 1496473 Change-Id: Ib1a1a7a938ee14ec610584ee587050e29afa6fd3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4995155 Commit-Queue: Fredrik Söderquist <[email protected]> Reviewed-by: Philip Rogers <[email protected]> Cr-Commit-Position: refs/heads/main@{#1219402} -- wpt-commits: 93d8a2a8b6f29b647956d2349bdc5c367c14af41 wpt-pr: 42916
- Loading branch information
1 parent
2f51f53
commit f7c8f64
Showing
6 changed files
with
209 additions
and
4 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
testing/web-platform/tests/css/css-masking/mask-image/mask-position-1a-svg.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,46 @@ | ||
<!DOCTYPE html> | ||
<title>CSS Masking: mask-position: mask positioning, SVG content</title> | ||
<link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-mask-position"> | ||
<link rel="match" href="mask-position-1-ref.html"> | ||
<meta name="assert" content="Test checks whether positioning mask layer works correctly or not."> | ||
<style type="text/css"> | ||
rect.frame { | ||
x: -0.5px; | ||
y: -0.5px; | ||
width: 101px; | ||
height: 101px; | ||
stroke: black; | ||
fill: none; | ||
} | ||
|
||
rect.masked { | ||
width: 100px; | ||
height: 100px; | ||
fill: purple; | ||
mask-image: url(support/50x50-opaque-blue.svg); | ||
mask-repeat: no-repeat; | ||
} | ||
|
||
#masked1 { mask-position: right 20% bottom 70%; } | ||
#masked2 { mask-position: bottom 70% right 20%; } | ||
#masked3 { mask-position: right 30px bottom 25px; } | ||
#masked4 { mask-position: bottom 25px right 30px; } | ||
</style> | ||
<svg height="408"> | ||
<g transform="translate(1 1)"> | ||
<rect class="masked" id="masked1"/> | ||
<rect class="frame"/> | ||
</g> | ||
<g transform="translate(1 103)"> | ||
<rect class="masked" id="masked2"/> | ||
<rect class="frame"/> | ||
</g> | ||
<g transform="translate(1 205)"> | ||
<rect class="masked" id="masked3"/> | ||
<rect class="frame"/> | ||
</g> | ||
<g transform="translate(1 307)"> | ||
<rect class="masked" id="masked4"/> | ||
<rect class="frame"/> | ||
</g> | ||
</svg> |
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
63 changes: 63 additions & 0 deletions
63
testing/web-platform/tests/css/css-masking/mask-image/mask-repeat-1-svg.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,63 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>CSS Masking: mask-repeat: repeated mask layer image, SVG content</title> | ||
<link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-mask-repeat"> | ||
<link rel="match" href="mask-repeat-1-ref.html"> | ||
<meta name="assert" content="Test checks whether repeated mask layer works correctly or not."> | ||
<style type="text/css"> | ||
svg { | ||
display: block; | ||
} | ||
|
||
rect.frame { | ||
x: -0.5px; | ||
y: -0.5px; | ||
width: 116px; | ||
height: 116px; | ||
stroke: black; | ||
fill: none; | ||
} | ||
|
||
rect.masked { | ||
width: 115px; | ||
height: 115px; | ||
fill: purple; | ||
mask-image: url(support/50x50-opaque-blue.svg); | ||
mask-position: left top; | ||
} | ||
|
||
#no-repeat { | ||
mask-repeat: no-repeat no-repeat; | ||
} | ||
#repeat { | ||
mask-repeat: repeat repeat; | ||
} | ||
#repeat-x { | ||
mask-repeat: repeat no-repeat; | ||
} | ||
#repeat-y { | ||
mask-repeat: no-repeat repeat; | ||
} | ||
</style> | ||
<svg height="585"> | ||
<g transform="translate(1 1)"> | ||
<rect class="masked"/> | ||
<rect class="frame"/> | ||
</g> | ||
<g transform="translate(1 118)"> | ||
<rect class="masked" id="no-repeat"/> | ||
<rect class="frame"/> | ||
</g> | ||
<g transform="translate(1 235)"> | ||
<rect class="masked" id="repeat"/> | ||
<rect class="frame"/> | ||
</g> | ||
<g transform="translate(1 352)"> | ||
<rect class="masked" id="repeat-x"/> | ||
<rect class="frame"/> | ||
</g> | ||
<g transform="translate(1 469)"> | ||
<rect class="masked" id="repeat-y"/> | ||
<rect class="frame"/> | ||
</g> | ||
</svg> |
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
48 changes: 48 additions & 0 deletions
48
testing/web-platform/tests/css/css-masking/mask-image/mask-repeat-2-svg.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,48 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>CSS Masking: mask-repeat: repeated mask layer image, SVG content</title> | ||
<link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-mask-repeat"> | ||
<link rel="match" href="mask-repeat-2-ref.html"> | ||
<meta name="assert" content="Test checks whether repeated mask layer works correctly or not."> | ||
<style type="text/css"> | ||
rect.frame { | ||
x: -0.5px; | ||
y: -0.5px; | ||
width: 129px; | ||
height: 129px; | ||
stroke: black; | ||
fill: none; | ||
} | ||
|
||
rect.masked { | ||
width: 128px; | ||
height: 128px; | ||
fill: purple; | ||
mask-image: url(support/50x50-opaque-blue.svg); | ||
mask-position: left top; | ||
} | ||
|
||
#space { | ||
mask-repeat: space; | ||
} | ||
#space-x { | ||
mask-repeat: space no-repeat; | ||
} | ||
#space-y { | ||
mask-repeat: no-repeat space; | ||
} | ||
</style> | ||
<svg height="390"> | ||
<g transform="translate(1 1)"> | ||
<rect class="masked" id="space"/> | ||
<rect class="frame"/> | ||
</g> | ||
<g transform="translate(1 131)"> | ||
<rect class="masked" id="space-x"/> | ||
<rect class="frame"/> | ||
</g> | ||
<g transform="translate(1 261)"> | ||
<rect class="masked" id="space-y"/> | ||
<rect class="frame"/> | ||
</g> | ||
</svg> |
48 changes: 48 additions & 0 deletions
48
testing/web-platform/tests/css/css-masking/mask-image/mask-repeat-3-svg.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,48 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>CSS Masking: mask-repeat: repeated mask layer image, SVG content</title> | ||
<link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-mask-repeat"> | ||
<link rel="match" href="mask-repeat-3-ref.html"> | ||
<meta name="assert" content="Test checks whether repeated mask layer works correctly or not."> | ||
<style type="text/css"> | ||
rect.frame { | ||
x: -0.5px; | ||
y: -0.5px; | ||
width: 151px; | ||
height: 151px; | ||
stroke: black; | ||
fill: none; | ||
} | ||
|
||
rect.masked { | ||
width: 150px; | ||
height: 150px; | ||
fill: purple; | ||
mask-image: url(support/50x50-opaque-blue.svg); | ||
mask-position: left top; | ||
} | ||
|
||
#round { | ||
mask-repeat: round; | ||
} | ||
#round-x { | ||
mask-repeat: round no-repeat; | ||
} | ||
#round-y { | ||
mask-repeat: no-repeat round; | ||
} | ||
</style> | ||
<svg height="456"> | ||
<g transform="translate(1 1)"> | ||
<rect class="masked" id="round"/> | ||
<rect class="frame"/> | ||
</g> | ||
<g transform="translate(1 153)"> | ||
<rect class="masked" id="round-x"/> | ||
<rect class="frame"/> | ||
</g> | ||
<g transform="translate(1 305)"> | ||
<rect class="masked" id="round-y"/> | ||
<rect class="frame"/> | ||
</g> | ||
</svg> |