From f9734e2b3900781901bb5f268137bd9adbfc33ef Mon Sep 17 00:00:00 2001 From: bptato Date: Wed, 26 Jun 2024 23:37:02 +0200 Subject: layout: inline fixes & improvements * fix text-align breaking down in the presence of floats * improve (and simplify) background color area painting This greatly simplifies inline layout by removing the additional text-align atom movement code and replacing it with a full re-layout when needed. That re-layout only occurs in (rare) cases where the text is likely to be relatively short anyway, so it's probably a win in any remotely realistic layout. This has also made it possible to at last merge the last three passes (horizontal/vertical alignment and background painting) and drop that weird synchronized tree + vector traversal. --- test/layout/float-text-align-right.color.expected | 2 ++ test/layout/float-text-align-right.html | 4 ++++ test/layout/inline_split_sizes.color.expected | 16 ++++++++-------- test/layout/run_layout_tests.sh | 1 + 4 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 test/layout/float-text-align-right.color.expected create mode 100644 test/layout/float-text-align-right.html (limited to 'test/layout') diff --git a/test/layout/float-text-align-right.color.expected b/test/layout/float-text-align-right.color.expected new file mode 100644 index 00000000..bcb22cf8 --- /dev/null +++ b/test/layout/float-text-align-right.color.expected @@ -0,0 +1,2 @@ +float float float testfloat + diff --git a/test/layout/float-text-align-right.html b/test/layout/float-text-align-right.html new file mode 100644 index 00000000..3c0f3c25 --- /dev/null +++ b/test/layout/float-text-align-right.html @@ -0,0 +1,4 @@ +
+
float
+
float float float
+test diff --git a/test/layout/inline_split_sizes.color.expected b/test/layout/inline_split_sizes.color.expected index dafbf438..636edd8a 100644 --- a/test/layout/inline_split_sizes.color.expected +++ b/test/layout/inline_split_sizes.color.expected @@ -1,9 +1,9 @@ -   -before t - -carthago delenda -  - est -  -hello after + +before t + +carthago delenda + + est + +hello after diff --git a/test/layout/run_layout_tests.sh b/test/layout/run_layout_tests.sh index 2e2bfa7b..20b85ce1 100755 --- a/test/layout/run_layout_tests.sh +++ b/test/layout/run_layout_tests.sh @@ -20,4 +20,5 @@ do printf '%s\r' "$h" else printf 'WARNING: expected file not found for %s\n' "$h" fi done +printf '\n' exit "$failed" -- cgit 1.4.1-2-gfad0