Closed Bug 1559589 Opened 5 years ago Closed 5 years ago

Make Font Editor handle keyword values for line-height

Categories

(DevTools :: Inspector, task, P1)

task

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: rcaliman, Assigned: rcaliman)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

With fixing bug 1536871, the new default value for line-height from getComputedStyle() becomes "normal", not a numeric value.

The Font Editor expects to always be able to parseFloat() the line-height value into a number and that fails resulting in a crashed Font Editor and failed tests.

Similarly to how letter-spacing accepts keyword values, we should ensure components handling line-height follow suit.

Blocks: 1536871
No longer depends on: 1536871

Thanks for taking this Razvan!

Bugbug thinks this bug is a task, but please change it back in case of error.

Type: defect → task

Remove default conversion for line-height value to unitless value to prevent Font Editor from crashing when the patch from Bug 1536871 (the default computed value for line-heightis no longer numeric).

Adds support for normal keyword value for line-height as the default returned by getComputedStyle(), similar to existing behavior for letter-spacing.

Fixes misnomer of the class in LetterSpacing.js component.

Pushed by rcaliman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/17cec9244fa9 Ensure Font Editor supports "normal" as computed style value for line-height; r=gl
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Regressions: 1561871
Component: Inspector: Fonts → Inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: