aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-01-17 20:28:03 +0100
committerbptato <nincsnevem662@gmail.com>2025-01-17 20:28:03 +0100
commit1cc64fae0a92677408dab532941ed04c9cd28673 (patch)
tree2baf7ff55302c90c93071ad760bdbf5f3dba85ba /test
parentbe1891755cc52cd0ad7a7d210bcd639ee5315a9a (diff)
downloadchawan-1cc64fae0a92677408dab532941ed04c9cd28673.tar.gz
render: fix formatting being lost outside boxes with bgcolor
An ancient bug, but the fix seems to be quite simple: stop confusing the last X position before the existing string on the line with the last X position that the new string occupies.
Diffstat (limited to 'test')
-rw-r--r--test/layout/colored-text-keeps-color-outside-box.color.expected2
-rw-r--r--test/layout/colored-text-keeps-color-outside-box.html4
-rw-r--r--test/layout/underline-does-not-escape-background-switch.color.expected2
-rw-r--r--test/layout/underline-does-not-escape-background-switch.html4
4 files changed, 12 insertions, 0 deletions
diff --git a/test/layout/colored-text-keeps-color-outside-box.color.expected b/test/layout/colored-text-keeps-color-outside-box.color.expected
new file mode 100644
index 00000000..7ba132fc
--- /dev/null
+++ b/test/layout/colored-text-keeps-color-outside-box.color.expected
@@ -0,0 +1,2 @@
+test test test test test
+test
diff --git a/test/layout/colored-text-keeps-color-outside-box.html b/test/layout/colored-text-keeps-color-outside-box.html
new file mode 100644
index 00000000..a18abaee
--- /dev/null
+++ b/test/layout/colored-text-keeps-color-outside-box.html
@@ -0,0 +1,4 @@
+<div style="display: block; white-space: nowrap; background: red; width: 5ch; color: blue">
+test test test test test
+</div>
+test
diff --git a/test/layout/underline-does-not-escape-background-switch.color.expected b/test/layout/underline-does-not-escape-background-switch.color.expected
new file mode 100644
index 00000000..0d27f448
--- /dev/null
+++ b/test/layout/underline-does-not-escape-background-switch.color.expected
@@ -0,0 +1,2 @@
+test 
+
diff --git a/test/layout/underline-does-not-escape-background-switch.html b/test/layout/underline-does-not-escape-background-switch.html
new file mode 100644
index 00000000..55de3e3e
--- /dev/null
+++ b/test/layout/underline-does-not-escape-background-switch.html
@@ -0,0 +1,4 @@
+<!DOCTYPE html>
+<div style="background: blue">
+<div style="background: red; display: inline-block; text-decoration: underline">
+test