-
Notifications
You must be signed in to change notification settings - Fork 719
[css-inline-3] text-box-trim vs fragmentation #5335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I propose that we apply
The spec would say: if the contents of an element with Note: in other words, Note: the second sentence is to avoid a circularity. In terms of implementation, this will require a mechanism to lay out "without trimming" and then adjust layout to take into account trimming, but I think that will be needed anyway in order to detect the "last line to trim" in cases where it isn't clear from markup. |
I can see why trimming at the top of a page might be something to avoid in cases where the browser doesn't know how to draw into the page margin/padding area, so it makes sense to allow it. But I doubt it's ideal, because it doesn't allow authors to control things lining up in such cases. We probably want to (eventually) get trimming to work equally on pages and columns. Also, there's really two questions here:
Either way, we probably need to enable ink overflow of line boxes to spill out of the page content area. |
I suggest yes, for the column case.
I suggest no. |
The CSS Working Group just discussed
The full IRC log of that discussion |
The `text-box-trim` should apply only to the top of the first fragment and the bottom of the last fragment, resolved at w3c/csswg-drafts#5335. This patch adds tests for this, `001` for when the `text-box-trim` is applied to the multicol container, and `002` for when a box with `text-box-trim` is block fragmented by ancestor multicol. Bug: 40254880 Change-Id: Ice29f39cbef0c20284edd809942754176a395d23 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564105 Reviewed-by: Kent TamuraCommit-Queue: Kent Tamura Auto-Submit: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1305545}
The `text-box-trim` should apply only to the top of the first fragment and the bottom of the last fragment, resolved at w3c/csswg-drafts#5335. This patch adds tests for this, `001` for when the `text-box-trim` is applied to the multicol container, and `002` for when a box with `text-box-trim` is block fragmented by ancestor multicol. Bug: 40254880 Change-Id: Ice29f39cbef0c20284edd809942754176a395d23 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564105 Reviewed-by: Kent TamuraCommit-Queue: Kent Tamura Auto-Submit: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1305545}
… a=testonly Automatic update from web-platform-tests [text-box-trim] Add tests for multi-col The `text-box-trim` should apply only to the top of the first fragment and the bottom of the last fragment, resolved at w3c/csswg-drafts#5335. This patch adds tests for this, `001` for when the `text-box-trim` is applied to the multicol container, and `002` for when a box with `text-box-trim` is block fragmented by ancestor multicol. Bug: 40254880 Change-Id: Ice29f39cbef0c20284edd809942754176a395d23 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564105 Reviewed-by: Kent TamuraCommit-Queue: Kent Tamura Auto-Submit: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1305545} -- wpt-commits: 592dc0a3df19c530baec9079edce72a2625b798e wpt-pr: 46470
… a=testonly Automatic update from web-platform-tests [text-box-trim] Add tests for multi-col The `text-box-trim` should apply only to the top of the first fragment and the bottom of the last fragment, resolved at w3c/csswg-drafts#5335. This patch adds tests for this, `001` for when the `text-box-trim` is applied to the multicol container, and `002` for when a box with `text-box-trim` is block fragmented by ancestor multicol. Bug: 40254880 Change-Id: Ice29f39cbef0c20284edd809942754176a395d23 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5564105 Reviewed-by: Kent TamuraCommit-Queue: Kent Tamura Auto-Submit: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1305545} -- wpt-commits: 592dc0a3df19c530baec9079edce72a2625b798e wpt-pr: 46470
@jensimmons and I discussed the related (but now a bit different) question of what |
The CSS Working Group just discussed The full IRC log of that discussion |
The CSS Working Group just discussed
The full IRC log of that discussion |
There are now two types of text box trimming: The already existing one, trimming at the start or end of a node. And the new one, trimming at the start or end of a fragmentainer. We need to distinguish between these, since they aren't active at the same times. Therefore, the old "should text box trim start/end" flags are now qualified with "node" (e.g. ShouldTextBoxTrimNodeStart()), and the new ones are qualified with "fragmentainer" (e.g. ShouldTextBoxTrimFragmentainerStart()). When text-box-trim is specified inside a fragmentation context, it should not cause trimming at fragmentainer breaks, unless box-decoration-break is 'clone'. See w3c/csswg-drafts#5335 (comment) When text-box-trim is specified on a multicol container (i.e. NOT inside the fragmentation context that the multicol container establishes), it should cause trimming at fragmentainer breaks. See w3c/csswg-drafts#5335 (comment) Update text-box-trim-multicol-001.html, since we now trim at fragmentainer boundaries. Also make the multicol container slightly shorter, to demonstrate that we also trim at the end of columns. Make the multicol container in text-box-trim-multicol-002.html slightly taller, to demonstrate that there's trimming at the end of columns in that case (trimming is specified on a multicol descendant, and box-decoration-break is not 'clone'). Also add more tests for trimming at column boundaries, and also some basic printing tests that simply test that text-box trimming still works, at least when they're not next to a page boundary. Blink (and all other browsers, I think) cannot paint outside the page area, so trimming is disabled at page boundaries. There will be an internal WPT test for that in an upcoming CL. Set widows and orphans to 1 in the tests. They are not meant to be affected by orphans / widows requirements anyway, but our widows calculation code is currently causing trouble for text box trimming (two different types of relayout not getting along too well), so just set it to 1 for now. A follow-up CL will fix this. Bug: 41494433 Change-Id: Ic4fc97ecf4cce3f52d5c3d8d44c3188c53970002 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961725 Commit-Queue: Morten StenshorneReviewed-by: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1373770}
There are now two types of text box trimming: The already existing one, trimming at the start or end of a node. And the new one, trimming at the start or end of a fragmentainer. We need to distinguish between these, since they aren't active at the same times. Therefore, the old "should text box trim start/end" flags are now qualified with "node" (e.g. ShouldTextBoxTrimNodeStart()), and the new ones are qualified with "fragmentainer" (e.g. ShouldTextBoxTrimFragmentainerStart()). When text-box-trim is specified inside a fragmentation context, it should not cause trimming at fragmentainer breaks, unless box-decoration-break is 'clone'. See w3c/csswg-drafts#5335 (comment) When text-box-trim is specified on a multicol container (i.e. NOT inside the fragmentation context that the multicol container establishes), it should cause trimming at fragmentainer breaks. See w3c/csswg-drafts#5335 (comment) Update text-box-trim-multicol-001.html, since we now trim at fragmentainer boundaries. Also make the multicol container slightly shorter, to demonstrate that we also trim at the end of columns. Make the multicol container in text-box-trim-multicol-002.html slightly taller, to demonstrate that there's trimming at the end of columns in that case (trimming is specified on a multicol descendant, and box-decoration-break is not 'clone'). Also add more tests for trimming at column boundaries, and also some basic printing tests that simply test that text-box trimming still works, at least when they're not next to a page boundary. Blink (and all other browsers, I think) cannot paint outside the page area, so trimming is disabled at page boundaries. There will be an internal WPT test for that in an upcoming CL. Set widows and orphans to 1 in the tests. They are not meant to be affected by orphans / widows requirements anyway, but our widows calculation code is currently causing trouble for text box trimming (two different types of relayout not getting along too well), so just set it to 1 for now. A follow-up CL will fix this. Bug: 41494433 Change-Id: Ic4fc97ecf4cce3f52d5c3d8d44c3188c53970002 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961725 Commit-Queue: Morten StenshorneReviewed-by: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1373770}
There are now two types of text box trimming: The already existing one, trimming at the start or end of a node. And the new one, trimming at the start or end of a fragmentainer. We need to distinguish between these, since they aren't active at the same times. Therefore, the old "should text box trim start/end" flags are now qualified with "node" (e.g. ShouldTextBoxTrimNodeStart()), and the new ones are qualified with "fragmentainer" (e.g. ShouldTextBoxTrimFragmentainerStart()). When text-box-trim is specified inside a fragmentation context, it should not cause trimming at fragmentainer breaks, unless box-decoration-break is 'clone'. See w3c/csswg-drafts#5335 (comment) When text-box-trim is specified on a multicol container (i.e. NOT inside the fragmentation context that the multicol container establishes), it should cause trimming at fragmentainer breaks. See w3c/csswg-drafts#5335 (comment) Update text-box-trim-multicol-001.html, since we now trim at fragmentainer boundaries. Also make the multicol container slightly shorter, to demonstrate that we also trim at the end of columns. Make the multicol container in text-box-trim-multicol-002.html slightly taller, to demonstrate that there's trimming at the end of columns in that case (trimming is specified on a multicol descendant, and box-decoration-break is not 'clone'). Also add more tests for trimming at column boundaries, and also some basic printing tests that simply test that text-box trimming still works, at least when they're not next to a page boundary. Blink (and all other browsers, I think) cannot paint outside the page area, so trimming is disabled at page boundaries. There will be an internal WPT test for that in an upcoming CL. Set widows and orphans to 1 in the tests. They are not meant to be affected by orphans / widows requirements anyway, but our widows calculation code is currently causing trouble for text box trimming (two different types of relayout not getting along too well), so just set it to 1 for now. A follow-up CL will fix this. Bug: 41494433 Change-Id: Ic4fc97ecf4cce3f52d5c3d8d44c3188c53970002 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961725 Commit-Queue: Morten StenshorneReviewed-by: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1373770}
In our implementation, we will not apply text box trimming at page boundaries, since we're unable to paint document contents outside the page area. Since this is an implementation-specific thing (but still spec-compliant), add an internal test. See w3c/csswg-drafts#5335 (comment) Bug: 41494433 Change-Id: Ibb5e585228b2430b0fb779b64d80bcbb2d97df39 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5962276 Commit-Queue: Morten StenshorneReviewed-by: Rune Lillesveen Cr-Commit-Position: refs/heads/main@{#1373792}
… columns., a=testonly Automatic update from web-platform-tests [text-box-trim] Trim at the start/end of columns. There are now two types of text box trimming: The already existing one, trimming at the start or end of a node. And the new one, trimming at the start or end of a fragmentainer. We need to distinguish between these, since they aren't active at the same times. Therefore, the old "should text box trim start/end" flags are now qualified with "node" (e.g. ShouldTextBoxTrimNodeStart()), and the new ones are qualified with "fragmentainer" (e.g. ShouldTextBoxTrimFragmentainerStart()). When text-box-trim is specified inside a fragmentation context, it should not cause trimming at fragmentainer breaks, unless box-decoration-break is 'clone'. See w3c/csswg-drafts#5335 (comment) When text-box-trim is specified on a multicol container (i.e. NOT inside the fragmentation context that the multicol container establishes), it should cause trimming at fragmentainer breaks. See w3c/csswg-drafts#5335 (comment) Update text-box-trim-multicol-001.html, since we now trim at fragmentainer boundaries. Also make the multicol container slightly shorter, to demonstrate that we also trim at the end of columns. Make the multicol container in text-box-trim-multicol-002.html slightly taller, to demonstrate that there's trimming at the end of columns in that case (trimming is specified on a multicol descendant, and box-decoration-break is not 'clone'). Also add more tests for trimming at column boundaries, and also some basic printing tests that simply test that text-box trimming still works, at least when they're not next to a page boundary. Blink (and all other browsers, I think) cannot paint outside the page area, so trimming is disabled at page boundaries. There will be an internal WPT test for that in an upcoming CL. Set widows and orphans to 1 in the tests. They are not meant to be affected by orphans / widows requirements anyway, but our widows calculation code is currently causing trouble for text box trimming (two different types of relayout not getting along too well), so just set it to 1 for now. A follow-up CL will fix this. Bug: 41494433 Change-Id: Ic4fc97ecf4cce3f52d5c3d8d44c3188c53970002 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961725 Commit-Queue: Morten StenshorneReviewed-by: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1373770} -- wpt-commits: 35a534039299fb6e3e3e27056eaf5e22342be458 wpt-pr: 48817
… columns., a=testonly Automatic update from web-platform-tests [text-box-trim] Trim at the start/end of columns. There are now two types of text box trimming: The already existing one, trimming at the start or end of a node. And the new one, trimming at the start or end of a fragmentainer. We need to distinguish between these, since they aren't active at the same times. Therefore, the old "should text box trim start/end" flags are now qualified with "node" (e.g. ShouldTextBoxTrimNodeStart()), and the new ones are qualified with "fragmentainer" (e.g. ShouldTextBoxTrimFragmentainerStart()). When text-box-trim is specified inside a fragmentation context, it should not cause trimming at fragmentainer breaks, unless box-decoration-break is 'clone'. See w3c/csswg-drafts#5335 (comment) When text-box-trim is specified on a multicol container (i.e. NOT inside the fragmentation context that the multicol container establishes), it should cause trimming at fragmentainer breaks. See w3c/csswg-drafts#5335 (comment) Update text-box-trim-multicol-001.html, since we now trim at fragmentainer boundaries. Also make the multicol container slightly shorter, to demonstrate that we also trim at the end of columns. Make the multicol container in text-box-trim-multicol-002.html slightly taller, to demonstrate that there's trimming at the end of columns in that case (trimming is specified on a multicol descendant, and box-decoration-break is not 'clone'). Also add more tests for trimming at column boundaries, and also some basic printing tests that simply test that text-box trimming still works, at least when they're not next to a page boundary. Blink (and all other browsers, I think) cannot paint outside the page area, so trimming is disabled at page boundaries. There will be an internal WPT test for that in an upcoming CL. Set widows and orphans to 1 in the tests. They are not meant to be affected by orphans / widows requirements anyway, but our widows calculation code is currently causing trouble for text box trimming (two different types of relayout not getting along too well), so just set it to 1 for now. A follow-up CL will fix this. Bug: 41494433 Change-Id: Ic4fc97ecf4cce3f52d5c3d8d44c3188c53970002 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961725 Commit-Queue: Morten StenshorneReviewed-by: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1373770} -- wpt-commits: 35a534039299fb6e3e3e27056eaf5e22342be458 wpt-pr: 48817
… columns., a=testonly Automatic update from web-platform-tests [text-box-trim] Trim at the start/end of columns. There are now two types of text box trimming: The already existing one, trimming at the start or end of a node. And the new one, trimming at the start or end of a fragmentainer. We need to distinguish between these, since they aren't active at the same times. Therefore, the old "should text box trim start/end" flags are now qualified with "node" (e.g. ShouldTextBoxTrimNodeStart()), and the new ones are qualified with "fragmentainer" (e.g. ShouldTextBoxTrimFragmentainerStart()). When text-box-trim is specified inside a fragmentation context, it should not cause trimming at fragmentainer breaks, unless box-decoration-break is 'clone'. See w3c/csswg-drafts#5335 (comment) When text-box-trim is specified on a multicol container (i.e. NOT inside the fragmentation context that the multicol container establishes), it should cause trimming at fragmentainer breaks. See w3c/csswg-drafts#5335 (comment) Update text-box-trim-multicol-001.html, since we now trim at fragmentainer boundaries. Also make the multicol container slightly shorter, to demonstrate that we also trim at the end of columns. Make the multicol container in text-box-trim-multicol-002.html slightly taller, to demonstrate that there's trimming at the end of columns in that case (trimming is specified on a multicol descendant, and box-decoration-break is not 'clone'). Also add more tests for trimming at column boundaries, and also some basic printing tests that simply test that text-box trimming still works, at least when they're not next to a page boundary. Blink (and all other browsers, I think) cannot paint outside the page area, so trimming is disabled at page boundaries. There will be an internal WPT test for that in an upcoming CL. Set widows and orphans to 1 in the tests. They are not meant to be affected by orphans / widows requirements anyway, but our widows calculation code is currently causing trouble for text box trimming (two different types of relayout not getting along too well), so just set it to 1 for now. A follow-up CL will fix this. Bug: 41494433 Change-Id: Ic4fc97ecf4cce3f52d5c3d8d44c3188c53970002 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961725 Commit-Queue: Morten StenshorneReviewed-by: Koji Ishii Cr-Commit-Position: refs/heads/main@{#1373770} -- wpt-commits: 35a534039299fb6e3e3e27056eaf5e22342be458 wpt-pr: 48817
… columns., a=testonly Automatic update from web-platform-tests [text-box-trim] Trim at the start/end of columns. There are now two types of text box trimming: The already existing one, trimming at the start or end of a node. And the new one, trimming at the start or end of a fragmentainer. We need to distinguish between these, since they aren't active at the same times. Therefore, the old "should text box trim start/end" flags are now qualified with "node" (e.g. ShouldTextBoxTrimNodeStart()), and the new ones are qualified with "fragmentainer" (e.g. ShouldTextBoxTrimFragmentainerStart()). When text-box-trim is specified inside a fragmentation context, it should not cause trimming at fragmentainer breaks, unless box-decoration-break is 'clone'. See w3c/csswg-drafts#5335 (comment) When text-box-trim is specified on a multicol container (i.e. NOT inside the fragmentation context that the multicol container establishes), it should cause trimming at fragmentainer breaks. See w3c/csswg-drafts#5335 (comment) Update text-box-trim-multicol-001.html, since we now trim at fragmentainer boundaries. Also make the multicol container slightly shorter, to demonstrate that we also trim at the end of columns. Make the multicol container in text-box-trim-multicol-002.html slightly taller, to demonstrate that there's trimming at the end of columns in that case (trimming is specified on a multicol descendant, and box-decoration-break is not 'clone'). Also add more tests for trimming at column boundaries, and also some basic printing tests that simply test that text-box trimming still works, at least when they're not next to a page boundary. Blink (and all other browsers, I think) cannot paint outside the page area, so trimming is disabled at page boundaries. There will be an internal WPT test for that in an upcoming CL. Set widows and orphans to 1 in the tests. They are not meant to be affected by orphans / widows requirements anyway, but our widows calculation code is currently causing trouble for text box trimming (two different types of relayout not getting along too well), so just set it to 1 for now. A follow-up CL will fix this. Bug: 41494433 Change-Id: Ic4fc97ecf4cce3f52d5c3d8d44c3188c53970002 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961725 Commit-Queue: Morten StenshorneReviewed-by: Koji Ishii Cr-Commit-Position: refs/heads/main{#1373770} -- wpt-commits: 35a534039299fb6e3e3e27056eaf5e22342be458 wpt-pr: 48817 UltraBlame original commit: bf38d089a241450f904e3a1bd082db60c87e348f
… columns., a=testonly Automatic update from web-platform-tests [text-box-trim] Trim at the start/end of columns. There are now two types of text box trimming: The already existing one, trimming at the start or end of a node. And the new one, trimming at the start or end of a fragmentainer. We need to distinguish between these, since they aren't active at the same times. Therefore, the old "should text box trim start/end" flags are now qualified with "node" (e.g. ShouldTextBoxTrimNodeStart()), and the new ones are qualified with "fragmentainer" (e.g. ShouldTextBoxTrimFragmentainerStart()). When text-box-trim is specified inside a fragmentation context, it should not cause trimming at fragmentainer breaks, unless box-decoration-break is 'clone'. See w3c/csswg-drafts#5335 (comment) When text-box-trim is specified on a multicol container (i.e. NOT inside the fragmentation context that the multicol container establishes), it should cause trimming at fragmentainer breaks. See w3c/csswg-drafts#5335 (comment) Update text-box-trim-multicol-001.html, since we now trim at fragmentainer boundaries. Also make the multicol container slightly shorter, to demonstrate that we also trim at the end of columns. Make the multicol container in text-box-trim-multicol-002.html slightly taller, to demonstrate that there's trimming at the end of columns in that case (trimming is specified on a multicol descendant, and box-decoration-break is not 'clone'). Also add more tests for trimming at column boundaries, and also some basic printing tests that simply test that text-box trimming still works, at least when they're not next to a page boundary. Blink (and all other browsers, I think) cannot paint outside the page area, so trimming is disabled at page boundaries. There will be an internal WPT test for that in an upcoming CL. Set widows and orphans to 1 in the tests. They are not meant to be affected by orphans / widows requirements anyway, but our widows calculation code is currently causing trouble for text box trimming (two different types of relayout not getting along too well), so just set it to 1 for now. A follow-up CL will fix this. Bug: 41494433 Change-Id: Ic4fc97ecf4cce3f52d5c3d8d44c3188c53970002 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961725 Commit-Queue: Morten StenshorneReviewed-by: Koji Ishii Cr-Commit-Position: refs/heads/main{#1373770} -- wpt-commits: 35a534039299fb6e3e3e27056eaf5e22342be458 wpt-pr: 48817 UltraBlame original commit: bf38d089a241450f904e3a1bd082db60c87e348f
… columns., a=testonly Automatic update from web-platform-tests [text-box-trim] Trim at the start/end of columns. There are now two types of text box trimming: The already existing one, trimming at the start or end of a node. And the new one, trimming at the start or end of a fragmentainer. We need to distinguish between these, since they aren't active at the same times. Therefore, the old "should text box trim start/end" flags are now qualified with "node" (e.g. ShouldTextBoxTrimNodeStart()), and the new ones are qualified with "fragmentainer" (e.g. ShouldTextBoxTrimFragmentainerStart()). When text-box-trim is specified inside a fragmentation context, it should not cause trimming at fragmentainer breaks, unless box-decoration-break is 'clone'. See w3c/csswg-drafts#5335 (comment) When text-box-trim is specified on a multicol container (i.e. NOT inside the fragmentation context that the multicol container establishes), it should cause trimming at fragmentainer breaks. See w3c/csswg-drafts#5335 (comment) Update text-box-trim-multicol-001.html, since we now trim at fragmentainer boundaries. Also make the multicol container slightly shorter, to demonstrate that we also trim at the end of columns. Make the multicol container in text-box-trim-multicol-002.html slightly taller, to demonstrate that there's trimming at the end of columns in that case (trimming is specified on a multicol descendant, and box-decoration-break is not 'clone'). Also add more tests for trimming at column boundaries, and also some basic printing tests that simply test that text-box trimming still works, at least when they're not next to a page boundary. Blink (and all other browsers, I think) cannot paint outside the page area, so trimming is disabled at page boundaries. There will be an internal WPT test for that in an upcoming CL. Set widows and orphans to 1 in the tests. They are not meant to be affected by orphans / widows requirements anyway, but our widows calculation code is currently causing trouble for text box trimming (two different types of relayout not getting along too well), so just set it to 1 for now. A follow-up CL will fix this. Bug: 41494433 Change-Id: Ic4fc97ecf4cce3f52d5c3d8d44c3188c53970002 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5961725 Commit-Queue: Morten StenshorneReviewed-by: Koji Ishii Cr-Commit-Position: refs/heads/main{#1373770} -- wpt-commits: 35a534039299fb6e3e3e27056eaf5e22342be458 wpt-pr: 48817 UltraBlame original commit: bf38d089a241450f904e3a1bd082db60c87e348f
From #3240 (comment)
The text was updated successfully, but these errors were encountered: