From 802f5cb185632c9006318406a97263eb19d9de03 Mon Sep 17 00:00:00 2001 From: Florian Rivoal Date: Mon, 29 Sep 2025 17:15:21 +0900 Subject: [PATCH 1/4] [css-overflow-4] Refactor the text about block-ellipsis insertion The text had accreted various rules and constraints, but no longer had clear structure. This attempt to reorganize the whole thing in a more understandable manner. No new behavior is introduced by this text, though some previously implicit consequences are made explicit, for clarity. --- css-overflow-4/Overview.bs | 43 ++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/css-overflow-4/Overview.bs b/css-overflow-4/Overview.bs index 467c4de6032..745c6b28f84 100644 --- a/css-overflow-4/Overview.bs +++ b/css-overflow-4/Overview.bs @@ -800,23 +800,34 @@ Indicating Block-Axis Overflow: the 'block-ellipsis' property When 'block-ellipsis' is neither ''no-ellipsis'' nor the empty string, - the block overflow ellipsis string - is wrapped in an anonymous inline - and placed at the end of the line box - as a direct child of the block container’s root inline box, - reducing the space in the line box + the [=block overflow ellipsis=] string + is placed at the end of the line box + reducing the space available to the other contents of the line. - This inline is assigned ''unicode-bidi: plaintext'' - and ''line-height: 0'' - and is placed in the line box after the last - soft wrap opportunity (see [[!CSS-TEXT-3]]) - that would still allow the entire block overflow ellipsis to fit on the line, - applying [[css-text-4#white-space-rules]] including [[css-text-4#white-space-phase-2]] - before inserting the [=block overflow ellipsis=]. - For this purpose, soft wrap opportunities added by 'overflow-wrap' are ignored, - as are those inhibited by ''text-wrap-mode: nowrap''. - If this results in the entire contents of the line box being displaced, - the line box is considered to contain a [=strut=], as defined in [[CSS2/visudet#leading]]. + More specifically: + * The [=block overflow ellipsis=] + is wrapped in an anonymous inline + whose parent is the [=block container=]’s [=root inline box=]. + This inline is assigned ''unicode-bidi: plaintext'' + and ''line-height: 0''. + * The user agent makes room as necessary of the [=block overflow ellipsis=] + by displacing content from the end of the line as if wrapping, + until the last soft wrap opportunity (see [[!CSS-TEXT-3]]) + that would still allow the entire block overflow ellipsis to fit on the line, + applying [[css-text-4#white-space-rules]] including [[css-text-4#white-space-phase-2]] + before insertion. + For this purpose, soft wrap opportunities added by 'overflow-wrap' are ignored, + as are those inhibited by ''text-wrap-mode: nowrap''. + If this results in the entire contents of the line box being displaced, + the line box is considered to contain a [=strut=], as defined in [[CSS2/visudet#leading]]. + * The anonymous inline of [=block overflow ellipsis=] is placed + after any remaining content, + after [[css-text-4#white-space-phase-2]], + as a direct child of the block container’s root inline box, + with the appropriate bidi embedding level + given its directionality + and that of its parent. + Text alignment and justification occurs after placement, and measures the inserted block overflow ellipsis From f3cdfcb354f9e31624f8d7a5238c8c7d3b843787 Mon Sep 17 00:00:00 2001 From: Florian Rivoal Date: Mon, 29 Sep 2025 17:31:38 +0900 Subject: [PATCH 2/4] [css-overflow-4] Redistribute test annotations --- css-overflow-4/Overview.bs | 70 ++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 26 deletions(-) diff --git a/css-overflow-4/Overview.bs b/css-overflow-4/Overview.bs index 745c6b28f84..4d60521841b 100644 --- a/css-overflow-4/Overview.bs +++ b/css-overflow-4/Overview.bs @@ -804,12 +804,31 @@ Indicating Block-Axis Overflow: the 'block-ellipsis' property is placed at the end of the line box reducing the space available to the other contents of the line. + + + block-ellipsis-023.html + block-ellipsis-024.html + block-ellipsis-repaint-001.html + block-ellipsis-repaint-003.html + block-ellipsis-repaint-004.html + + More specifically: * The [=block overflow ellipsis=] is wrapped in an anonymous inline whose parent is the [=block container=]’s [=root inline box=]. This inline is assigned ''unicode-bidi: plaintext'' and ''line-height: 0''. + + + block-ellipsis-002.html + block-ellipsis-003.html + block-ellipsis-004.html + block-ellipsis-005.html + block-ellipsis-006.html + block-ellipsis-010.html + + * The user agent makes room as necessary of the [=block overflow ellipsis=] by displacing content from the end of the line as if wrapping, until the last soft wrap opportunity (see [[!CSS-TEXT-3]]) @@ -820,6 +839,21 @@ Indicating Block-Axis Overflow: the 'block-ellipsis' property as are those inhibited by ''text-wrap-mode: nowrap''. If this results in the entire contents of the line box being displaced, the line box is considered to contain a [=strut=], as defined in [[CSS2/visudet#leading]]. + + + block-ellipsis-001.html + block-ellipsis-013.html + block-ellipsis-014.html + block-ellipsis-015.tentative.html + block-ellipsis-016.html + block-ellipsis-017.html + block-ellipsis-018.html + block-ellipsis-025.html + block-ellipsis-027.html + block-ellipsis-028.html + webkit-line-clamp-025.html + + * The anonymous inline of [=block overflow ellipsis=] is placed after any remaining content, after [[css-text-4#white-space-phase-2]], @@ -828,38 +862,22 @@ Indicating Block-Axis Overflow: the 'block-ellipsis' property given its directionality and that of its parent. + + block-ellipsis-004.html + block-ellipsis-005.html + block-ellipsis-006.html + block-ellipsis-026.html + webkit-line-clamp-014.html + webkit-line-clamp-032.html + webkit-line-clamp-035.html + + Text alignment and justification occurs after placement, and measures the inserted block overflow ellipsis together with the rest of the line’s content. - block-ellipsis-001.html - block-ellipsis-002.html - block-ellipsis-003.html - block-ellipsis-004.html - block-ellipsis-005.html - block-ellipsis-006.html - block-ellipsis-010.html - block-ellipsis-013.html - block-ellipsis-014.html - block-ellipsis-015.tentative.html - block-ellipsis-016.html - block-ellipsis-017.html - block-ellipsis-018.html - block-ellipsis-023.html - block-ellipsis-024.html - block-ellipsis-025.html - block-ellipsis-026.html - block-ellipsis-027.html - block-ellipsis-028.html - block-ellipsis-repaint-003.html - block-ellipsis-repaint-004.html - block-ellipsis-repaint-001.html - webkit-line-clamp-014.html - webkit-line-clamp-025.html - webkit-line-clamp-032.html - webkit-line-clamp-035.html webkit-line-clamp-051.html webkit-line-clamp-052.html webkit-line-clamp-053.html From 0536d859df82fc295d6d834101fae065b4a40bf8 Mon Sep 17 00:00:00 2001 From: Florian Rivoal Date: Mon, 29 Sep 2025 22:10:36 +0900 Subject: [PATCH 3/4] Recognize the possible plurality of embedding levels Co-authored-by: Andreu Botella --- css-overflow-4/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-overflow-4/Overview.bs b/css-overflow-4/Overview.bs index 4d60521841b..c2ed2f5aa01 100644 --- a/css-overflow-4/Overview.bs +++ b/css-overflow-4/Overview.bs @@ -858,7 +858,7 @@ Indicating Block-Axis Overflow: the 'block-ellipsis' property after any remaining content, after [[css-text-4#white-space-phase-2]], as a direct child of the block container’s root inline box, - with the appropriate bidi embedding level + with the appropriate bidi embedding levels given its directionality and that of its parent. From 8e5d8efa6afba6ea6d9f6d77cebf7f1c297434a1 Mon Sep 17 00:00:00 2001 From: Florian Rivoal Date: Tue, 30 Sep 2025 10:42:47 +0900 Subject: [PATCH 4/4] [css-overflow-4] Subdivide paragraph --- css-overflow-4/Overview.bs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/css-overflow-4/Overview.bs b/css-overflow-4/Overview.bs index c2ed2f5aa01..135d26b8af9 100644 --- a/css-overflow-4/Overview.bs +++ b/css-overflow-4/Overview.bs @@ -835,23 +835,32 @@ Indicating Block-Axis Overflow: the 'block-ellipsis' property that would still allow the entire block overflow ellipsis to fit on the line, applying [[css-text-4#white-space-rules]] including [[css-text-4#white-space-phase-2]] before insertion. + + + block-ellipsis-001.html + block-ellipsis-028.html + webkit-line-clamp-025.html + + For this purpose, soft wrap opportunities added by 'overflow-wrap' are ignored, as are those inhibited by ''text-wrap-mode: nowrap''. - If this results in the entire contents of the line box being displaced, - the line box is considered to contain a [=strut=], as defined in [[CSS2/visudet#leading]]. - block-ellipsis-001.html block-ellipsis-013.html block-ellipsis-014.html block-ellipsis-015.tentative.html block-ellipsis-016.html block-ellipsis-017.html + block-ellipsis-027.html + + + If this results in the entire contents of the line box being displaced, + the line box is considered to contain a [=strut=], as defined in [[CSS2/visudet#leading]]. + + + block-ellipsis-016.html block-ellipsis-018.html block-ellipsis-025.html - block-ellipsis-027.html - block-ellipsis-028.html - webkit-line-clamp-025.html * The anonymous inline of [=block overflow ellipsis=] is placed