Bug 250403

Summary: [GPU Process] DrawFocusRing with timeOffset is not recorded for macOS
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   
See Also: https://bugs.webkit.org/show_bug.cgi?id=250850
Bug Depends on:    
Bug Blocks: 249168    

Said Abou-Hallawa
Reported 2023-01-10 12:41:31 PST
The Recorder::drawFocusRing() versions with timeOffset are not implemented. But after looking at the code, it turned out the timeOffset was never used and we always pass std::numeric_limits<double>::max() to NSInitializeCGFocusRingStyleForTime(). This means the return value of NSInitializeCGFocusRingStyleForTime()() is always false. So we do not need to pass the arguments: timeOffset and needsRepaint to drawFocusRing. Therefore the Mac versions of GraphicsContext::drawFocusRing() are not needed. So we can have two versions only of GraphicsContext::drawFocusRing(): 1. One that takes (const Path&, float outlineWidth, ...). The outlineWidth is used to set the lineWidth on Cairo and to set the blurRadius on Windows. 1. One that takes (const Vector<FloatRect>&, float outlineOffset, float outlineWidth, ...). The outlineOffset is used to shrink the focus ring rectangles. On Cocoa and Windows, this version will convert the rects to a Path and call the previous one.
Attachments
Said Abou-Hallawa
Comment 1 2023-01-10 12:42:00 PST
Said Abou-Hallawa
Comment 2 2023-01-10 13:01:24 PST
EWS
Comment 3 2023-01-11 11:16:12 PST
Committed 258794@main (1100c0ba6eb7): <https://commits.webkit.org/258794@main> Reviewed commits have been landed. Closing PR #8481 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.