Bug 250215

Summary: REGRESSION(257981@main): Form control focus ring is clipped when zooming in
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: Layout and RenderingAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
test case none

Description Said Abou-Hallawa 2023-01-06 09:33:17 PST
Created attachment 464376 [details]
test case

1. Open the attached test case
2. Click inside the search field

Result: The focus ring is clipped.

In 257981@main, ThemeMac::drawCellOrFocusRingWithViewIntoContext() was refactored to ControlMac::drawCell(). In these two functions, the NSCell drawing will be routed to an ImageBuffer if the page is zoomed. After the drawing this ImageBuffer is drawn into the destination context. When the form control is focused, we ask AppKit to draw also a focus ring around the rectangle of form control. AppKit bleeds at maximum three pixels around the drawing rectangle. hemeMac::drawCellOrFocusRingWithViewIntoContext() handles this issue by inflating the ImageBuffer size by three pixels. This size inflation needs to be ported to ControlMac::drawCell().
Comment 1 Radar WebKit Bug Importer 2023-01-06 09:36:36 PST
<rdar://problem/103958015>
Comment 2 Said Abou-Hallawa 2023-01-06 09:45:23 PST
Pull request: https://github.com/WebKit/WebKit/pull/8309
Comment 3 EWS 2023-01-06 11:37:03 PST
Committed 258553@main (2d409b2f1e10): <https://commits.webkit.org/258553@main>

Reviewed commits have been landed. Closing PR #8309 and removing active labels.