commit | 80c2bc4cd53f8d0f4ef8637b600f5a451c5b2c0d | [log] [tgz] |
---|---|---|
author | Andreu Botella <abotella@igalia.com> | Fri Jul 12 05:34:30 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jul 12 05:34:30 2024 |
tree | 9f66701e248734682ac5d96242d2c99fe0bb17c4 | |
parent | 5e7f3087196823e23ef3040f8f9113f8451a6c7c [diff] |
[line-clamp] Don't hide block-level abspos at the `line-clamp: auto` boundary With `line-clamp: auto`, the clamp point should be chosen such that it is the furthermost possible clamp point where the box doesn't overflow. Since block-level abspos boxes can have a clamp point after them (unlike inline-level ones), and they do not increase the intrinsic size of the container, a block-level abspos box whose static position is exactly at the boundary should be visible. This was not what our implementation did, however. The reason for that is that `BlockLineClampData::ShouldHideForPaint` (and `BlockLineClampData::IsPastClampPoint`) were always returning true for `line-clamp: auto` when a previous box had been found that ended exactly at the boundary. This was meant to hide lines and floats that started exactly at the boundary, since at the time that we're dealing with them in the block layout algorithm, we don't know the height of the line; as well as to handle cases where a previous box might have clamped, but the current BFC offset might still be before the clamp boundary. However, this reasoning does not work for block-level abspos, because they do not take up container space, and because there is a possible clamp point after them. Therefore, this patch adds an optional argument for block-level abspos to provide their static BFC offset instead. Bug: 40336192 Change-Id: Ia2799a2510c3e2d6d1532198ef72443fac120056 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5675924 Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Commit-Queue: Andreu Botella <abotella@igalia.com> Cr-Commit-Position: refs/heads/main@{#1326556}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.