Bug 249621 - Caret Line Height is not matching font size
Summary: Caret Line Height is not matching font size
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joone Hur
URL:
Keywords: InRadar
: 13820 116424 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-12-19 17:18 PST by Ahmad Saleem
Modified: 2023-11-15 18:13 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2022-12-19 17:18:35 PST
Hi Team,

While trying to find for broken testcase of HTML Editing bug, I came cross bug in line height issue in the following testcase:

Test Case - https://jsfiddle.net/tck7m2qL/

^ Try to type after the "grey" container and observer caret size (I-Beam), it would be huge and size of container in Safari 16.2 & STP160.

While Firefox Nightly 110 and Chrome Canary 111 show normal caret size (Firefox does not have any container and show in "normal" size since beginning while Chrome Canary show "Big" one till we don't type first character and then it will show "normal" caret size).

Just wanted to raise this bug so it can be tracked and if it is duplicate then please close it.

Thanks!
Comment 1 Radar WebKit Bug Importer 2022-12-26 17:19:14 PST
<rdar://problem/103716521>
Comment 2 Joone Hur 2023-08-13 05:58:39 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16647
Comment 4 Joone Hur 2023-11-14 22:00:30 PST
It looks almost the same to get the caret height from the Chromium implementation and my patch. The problem seems to be that the caret isn't rendering correctly on iOS because the top was calculated incorrectly. So, I've updated the part where the top is calculated. Thanks for the info.
Comment 5 Joone Hur 2023-11-15 18:08:51 PST
*** Bug 13820 has been marked as a duplicate of this bug. ***
Comment 6 Joone Hur 2023-11-15 18:13:14 PST
*** Bug 116424 has been marked as a duplicate of this bug. ***