LibWeb: Implement text-decoration: spelling-error and grammar-error

This commit is contained in:
Sam Atkins
2025-02-27 19:51:36 +00:00
parent 7668f91b60
commit 532c01c388
9 changed files with 74 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -8,6 +8,8 @@
.strikethrough { text-decoration: line-through dotted green 5px; }
.current-color { color: #8B4513; text-decoration: underline; }
.overboard { text-decoration: double overline underline line-through magenta; }
.spelling-error { text-decoration: spelling-error; }
.grammar-error { text-decoration: grammar-error; }
</style>
</head>
<body>
@@ -17,5 +19,7 @@
<p class="blink">FREE!</p>
<p class="current-color">This underline should match the text color</p>
<p class="overboard">This should have an underline, overline and line-through, all in glorious magenta.</p>
<p class="spelling-error">This should look like a spelling error.</p>
<p class="grammar-error">This should look like a grammar error.</p>
</body>
</html>

View File

@@ -2,8 +2,7 @@ Harness status: OK
Found 18 tests
16 Pass
2 Fail
18 Pass
Pass Property text-decoration-line value 'none'
Pass Property text-decoration-line value 'underline'
Pass Property text-decoration-line value 'overline'
@@ -20,5 +19,5 @@ Pass Property text-decoration-line value 'underline overline blink'
Pass Property text-decoration-line value 'underline line-through blink'
Pass Property text-decoration-line value 'overline line-through blink'
Pass Property text-decoration-line value 'underline overline line-through blink'
Fail Property text-decoration-line value 'spelling-error'
Fail Property text-decoration-line value 'grammar-error'
Pass Property text-decoration-line value 'spelling-error'
Pass Property text-decoration-line value 'grammar-error'

View File

@@ -2,8 +2,7 @@ Harness status: OK
Found 67 tests
65 Pass
2 Fail
67 Pass
Pass e.style['text-decoration-line'] = "none" should set the property value
Pass e.style['text-decoration-line'] = "underline" should set the property value
Pass e.style['text-decoration-line'] = "overline" should set the property value
@@ -69,5 +68,5 @@ Pass e.style['text-decoration-line'] = "blink overline underline line-through" s
Pass e.style['text-decoration-line'] = "blink overline line-through underline" should set the property value
Pass e.style['text-decoration-line'] = "blink line-through underline overline" should set the property value
Pass e.style['text-decoration-line'] = "blink line-through overline underline" should set the property value
Fail e.style['text-decoration-line'] = "spelling-error" should set the property value
Fail e.style['text-decoration-line'] = "grammar-error" should set the property value
Pass e.style['text-decoration-line'] = "spelling-error" should set the property value
Pass e.style['text-decoration-line'] = "grammar-error" should set the property value