[text-box-trim] Trim does not use font metrics of ::first-line
Categories
(Core :: Layout: Block and Inline, defect)
Tracking
()
People
(Reporter: sajidanwar, Assigned: sajidanwar)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 external file)
|
273 bytes,
text/html
|
Details |
Gecko's implementation of text-box-trim doesn't use the font metrics of a ::first-line container when trimming. Blink and WebKit both do, and the specification is clear that this is the intended behavior, because:
text-box-trimuses the metrics of the line's root inline box (ref)- The root inline box (at least the fragment corresponding to the first line) is inside the
::first-linepseudo-element (ref)
I believe this isn't working in Gecko out of the box because it doesn't actually generate frames for root inline boxes, so it currently always retrieves the font metrics from the block frame itself.
| Assignee | ||
Comment 1•2 months ago
|
||
Comment 3•2 months ago
|
||
Backed out for causing wr failures @text-box-trim-first-line-pseudo-003.html.
| Assignee | ||
Comment 4•2 months ago
•
|
||
Windows is always doing this to me 😩 Looks like 1 pixel off vertically that's affecting every single pixel below ... bit large for fuzzy metadata to be reasonable, maybe. Probably I just need to switch from Lato-Medium to a different font that will avoid fractional pixel issues.
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61973 for changes under testing/web-platform/tests
Upstream PR was closed without merging
| Assignee | ||
Updated•2 months ago
|
Comment 8•2 months ago
|
||
| bugherder | ||
Comment 9•2 months ago
|
||
Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.
Comment 10•2 months ago
|
||
The patch landed in nightly and beta is affected.
:sajidanwar, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox155towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 11•2 months ago
|
||
Aw, didn't realize we already passed merge day for 155. Ah well, this is a low severity edge case for a new CSS feature, it's probably fine to ride the train to 156, so I'm marking 155 as wontfix.
Upstream PR merged by moz-wptsync-bot
Comment 13•2 months ago
|
||
Did you want to nominate this for the Fx156 relnotes? If so, set the relnote-firefox flag to "?"
https://wiki.mozilla.org/Release_Management/Release_Notes_Nomination
Possible wording:
text-box-trimnow uses the font metrics of a::first-linepseudo-element when one applies, matching other browsers and the specification.
| Assignee | ||
Comment 14•2 months ago
|
||
Thanks, that seems like a good idea and I like the suggested wording as well.
Release Note Request (optional, but appreciated)
[Why is this notable]: Interop fix for CSS feature
[Affects Firefox for Android]: Yes
[Suggested wording]: text-box-trim now uses the font metrics of a ::first-line pseudo-element when one applies, matching other browsers and the specification.
[Links (documentation, blog post, etc)]:
Comment 15•2 months ago
|
||
Thanks, added to the Fx156 nightly release notes, please allow 30 minutes for the site to update.
Updated•2 months ago
|
Description
•