Open Bug 1551090 Opened 5 years ago Updated 2 years ago

-webkit-line-clamp with a single flex item not quite interoperable.

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

People

(Reporter: emilio, Unassigned, NeedInfo)

References

Details

Attachments

(2 files)

Attached file t.html (deleted) —

The following test-case that I constructed while trying to reduce bug 1551065 renders differently than WebKit.

Is this intentional / known Cam? Seems like Blink's line-clamp doesn't work quite as our line-clamp, since the clamped lines still affect the sizing of the flex container.

Flags: needinfo?(cam)
Attached file t2.html (deleted) —

The issue seems to be whether to generate -webkit-box items for white space that is a direct child of the -webkit-box container, when the white space normally shouldn't be collapsed away (as with white-space: pre). The effect is that Blink generates more lines, which is why it's affecting -webkit-line-clamp.

Daniel, is this a known difference between our -webkit-box implementation and Blink/WebKit's? Is this something we should fix?

Flags: needinfo?(cam) → needinfo?(dholbert)

(In reply to Cameron McCormack (:heycam) from comment #2)

Daniel, is this a known difference between our -webkit-box implementation and Blink/WebKit's? Is this something we should fix?

No, I don't think it's a known difference.

Yes, it's probably something we should fix. In case I don't get to it and someone else wants to take a look: we probably need a special case in nsCSSFrameConstructor::FrameConstructionItem::NeedsAnonFlexOrGridItem(), for the aIsLegacyBox==true case.
https://searchfox.org/mozilla-central/rev/8308eb7ea14318f53b55f3289c2bb9b712265318/layout/base/nsCSSFrameConstructor.cpp#11781

(Or, if the whitespace has already been discarded by that point and the function doesn't even get to consider it, then perhaps we need a special case up a few levels in nsCSSFrameConstructor::CreateNeededAnonFlexOrGridItems or nearby.)

Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: