Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: edd3097fc18981a8c0bbf29e22e13ed83820d380
https://github.com/WebKit/WebKit/commit/edd3097fc18981a8c0bbf29e22e13ed83820d380
Author: Zak Ridouh <[email protected]>
Date: 2026-03-18 (Wed, 18 Mar 2026)
Changed paths:
M Source/WebKit/UIProcess/API/gtk/WebKitColorChooser.cpp
M Source/WebKit/UIProcess/API/gtk/WebKitColorChooser.h
M Source/WebKit/UIProcess/WebColorPicker.cpp
M Source/WebKit/UIProcess/WebColorPicker.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/gtk/WebColorPickerGtk.cpp
M Source/WebKit/UIProcess/gtk/WebColorPickerGtk.h
M Source/WebKit/UIProcess/mac/WebColorPickerMac.h
M Source/WebKit/UIProcess/mac/WebColorPickerMac.mm
Log Message:
-----------
REGRESSION(309358@main): [macOS] Create color picker synchronously in
WebPageProxy::showColorPicker
https://bugs.webkit.org/show_bug.cgi?id=310135
rdar://172774966
Reviewed by Aditya Keerthi.
301062@main moved color picker creation inside the asynchronous
convertRectToMainFrameCoordinates callback so the popover could be
positioned with converted coordinates. This meant internals().colorPicker
was null until the callback fired, causing a flaky assertion failure when
didChooseColor was called before the callback completed.
Fix by creating the color picker synchronously and deferring only
showColorPicker until coordinates are ready. On Mac, the WKColorPopoverMac
well creation moves from the WebColorPickerMac constructor into
showColorPicker, which now receives the converted rect. This matches
the GTK implementation which already creates its dialog at show time.
Also add a null check in didChooseColor as defense-in-depth, matching
the existing pattern in didEndColorPicker.
No new tests, as this is fixing a flaky test.
* Source/WebKit/UIProcess/API/gtk/WebKitColorChooser.cpp:
(WebKit::WebKitColorChooser::showColorPicker):
* Source/WebKit/UIProcess/API/gtk/WebKitColorChooser.h:
* Source/WebKit/UIProcess/WebColorPicker.cpp:
(WebKit::WebColorPicker::showColorPicker):
* Source/WebKit/UIProcess/WebColorPicker.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showColorPicker):
(WebKit::WebPageProxy::Internals::didChooseColor):
* Source/WebKit/UIProcess/gtk/WebColorPickerGtk.cpp:
(WebKit::WebColorPickerGtk::showColorPicker):
* Source/WebKit/UIProcess/gtk/WebColorPickerGtk.h:
* Source/WebKit/UIProcess/mac/WebColorPickerMac.h:
* Source/WebKit/UIProcess/mac/WebColorPickerMac.mm:
(WebKit::WebColorPickerMac::showColorPicker):
(-[WKColorPopoverMac initWithFrame:inView:]):
(-[WKColorPopoverMac
setAndShowPicker:withColor:supportsAlpha:suggestions:rect:]):
(-[WKColorPopoverMac setAndShowPicker:withColor:supportsAlpha:suggestions:]):
Deleted.
Canonical link: https://commits.webkit.org/309512@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications