[Webkit-unassigned] [Bug 216601] getComputedStyle rounds lineHeight to nearest pixel

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 30 21:51:29 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=216601

--- Comment #10 from Tyler Wilcock <twilco.o at protonmail.com> ---
(In reply to Antti Koivisto from comment #9)

> Based on the output the expected value in the test is 32px/38px which is what we were producing before this patch.
The expected value in this test is not hardcoded, it is generated by a "reference" style vs. the "under-test" style.  So it's not like this:

assert_equals('...32px / 38px...',  'actual value')

and is instead like this (pseudocode):

assert_equals(getComputedStyle(reference)['font'], getComputedStyle(actual)['font])

So by changing line-height to serialize as a double instead of an int, we change both the reference-expectation and the actual value to a fractional value.

> Are you saying that both Chrome and Gecko now fail the same way as we do?
Using the case quoted above as an example:
WebKit before this patch: 32px / 38px
WebKit after this patch: 32px / 38.400001525878906px
Gecko: 32px / 38.4px
Chromium: 32px / 38.4px

Point being, we now represent line-height fractionally as others do.  Chromium passes this case, and Gecko fails for unrelated reasons.

> Or that our version of the test is out of date?
Our version of the test is indeed the latest, so no concerns there.

---

Does this clear it up, or am I still missing your point?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201201/03ea4301/attachment-0001.htm>


More information about the webkit-unassigned mailing list