Closed
Bug 1486409
Opened 6 years ago
Closed 6 years ago
Font editor: guard against zero as value for font properties
Categories
(DevTools :: Inspector, defect, P2)
DevTools
Inspector
Tracking
(firefox63 verified, firefox64 verified)
VERIFIED
FIXED
Firefox 63
People
(Reporter: rcaliman, Assigned: rcaliman)
References
Details
Attachments
(2 files)
The CSS `font-size` value may be zero and that causes unexpected results when using it for unit conversion or line-height computation. Steps: - go to https://news.google.com/ - inspect a headline, select its parent `<article>` element - observe the font editor in the Fonts panel Expected: Size should be shown as 0px (same as from Computed panel). Line height should show 0. Result: Size field is not populated. Line height is shown as NaN because of the division by zero. A few other cases are impacted by `font-size: 0`, such as converting between relative units which use the font-size value, for example converting from 'px' to 'em'.
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment on attachment 9004189 [details] Bug 1486409 - Guard against a font property value of zero. Catch NaN and Infinity in unit conversion. r=gl Gabriel [:gl] (ΦωΦ) has approved the revision.
Attachment #9004189 -
Flags: review+
Pushed by rcaliman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f10df314fc4d Guard against a font property value of zero. Catch NaN and Infinity in unit conversion. r=gl
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f10df314fc4d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Updated•6 years ago
|
Flags: qe-verify+
Updated•6 years ago
|
QA Contact: catalin.sasca
Comment 6•6 years ago
|
||
I successfully reproduced the issue on Firefox Nightly 63.0a1 (2018-08-27) under Windows 10 (x64) using the STR from Comment 0. The issue is no longer reproducible on Firefox Beta 63.0b13 and latest Firefox 64.0a1 (2018-10-09). Tests were performed on Windows 10 (x64), macOS 10.13 and Ubuntu 16.04 (x64).
Updated•3 years ago
|
Component: Inspector: Fonts → Inspector
You need to log in
before you can comment on or make changes to this bug.
Description
•