Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

Bug 1731541 - When line-clamp is in effect, make text-wrap:balance consider only the lines up to the clamp limit. r=#layout-reviewers
ClosedPublic

Authored by jfkthame on Sep 14 2023, 9:37 AM.
Referenced Files
Unknown Object (File)
Wed, Oct 2, 5:25 AM
Unknown Object (File)
Sat, Sep 28, 11:46 AM
Unknown Object (File)
Thu, Sep 26, 7:38 PM
Unknown Object (File)
Tue, Sep 24, 12:45 PM
Unknown Object (File)
Sep 20 2024, 10:38 AM
Unknown Object (File)
Sep 16 2024, 2:28 AM
Unknown Object (File)
Sep 10 2024, 2:02 PM
Unknown Object (File)
Aug 31 2024, 12:14 PM

Details

Summary

This corresponds to how Chrome behaves, and passes the test they included in WPT.

It's unclear to me whether this behavior actually follows from the current spec
(see https://github.com/w3c/csswg-drafts/issues/9310), but it seems to be the desired
result.

(I've put it behind a (default-enabled) pref for now, so that it's possible to
experiment with the two possible interpretations, but we can remove the pref once
the spec question is clarified/confirmed.)

This patch also disables balancing for fragmented/overflowing blocks, as that will
not currently work well. We may want to address that as a followup issue (though it
won't matter to the primary balance use-cases such as titles).

Depends on D188139

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Branch
default
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
jfkthame edited the summary of this revision. (Show Details)

Rebase

Code analysis found 2 defects in diff 767149:

  • 2 defects found by clang-tidy
WARNING: Found 2 defects (warning level) that can be dismissed.

You can run this analysis locally with:

  • ./mach static-analysis check --outgoing (C/C++)

If you see a problem in this automated review, please report it here.

You can view these defects in the Diff Detail section of Phabricator diff 767149.

jfkthame edited the summary of this revision. (Show Details)
emilio added a project: testing-approved.
emilio added inline comments.
layout/generic/nsBlockFrame.cpp
1453

This seems like it should be in the previous patch perhaps.

This revision is now accepted and ready to land.Sep 26 2023, 4:54 PM
jfkthame added inline comments.
layout/generic/nsBlockFrame.cpp
1453

Yes, it should (along with the checks of reflowStatus.IsFullyComplete). I was being lazy and minimizing churn in my local queue! Anyhow, I've now moved it to the earlier patch.

jfkthame marked an inline comment as done.

1 defect closed compared to the previous diff 767314.


If you see a problem in this automated review, please report it here.

This revision is now accepted and ready to land.Sep 28 2023, 9:13 AM

Code analysis found 10 defects in diff 769158:

  • 10 build errors found by clang-tidy
IMPORTANT: Found 10 defects (error level) that must be fixed before landing.

You can run this analysis locally with:

  • ./mach static-analysis check --outgoing (C/C++)

If you see a problem in this automated review, please report it here.

You can view these defects in the Diff Detail section of Phabricator diff 769158.

This revision is now accepted and ready to land.Sep 28 2023, 8:52 PM