Bug 902525 - Part 6: some basic test files for HTML blending r=roc

This commit is contained in:
Rik Cabanier 2013-09-15 16:43:12 -07:00
parent b025d08c1e
commit f85ca4f984
14 changed files with 246 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,28 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<script type="text/javascript">
window.onload = function() {
var c = document.getElementById("b");
var ctx = c.getContext("2d");
ctx.fillStyle = "rgb(0,0,0)";
ctx.fillRect(0,0,100,100);
}
</script>
<style>
#a {
width: 200px;
height: 200px;
background-color: rgb(0,255,0);
}
#b {
width: 100px;
height: 100px;
}
</style>
<div id="a">
<canvas width="100" height="100" id="b"/>
</div>
</html>

View File

@ -0,0 +1,29 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<script type="text/javascript">
window.onload = function() {
var c = document.getElementById("b");
var ctx = c.getContext("2d");
ctx.fillStyle = "rgb(0,255,0)";
ctx.fillRect(0,0,100,100);
}
</script>
<style>
#a {
width: 200px;
height: 200px;
background-color: rgb(0,255,0);
}
#b {
width: 100px;
height: 100px;
mix-blend-mode:difference;
}
</style>
<div id="a">
<canvas width="100" height="100" id="b"/>
</div>
</html>

View File

@ -0,0 +1,22 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<style>
#a {
width: 200px;
height: 200px;
background-color: rgb(0,255,0);
}
#b {
width: 100px;
height: 100px;
background-color: rgb(0,0,0);
}
</style>
<div id="a">
<div id="b">
</div>
</div>
</html>

View File

@ -0,0 +1,23 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<style>
#a {
width: 200px;
height: 200px;
background-color: rgb(0,255,0);
}
#b {
width: 100px;
height: 100px;
background-color: rgb(0,255,0);
mix-blend-mode:difference;
}
</style>
<div id="a">
<div id="b">
</div>
</div>
</html>

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<style>
#a {
background-color: rgb(0,255,0);
width: 200px;
height: 210px;
}
#b {
width: 100px;
height: 100px;
background-color: rgb(0,0,0);
}
</style>
<div id="a">
</div>
</html>

View File

@ -0,0 +1,30 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<style>
.a {
background-color: rgb(0,255,0);
}
#b {
width: 200px;
height: 210px;
}
.c {
width: 100px;
height: 100px;
mix-blend-mode: difference;
}
#d {
z-index: 1;
position: absolute;
top:110px;
}
</style>
<div id="b" class="a">
<div id="d">
<div class="a c"></div>
</div>
</div>
</html>

View File

@ -0,0 +1,22 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<style>
#a {
width: 200px;
height: 200px;
background-color: rgb(0,255,0);
}
#b {
width: 100px;
height: 100px;
background: linear-gradient(rgb(0,255,255), rgb(255,255,0));
}
</style>
<div id="a">
<div id="b">
</div>
</div>
</html>

View File

@ -0,0 +1,23 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<style>
#a {
width: 200px;
height: 200px;
background-color: rgb(0,255,0);
}
#b {
width: 100px;
height: 100px;
background: linear-gradient(rgb(0,0,255), rgb(255,0,0));
mix-blend-mode:difference;
}
</style>
<div id="a">
<div id="b">
</div>
</div>
</html>

View File

@ -0,0 +1,20 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<style>
#a {
width: 200px;
height: 200px;
background-color: rgb(0,255,0);
}
#b {
width: 100px;
height: 100px;
}
</style>
<div id="a">
<img src="as-image/black100x100.png" id="b"/>
</div>
</html>

View File

@ -0,0 +1,21 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<style>
#a {
width: 200px;
height: 200px;
background-color: rgb(0,255,0);
}
#b {
width: 100px;
height: 100px;
mix-blend-mode:difference;
}
</style>
<div id="a">
<img src="as-image/green100x100.png" id="b"/>
</div>
</html>

View File

@ -0,0 +1,5 @@
pref(layout.css.mix-blend-mode.enabled,true) == blend-canvas.html blend-canvas-ref.html
pref(layout.css.mix-blend-mode.enabled,true) == blend-constant-background-color.html blend-constant-background-color-ref.html
pref(layout.css.mix-blend-mode.enabled,true) == blend-gradient-background-color.html blend-gradient-background-color-ref.html
pref(layout.css.mix-blend-mode.enabled,true) == blend-image.html blend-image-ref.html
pref(layout.css.mix-blend-mode.enabled,true) == blend-difference-stacking.html blend-difference-stacking-ref.html

View File

@ -51,6 +51,9 @@ include canvas/reftest.list
# css animations
include css-animations/reftest.list
# blending/
skip-if(B2G||(Android&&AndroidVersion<15)) include css-blending/reftest.list
# css calc() tests
include css-calc/reftest.list