RESOLVED WORKSFORME262289
Matched properties cache doesn't account for lh units correctly.
https://bugs.webkit.org/show_bug.cgi?id=262289
Summary Matched properties cache doesn't account for lh units correctly.
Emilio Cobos Álvarez (:emilio)
Reported 2023-09-28 01:45:54 PDT
What steps will reproduce the problem? (1) Open https://crisal.io/tmp/lh-sharing.html (2) See how both blocks are 50px tall, even though the line-height of the second one is 100px. I caught this while reviewing the Firefox patches to support lh/rlh. Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1487480
Attachments
rendering in Safari, firefox, chrome (134.22 KB, image/png)
2023-09-28 18:47 PDT, Karl Dubost
no flags
Karl Dubost
Comment 1 2023-09-28 18:47:00 PDT
Created attachment 467969 [details] rendering in Safari, firefox, chrome Thanks Emilio. I can not reproduce on STP 179.
Karl Dubost
Comment 2 2023-09-28 18:56:52 PDT
document.querySelectorAll('div')[2].getBoundingClientRect() returns 100 in STP 179 and Firefox 120.0a1 (2023-09-28) (64-bit) and returns 50 in Version 119.0.6036.0 (Official Build) canary (arm64) So it was probably fixed.
Emilio Cobos Álvarez (:emilio)
Comment 3 2023-09-29 03:28:56 PDT
I don't see anything from here that deals with line-height, so I'm skeptic that it has been fixed: https://searchfox.org/wubkat/rev/c5cb966bfdbd256be13f3a3c5eafaec9eccb1f0a/Source/WebCore/style/MatchedDeclarationsCache.cpp#61-101
Karl Dubost
Comment 4 2023-09-29 07:09:33 PDT
Emilio fwiw the test is not working on Safari 17 released version. So this is a recent fix. Let's Autospade Bug 260199 https://github.com/WebKit/WebKit/commit/b733d192e11b8379df67740799a87cecaa565a85
Note You need to log in before you can comment on or make changes to this bug.