diff options
Diffstat (limited to 'layout/reftests/text-stroke')
13 files changed, 221 insertions, 0 deletions
diff --git a/layout/reftests/text-stroke/reftest.list b/layout/reftests/text-stroke/reftest.list new file mode 100644 index 0000000000..13e1e08d12 --- /dev/null +++ b/layout/reftests/text-stroke/reftest.list @@ -0,0 +1,9 @@ +# basic tests for webkit-text-stroke +# fuzzy is needed here for platform dependent backends +# These fail on Linux without webrender due to lack of antialiasing of the HTML text stroke +fuzzy(0-255,0-4100) == webkit-text-stroke-property-001.html webkit-text-stroke-property-001-ref.html +fuzzy(0-255,0-4400) == webkit-text-stroke-property-002.html webkit-text-stroke-property-002-ref.html +fuzzy(0-255,0-4100) == webkit-text-stroke-property-003.html webkit-text-stroke-property-003-ref.html +fuzzy(0-255,0-3000) == webkit-text-stroke-property-004.html webkit-text-stroke-property-004-ref.html +fuzzy(0-255,0-4100) == webkit-text-stroke-property-005.html webkit-text-stroke-property-005-ref.html +fuzzy(0-255,0-400) == webkit-text-stroke-property-006.html webkit-text-stroke-property-006-ref.html diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-001-ref.html b/layout/reftests/text-stroke/webkit-text-stroke-property-001-ref.html new file mode 100644 index 0000000000..cb23f16d0c --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-001-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: SVG text reference</title> +<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<body> +<div style="width: 500px; height: 200px;"> +<!-- set overflow to visible so that stroking near boundary won't be hidden --> +<svg xmlns="http://www.w3.org/2000/svg" style="width: 100%; height: 100%; overflow: visible;"> +<text x="0" y="100" font-size="64px" fill="transparent" stroke="green" + stroke-width="2px" stroke-linejoin="round">TEXT stroke</text> +</svg> +</div> +</body> +</html> diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-001.html b/layout/reftests/text-stroke/webkit-text-stroke-property-001.html new file mode 100644 index 0000000000..ed482d95bf --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-001.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: 2px green</title> +<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-stroke"> +<meta name="assert" content="The webkit-text-stroke of texts should take effect"> +<link rel="match" href="webkit-text-stroke-property-001-ref.html"> +<body> +<div style="width: 500px; height: 200px;"> +<text style="padding-left: 0px; color: transparent; font-size: 64px; -webkit-text-stroke: 2px green;">TEXT stroke</text> +<!-- need this inline-block to make sure text is rendered at the same position as the SVG reference --> +<div style="display:inline-block; width:0px; height:100px;"/> +</div> +<body> +<html> diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-002-ref.html b/layout/reftests/text-stroke/webkit-text-stroke-property-002-ref.html new file mode 100644 index 0000000000..e088ffd389 --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-002-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: SVG text reference</title> +<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<body> +<div style="width: 500px; height: 200px;"> +<!-- set overflow to visible so that stroking near boundary won't be hidden --> +<svg xmlns="http://www.w3.org/2000/svg" style="width: 100%; height: 100%; overflow: visible;"> +<text x="0" y="100" font-size="64px" fill="transparent" stroke="black" + stroke-width="1px" stroke-linejoin="round">TEXT stroke</text> +</svg> +</div> +</body> +</html> diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-002.html b/layout/reftests/text-stroke/webkit-text-stroke-property-002.html new file mode 100644 index 0000000000..b9eeac2014 --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-002.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: thin black</title> +<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-stroke"> +<meta name="assert" content="thin keyword should take effect for webkit-text-stroke-width"> +<link rel="match" href="webkit-text-stroke-property-002-ref.html"> +<body> +<div style="width: 500px; height: 200px;"> +<text style="padding-left: 0px; color: transparent; font-size: 64px; -webkit-text-stroke: thin black;">TEXT stroke</text> +<!-- need this inline-block to make sure text is rendered at the same position as the SVG reference --> +<div style="display:inline-block; width:0px; height:100px;"/> +</div> +<body> +<html> diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-003-ref.html b/layout/reftests/text-stroke/webkit-text-stroke-property-003-ref.html new file mode 100644 index 0000000000..5eb85d938c --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-003-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: SVG text reference</title> +<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<body> +<div style="width: 500px; height: 200px;"> +<!-- set overflow to visible so that stroking near boundary won't be hidden --> +<svg xmlns="http://www.w3.org/2000/svg" style="width: 100%; height: 100%; overflow: visible;"> +<text x="0" y="100" font-size="64px" fill="transparent" stroke="black" + stroke-width="3px" stroke-linejoin="round">TEXT stroke</text> +</svg> +</div> +</body> +</html> diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-003.html b/layout/reftests/text-stroke/webkit-text-stroke-property-003.html new file mode 100644 index 0000000000..ec4354cb34 --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-003.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: medium black</title> +<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-stroke"> +<meta name="assert" content="medium keyword should take effect for webkit-text-stroke-width"> +<link rel="match" href="webkit-text-stroke-property-003-ref.html"> +<body> +<div style="width: 500px; height: 200px;"> +<text style="padding-left: 0px; color: transparent; font-size: 64px; -webkit-text-stroke: medium black;">TEXT stroke</text> +<!-- need this inline-block to make sure text is rendered at the same position as the SVG reference --> +<div style="display:inline-block; width:0px; height:100px;"/> +</div> +<body> +<html> diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-004-ref.html b/layout/reftests/text-stroke/webkit-text-stroke-property-004-ref.html new file mode 100644 index 0000000000..8aa61e0b87 --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-004-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: SVG text reference</title> +<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<body> +<div style="width: 500px; height: 200px;"> +<!-- set overflow to visible so that stroking near boundary won't be hidden --> +<svg xmlns="http://www.w3.org/2000/svg" style="width: 100%; height: 100%; overflow: visible;"> +<text x="0" y="100" font-size="64px" fill="transparent" stroke="black" + stroke-width="5px" stroke-linejoin="round">TEXT stroke</text> +</svg> +</div> +</body> +</html> diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-004.html b/layout/reftests/text-stroke/webkit-text-stroke-property-004.html new file mode 100644 index 0000000000..18b239c3dc --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-004.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: thick black</title> +<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-stroke"> +<meta name="assert" content="thick keyword should take effect for webkit-text-stroke-width"> +<link rel="match" href="webkit-text-stroke-property-004-ref.html"> +<body> +<div style="width: 500px; height: 200px;"> +<text style="padding-left: 0px; color: transparent; font-size: 64px; -webkit-text-stroke: thick black;">TEXT stroke</text> +<!-- need this inline-block to make sure text is rendered at the same position as the SVG reference --> +<div style="display:inline-block; width:0px; height:100px;"/> +</div> +<body> +<html> diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-005-ref.html b/layout/reftests/text-stroke/webkit-text-stroke-property-005-ref.html new file mode 100644 index 0000000000..cb23f16d0c --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-005-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: SVG text reference</title> +<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<body> +<div style="width: 500px; height: 200px;"> +<!-- set overflow to visible so that stroking near boundary won't be hidden --> +<svg xmlns="http://www.w3.org/2000/svg" style="width: 100%; height: 100%; overflow: visible;"> +<text x="0" y="100" font-size="64px" fill="transparent" stroke="green" + stroke-width="2px" stroke-linejoin="round">TEXT stroke</text> +</svg> +</div> +</body> +</html> diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-005.html b/layout/reftests/text-stroke/webkit-text-stroke-property-005.html new file mode 100644 index 0000000000..306abb6789 --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-005.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: 2px green</title> +<link rel="author" title="Jeremy Chen" href="jeremychen@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<link rel="help" href="https://compat.spec.whatwg.org/#the-webkit-text-stroke"> +<meta name="assert" content="webkit-text-stroke-color should take effect"> +<link rel="match" href="webkit-text-stroke-property-005-ref.html"> +<style> +text { + padding-left: 0px; + color: red; + font-size: 64px; + -webkit-text-fill-color: transparent; + -webkit-text-stroke: 2px green; +} +</style> +<body> +<div style="width: 500px; height: 200px;"> +<text>TEXT stroke</text> +<!-- need this inline-block to make sure text is rendered at the same position as the SVG reference --> +<div style="display:inline-block; width:0px; height:100px;"/> +</div> +<body> +<html> diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-006-ref.html b/layout/reftests/text-stroke/webkit-text-stroke-property-006-ref.html new file mode 100644 index 0000000000..c1dbb774f3 --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-006-ref.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: SVG text reference</title> +<link rel="author" title="Jonathan Kew" href="jfkthame@gmail.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<style> +@font-face { font-family: test; src: url(../fonts/sil/CharisSIL-R.ttf); } +body { font-family: test; } +</style> +<body> +<div style="width: 500px; height: 400px;"> +<svg xmlns="http://www.w3.org/2000/svg" style="width: 100%; height: 100%;"> +<text x="50" y="200" font-size="64px" stroke="green" + stroke-width="10px" stroke-linejoin="round">g̤̦̈̂</text> +</svg> +</div> +</body> +</html> diff --git a/layout/reftests/text-stroke/webkit-text-stroke-property-006.html b/layout/reftests/text-stroke/webkit-text-stroke-property-006.html new file mode 100644 index 0000000000..4c5224b1d5 --- /dev/null +++ b/layout/reftests/text-stroke/webkit-text-stroke-property-006.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<meta charset="utf-8"> +<title>webkit-text-stroke: fat stroke should not be clipped</title> +<link rel="author" title="Jonathan Kew" href="jfkthame@gmail.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org"> +<style> +@font-face { font-family: test; src: url(../fonts/sil/CharisSIL-R.ttf); } +body { font-family: test; } +</style> +<body> +<div style="width: 500px; height: 400px;"> +<span style="margin-left: 50px; font-size: 64px; + -webkit-text-stroke: 10px green;">g̤̦̈̂</span> +<!-- need this inline-block to make sure text is rendered at the same position as the SVG reference --> +<div style="display:inline-block; width:0px; height:200px;"/> +</div> +<body> +<html> |