diff --git a/Libraries/LibWeb/Painting/PaintableBox.cpp b/Libraries/LibWeb/Painting/PaintableBox.cpp
index 0251493bd46..f198d6886c4 100644
--- a/Libraries/LibWeb/Painting/PaintableBox.cpp
+++ b/Libraries/LibWeb/Painting/PaintableBox.cpp
@@ -841,16 +841,16 @@ void paint_text_decoration(DisplayListRecordingContext& context, TextPaintable c
return;
case CSS::TextDecorationLine::Underline:
line_start_point = context.rounded_device_point(fragment_box.top_left().translated(0, baseline + 2));
- line_end_point = context.rounded_device_point(fragment_box.top_right().translated(-1, baseline + 2));
+ line_end_point = context.rounded_device_point(fragment_box.top_right().translated(0, baseline + 2));
break;
case CSS::TextDecorationLine::Overline:
line_start_point = context.rounded_device_point(fragment_box.top_left().translated(0, baseline - glyph_height));
- line_end_point = context.rounded_device_point(fragment_box.top_right().translated(-1, baseline - glyph_height));
+ line_end_point = context.rounded_device_point(fragment_box.top_right().translated(0, baseline - glyph_height));
break;
case CSS::TextDecorationLine::LineThrough: {
auto x_height = font.x_height();
line_start_point = context.rounded_device_point(fragment_box.top_left().translated(0, baseline - x_height * CSSPixels(0.5f)));
- line_end_point = context.rounded_device_point(fragment_box.top_right().translated(-1, baseline - x_height * CSSPixels(0.5f)));
+ line_end_point = context.rounded_device_point(fragment_box.top_right().translated(0, baseline - x_height * CSSPixels(0.5f)));
break;
}
case CSS::TextDecorationLine::Blink:
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-text-decor/text-decoration-thickness-calc-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-text-decor/text-decoration-thickness-calc-ref.html
new file mode 100644
index 00000000000..1f2aee5d51d
--- /dev/null
+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-text-decor/text-decoration-thickness-calc-ref.html
@@ -0,0 +1,46 @@
+
+
+
text-decoration-thickness calc() support
+
+
+
+Test passes if black and green bar pairs are the same shape and size.
+
+ XXXXXX
+
+
+
+
+ XXXXXX
+
+
+
+ XXXXXX
+
+
+ XXXXXX
+
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/reference/blank.html b/Tests/LibWeb/Ref/expected/wpt-import/css/reference/blank.html
new file mode 100644
index 00000000000..f2fab5a3b17
--- /dev/null
+++ b/Tests/LibWeb/Ref/expected/wpt-import/css/reference/blank.html
@@ -0,0 +1,3 @@
+
+CSS Test Reference
+
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-text-decor/text-decoration-thickness-calc.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-text-decor/text-decoration-thickness-calc.html
new file mode 100644
index 00000000000..4581522d4ec
--- /dev/null
+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-text-decor/text-decoration-thickness-calc.html
@@ -0,0 +1,79 @@
+
+
+text-decoration-thickness calc() support
+
+
+
+
+
+
+Test passes if black and green bar pairs are the same shape and size.
+
+ X
+ X
+ X
+ X
+ X
+ X
+
+
+
+
+ X
+ X
+ X
+ X
+ X
+ X
+
+
+
+XXXXXX
+
+
+ X
+ X
+ X
+ X
+ X
+ X
+
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-text-decor/text-decoration-thickness-from-zero-sized-font.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-text-decor/text-decoration-thickness-from-zero-sized-font.html
new file mode 100644
index 00000000000..7cd233dd09d
--- /dev/null
+++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-text-decor/text-decoration-thickness-from-zero-sized-font.html
@@ -0,0 +1,22 @@
+
+
+
+
+ text-decoration-thickness: from-font with zero sized font
+
+
+
+
+
+
+
+
+ This line has a zero sized font.
+
+
diff --git a/Tests/LibWeb/Screenshot/images/css-background-clip-text.png b/Tests/LibWeb/Screenshot/images/css-background-clip-text.png
index 7c60f073a64..bd967ef6271 100644
Binary files a/Tests/LibWeb/Screenshot/images/css-background-clip-text.png and b/Tests/LibWeb/Screenshot/images/css-background-clip-text.png differ
diff --git a/Tests/LibWeb/Screenshot/images/text-decorations.png b/Tests/LibWeb/Screenshot/images/text-decorations.png
index d36a4bf4711..38ef76ab525 100644
Binary files a/Tests/LibWeb/Screenshot/images/text-decorations.png and b/Tests/LibWeb/Screenshot/images/text-decorations.png differ
diff --git a/Tests/LibWeb/Text/expected/display_list/button-with-text-decoration.txt b/Tests/LibWeb/Text/expected/display_list/button-with-text-decoration.txt
index d7d4b18dbad..0dc4378ac40 100644
--- a/Tests/LibWeb/Text/expected/display_list/button-with-text-decoration.txt
+++ b/Tests/LibWeb/Text/expected/display_list/button-with-text-decoration.txt
@@ -4,7 +4,7 @@ SaveLayer
FillRect rect=[8,8 106x22] color=rgb(212, 208, 200)
FillPath
DrawGlyphRun rect=[13,10 96x18] translation=[13,23.796875] color=rgb(0, 0, 0) scale=1
- DrawLine from=[13,26] to=[108,26] color=rgb(0, 0, 0) thickness=2
+ DrawLine from=[13,26] to=[109,26] color=rgb(0, 0, 0) thickness=2
PopStackingContext
PopStackingContext
Restore