Closed Bug 1814626 Opened 2 years ago Closed 2 years ago

Resolve line-height to used value in the style system

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: jfkthame, Assigned: emilio)

References

Details

Attachments

(1 file)

Followup to bug 1813536, as Emilio noted in https://phabricator.services.mozilla.com/D168542#5545333:

we should be able to also clean-up nsComputedDOMStyle::DoGetLineHeight and co (since it's no longer layout-dependent with the exception of -moz-block-height, which is not exposed to content).

So we should be able to remove that code and this after this change, and it'd make longhands and shorthands return consistent values in the computed style.

An initial naïve attempt to do this ran into problems with html/rendering/non-replaced-elements/form-controls/input-line-height-computed.html, because (per Emilio in Matrix) "we implement this <input> line-height hack at used-value time".

This should also facilitate implementing the lh and rlh units.

Flags: needinfo?(emilio)

For ToResolvedValue implementation purposes we wouldn't need to split
out the vertical / font / line-height arguments and we could just pass
around the ComputedStyle, but the lh unit would need that distinction,
(because computing lh on font properties should use the parent style).

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8de2aace34f0 Expose line-height resolution to style, and use it from ToResolvedValue. r=jfkthame
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: