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 948265 - Add CSS invert filter to nsCSSFilterInstance. r=mstange
- Loading branch information
Showing
15 changed files
with
337 additions
and
1 deletion.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
layout/reftests/svg/filters/css-filters/invert-half-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,22 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element Using a Factor of One Half</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<style type="text/css"> | ||
#target { | ||
background-color: rgb(127, 127, 127); | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a gray square.</p> | ||
<div id="target"></div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element Using a Factor of One Half</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<link rel="help" href="http://www.w3.org/TR/filter-effects-1/#funcdef-invert"> | ||
<link rel="match" href="invert-half-ref.html"> | ||
<meta name="assert" | ||
content="Given a factor of one half, the CSS invert filter function | ||
should change the color of an HTML element to gray."> | ||
<style type="text/css"> | ||
#target { | ||
filter: invert(0.5); | ||
background-color: #f00; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a gray square.</p> | ||
<div id="target"></div> | ||
</body> | ||
</html> |
22 changes: 22 additions & 0 deletions
22
layout/reftests/svg/filters/css-filters/invert-one-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,22 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element Using a Factor of One</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<style type="text/css"> | ||
#target { | ||
background-color: #0f0; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a green square.</p> | ||
<div id="target"></div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element Using a Factor of One</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<link rel="help" href="http://www.w3.org/TR/filter-effects-1/#funcdef-invert"> | ||
<link rel="match" href="invert-one-ref.html"> | ||
<meta name="assert" | ||
content="Given a factor of one, the CSS invert filter function should | ||
completely change the color of an HTML element."> | ||
<style type="text/css"> | ||
#target { | ||
filter: invert(1); | ||
background-color: #f0f; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a green square.</p> | ||
<div id="target"></div> | ||
</body> | ||
</html> |
22 changes: 22 additions & 0 deletions
22
layout/reftests/svg/filters/css-filters/invert-over-one-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,22 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element Using a Factor Over One</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<style type="text/css"> | ||
#target { | ||
background-color: #0f0; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a green square.</p> | ||
<div id="target"></div> | ||
</body> | ||
</html> |
28 changes: 28 additions & 0 deletions
28
layout/reftests/svg/filters/css-filters/invert-over-one.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 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element Using a Factor Over One</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<link rel="help" href="http://www.w3.org/TR/filter-effects-1/#funcdef-invert"> | ||
<link rel="match" href="invert-over-one-ref.html"> | ||
<meta name="assert" | ||
content="Given a factor over one, the CSS invert filter function | ||
should completely change the color of an HTML element."> | ||
<style type="text/css"> | ||
#target { | ||
filter: invert(1000); | ||
background-color: #f0f; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a green square.</p> | ||
<div id="target"></div> | ||
</body> | ||
</html> |
22 changes: 22 additions & 0 deletions
22
layout/reftests/svg/filters/css-filters/invert-percent-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,22 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element Using a Percentage</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<style type="text/css"> | ||
#target { | ||
background-color: rgb(63, 191, 63); | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a green square.</p> | ||
<div id="target"></div> | ||
</body> | ||
</html> |
28 changes: 28 additions & 0 deletions
28
layout/reftests/svg/filters/css-filters/invert-percent.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 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element Using a Percentage</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<link rel="help" href="http://www.w3.org/TR/filter-effects-1/#funcdef-invert"> | ||
<link rel="match" href="invert-percent-ref.html"> | ||
<meta name="assert" | ||
content="Given a percentage, the CSS invert filter function should | ||
change the color of an HTML element."> | ||
<style type="text/css"> | ||
#target { | ||
filter: invert(75%); | ||
background-color: #f0f; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a green square.</p> | ||
<div id="target"></div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<style type="text/css"> | ||
#target { | ||
background-color: rgb(63, 191, 63); | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a green square.</p> | ||
<div id="target"></div> | ||
</body> | ||
</html> |
22 changes: 22 additions & 0 deletions
22
layout/reftests/svg/filters/css-filters/invert-zero-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,22 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element Using a Factor of Zero</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<style type="text/css"> | ||
#target { | ||
background-color: #0f0; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a green square.</p> | ||
<div id="target"></div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element Using a Factor of Zero</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<link rel="help" href="http://www.w3.org/TR/filter-effects-1/#funcdef-invert"> | ||
<link rel="match" href="invert-zero-ref.html"> | ||
<meta name="assert" | ||
content="Given a factor of zero, the CSS invert filter function should | ||
not change the color of an HTML element."> | ||
<style type="text/css"> | ||
#target { | ||
filter: invert(0); | ||
background-color: #0f0; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a green square.</p> | ||
<div id="target"></div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- | ||
Any copyright is dedicated to the Public Domain. | ||
http://creativecommons.org/publicdomain/zero/1.0/ | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS Filters: Invert an HTML Element</title> | ||
<link rel="author" title="Max Vujovic" href="mailto:[email protected]"> | ||
<link rel="help" href="http://www.w3.org/TR/filter-effects-1/#funcdef-invert"> | ||
<link rel="match" href="invert-ref.html"> | ||
<meta name="assert" | ||
content="The CSS invert filter function should change the color of an | ||
HTML element."> | ||
<style type="text/css"> | ||
#target { | ||
filter: invert(0.75); | ||
background-color: #f0f; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<p>You should see a green square.</p> | ||
<div id="target"></div> | ||
</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