mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:37:35 +00:00
LibWeb: Use PaintableFragment::baseline() in paint_text_decoration()
No need to calculate baseline based on glyph height when we can get this information from a fragment.
This commit is contained in:
parent
1c4ce2c5f1
commit
d5e3158cfe
4 changed files with 49 additions and 1 deletions
39
Tests/LibWeb/Ref/text-decorations.html
Normal file
39
Tests/LibWeb/Ref/text-decorations.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="match" href="reference/text-decorations-ref.html" />
|
||||
<style>
|
||||
.underline {
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 2px;
|
||||
}
|
||||
|
||||
.overline {
|
||||
text-decoration: overline;
|
||||
text-decoration-thickness: 2px;
|
||||
}
|
||||
|
||||
.line-through {
|
||||
text-decoration: line-through;
|
||||
text-decoration-thickness: 2px;
|
||||
}
|
||||
|
||||
.underline-overline {
|
||||
text-decoration: underline overline;
|
||||
text-decoration-thickness: 2px;
|
||||
}
|
||||
|
||||
.underline-line-through {
|
||||
text-decoration: underline line-through;
|
||||
text-decoration-thickness: 2px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p class="underline">Hello</p>
|
||||
<p class="overline">Hello</p>
|
||||
<p class="line-through">Hello</p>
|
||||
<p class="underline-overline">Hello</p>
|
||||
<p class="underline-line-through">Hello</p>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue