AppKit crashes if [NSCell drawWithFrame] is called out of the main thread with a non-nil NSView. And this is why a hack was added to WebControlWindow to silence this crash in 257981@main. To fix the crash and to remove the hack, a nil NSView will be passed to [NSCell drawWithFrame] instead of passing the fake one. To provide the [NSCell drawWithFrame] with the settings that it used to get from the fake NSView, new AppKit SPIs will be used to explicitly set them from the drawing. An NSCell can be drawn without an NSView only if these SPIs are available.
<rdar://problem/105233927>
Pull request: https://github.com/WebKit/WebKit/pull/9882
Committed 260210@main (b8b3d9929d7d): <https://commits.webkit.org/260210@main> Reviewed commits have been landed. Closing PR #9882 and removing active labels.
Re-opening for pull request https://github.com/WebKit/WebKit/pull/10052
Committed 260216@main (efa69875810d): <https://commits.webkit.org/260216@main> Reviewed commits have been landed. Closing PR #10052 and removing active labels.