Bug 250403 - [GPU Process] DrawFocusRing with timeOffset is not recorded for macOS
Summary: [GPU Process] DrawFocusRing with timeOffset is not recorded for macOS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks: 249168
  Show dependency treegraph
 
Reported: 2023-01-10 12:41 PST by Said Abou-Hallawa
Modified: 2023-01-19 10:04 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 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.
Comment 1 Said Abou-Hallawa 2023-01-10 12:42:00 PST
rdar://104039216
Comment 2 Said Abou-Hallawa 2023-01-10 13:01:24 PST
Pull request: https://github.com/WebKit/WebKit/pull/8481
Comment 3 EWS 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.