-
-
Notifications
You must be signed in to change notification settings - Fork 980
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Implement
mask-image
CSS property support
Implemented by reusing AddMask display list item that was initially added for `background-clip` property. Progress on flashlight effect on https://null.com/games/athena-crisis
- Loading branch information
1 parent
7b7bb60
commit 96a3576
Showing
11 changed files
with
149 additions
and
58 deletions.
There are no files selected for viewing
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
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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
Tests/LibWeb/Ref/expected/wpt-import/css/css-masking/mask-image/mask-image-1-ref.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,19 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>CSS Masking: mask-image: mask layer image</title> | ||
<link rel="author" title="Astley Chen" href="mailto:[email protected]"> | ||
<link rel="author" title="Mozilla" href="https://www.mozilla.org"> | ||
<style type="text/css"> | ||
div { | ||
background-color: purple; | ||
width: 100px; | ||
height: 50px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div></div> | ||
</body> | ||
</html> |
28 changes: 28 additions & 0 deletions
28
Tests/LibWeb/Ref/input/wpt-import/css/css-masking/mask-image/mask-image-1a.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>CSS Masking: mask-image: mask layer image</title> | ||
<link rel="author" title="Astley Chen" href="mailto:[email protected]"> | ||
<link rel="author" title="Mozilla" href="https://www.mozilla.org"> | ||
<link rel="help" href="https://www.w3.org/TR/css-masking-1/#the-mask-image"> | ||
<link rel="match" href="../../../../../expected/wpt-import/css/css-masking/mask-image/mask-image-1-ref.html"> | ||
<meta name="assert" content="Test checks whether image as mask layer works correctly or not."> | ||
<style type="text/css"> | ||
div { | ||
background-color: purple; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
|
||
div.mask-by-png { | ||
mask-image: url(../../../../../data/transparent-100x50-blue-100x50.png); | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="mask-by-png"></div> | ||
<!-- Hack to make the test runner wait for the image to load --> | ||
<img src="../../../../../data/transparent-100x50-blue-100x50.png" style="opacity: 0"/> | ||
</body> | ||
</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
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
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