Bug 177367 - REGRESSION: When accessibility option for font-size set in preferences, line-height set with px creates enormous height divs
Summary: REGRESSION: When accessibility option for font-size set in preferences, line-...
Status: RESOLVED DUPLICATE of bug 177573
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Mac macOS 10.12.4
: P2 Major
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2017-09-22 09:39 PDT by Ben Frain
Modified: 2017-10-03 12:20 PDT (History)
6 users (show)

See Also:

Safari Technology Preview 40 and Safari 11 (355.44 KB, image/png)
2017-09-22 09:39 PDT, Ben Frain
no flags Details
Page in Safari 10 (627.11 KB, image/png)
2017-09-22 09:41 PDT, Ben Frain
no flags Details
reproduce-html (343 bytes, text/html)
2017-09-26 20:45 PDT, Zhifei Fang
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Frain 2017-09-22 09:39:52 PDT
Created attachment 321557 [details]
Safari Technology Preview 40 and Safari 11

This issue is also present in Safari 11.

When a user sets font-sizes to be displayed no less than 9px in Safari preferences and a website uses a line-height set with px values it can result in massive heights on elements.

The issue can be worked around by setting line-heights with a number rather than length but it is less than ideal as many existing websites may break.

I have not found it straightforward to create a reduction. However on a live site I am working with (https://www.bet365.com/?&cb=1032648335#/AA/B2/C101/D20170922/E20548296/F67258375/P10/) the issue exhibits clearly. The attachment is the page with those options set in the technology preview.
Comment 1 Ben Frain 2017-09-22 09:41:43 PDT
Created attachment 321558 [details]
Page in Safari 10

Comparison of same page in Safari 10
Comment 2 Zhifei Fang 2017-09-26 20:44:33 PDT
I have narrow it down.

When you setting a layout with "line-height" and "font-size:0", then setting the "Never use font size smaller than" will tigger this.
Comment 3 Radar WebKit Bug Importer 2017-09-26 20:44:52 PDT
Comment 4 Zhifei Fang 2017-09-26 20:45:40 PDT
Created attachment 321935 [details]
Comment 5 Zhifei Fang 2017-09-26 20:49:23 PDT
This is more like an Accessibility bug. "font-size:0" should let the Accessibility make it bigger, obviously it goes mad...
Comment 6 Zhifei Fang 2017-09-26 21:00:54 PDT
Dig a little bit more.
it actually change the line-height to 

This looks like the max value of double.

Maybe Somewhere we (unsigned double) 0 - 1
Comment 7 Zhifei Fang 2017-09-27 07:34:16 PDT
Correction for my last comment, just forgot that there is no unsigned double.
Comment 8 Simon Fraser (smfr) 2017-09-28 13:41:20 PDT
Is this the same as bug 177573?
Comment 9 Zhifei Fang 2017-09-28 19:51:42 PDT
looks yes.

the test is nearly same as the one I uploaded here.
Comment 10 Myles C. Maxfield 2017-10-03 12:20:51 PDT

*** This bug has been marked as a duplicate of bug 177573 ***