blob: 3126269b0ebb989701cd6fd2cef9761e7fedffed [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<!-- Bugzilla link: http://webkit.org/b/94094 -->
<title>CSS Test: CSS3 text-decoration-style repaint</title>
<link rel="help" href="http://http://dev.w3.org/csswg/css3-text/#text-decoration-style"/>
<meta name="flags" content="ahem"/>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
</script>
<script src="../../../../resources/run-after-layout-and-paint.js" type="text/javascript"></script>
<script>
function repaintTest() {
document.getElementById("test-initial-blank").style.textDecorationStyle = '';
document.getElementById("test-initial-explicit").style.textDecorationStyle = 'initial';
document.getElementById("test-invalid-unknown").style.textDecorationStyle = 'unknown';
document.getElementById("test-inherit-explicit").style.textDecorationStyle = 'inherit';
document.getElementById("test-repaint-parent").style.textDecorationStyle = 'double';
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body onload="runAfterLayoutAndPaint(repaintTest);" style="font: 20px Ahem; -webkit-font-smoothing: none;
-webkit-text-stroke: 1px black; -webkit-text-fill-color: white; text-decoration-skip-ink: none;">
<!-- Blank and 'initial' values fallbacks to 'solid' on repaintTest(). -->
<p><span id="test-initial-blank" style="text-decoration: underline; text-decoration-style: double;">lorem ipsum</span></p>
<p><span id="test-initial-explicit" style="text-decoration: underline; text-decoration-style: double;">lorem ipsum</span></p>
<!-- Unknown value is ignored and fallback to last valid value on repaintTest() -->
<p><span id="test-invalid-unknown" style="text-decoration: underline; text-decoration-style: double;">lorem ipsum</span></p>
<!-- Ancestor can explicitly request 'inherit' from parent on repaintTest() -->
<p><span style="text-decoration: underline; text-decoration-style: double;"><span id="test-inherit-explicit" style="text-decoration-style: dashed;">lorem ipsum</span></span></p>
<!-- Ancestor span should not inherit 'double' style from parent on repaintTest(). -->
<p><span id="test-repaint-parent" style="text-decoration: underline;"><span>lorem ipsum</span></span></p>
</body>
</html>