Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b8b3d9929d7dafe50bb11efb9bb066c4d81d0bab
https://github.com/WebKit/WebKit/commit/b8b3d9929d7dafe50bb11efb9bb066c4d81d0bab
Author: Said Abou-Hallawa <[email protected]>
Date: 2023-02-13 (Mon, 13 Feb 2023)
Changed paths:
M Source/WebCore/PAL/pal/spi/mac/NSCellSPI.h
M Source/WebCore/platform/graphics/mac/controls/ControlMac.h
M Source/WebCore/platform/graphics/mac/controls/ControlMac.mm
M Source/WebCore/platform/graphics/mac/controls/WebControlView.mm
Log Message:
-----------
[GPU Process] [FormControls] Make it possible to draw a viewless NSCell
https://bugs.webkit.org/show_bug.cgi?id=252003
rdar://105233927
Reviewed by Aditya Keerthi.
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.
* Source/WebCore/PAL/pal/spi/mac/NSCellSPI.h:
* Source/WebCore/platform/graphics/mac/controls/ControlMac.h:
* Source/WebCore/platform/graphics/mac/controls/ControlMac.mm:
(WebCore::supportsViewlessCells):
(WebCore::shouldFlipContext):
(WebCore::applyViewlessCellSettings):
(WebCore::drawViewlessCell):
(WebCore::drawCellInView):
(WebCore::drawCellFocusRingInView):
(WebCore::drawCellFocusRing):
(WebCore::ControlMac::drawCellOrFocusRing):
(WebCore::ControlMac::drawCell):
(WebCore::drawFocusRing): Deleted.
(WebCore::drawCellOrFocusRing): Deleted.
* Source/WebCore/platform/graphics/mac/controls/WebControlView.mm:
Canonical link: https://commits.webkit.org/260210@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes