REGRESSION(309358@main): [macOS] Create color picker synchronously in WebPageProxy::showColorPicker#60812
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 051c7e4) Details
|
051c7e4 to
9b014b5
Compare
Collaborator
|
EWS run on previous version of this PR (hash 9b014b5) Details
|
pxlcoder
reviewed
Mar 17, 2026
Member
pxlcoder
left a comment
There was a problem hiding this comment.
I think the correct fix for this would be to create the color picker outside of the conversion (and continue to call "show" after the coordinates are ready).
I'm realizing I did that incorrectly in https://commits.webkit.org/301062@main.
9b014b5 to
e799ab8
Compare
Collaborator
|
EWS run on previous version of this PR (hash e799ab8) Details
|
pxlcoder
reviewed
Mar 18, 2026
e799ab8 to
5cc6edc
Compare
Collaborator
|
EWS run on previous version of this PR (hash 5cc6edc) Details
|
pxlcoder
approved these changes
Mar 18, 2026
5cc6edc to
26a0cb5
Compare
Collaborator
|
EWS run on current version of this PR (hash 26a0cb5) Details
|
… 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
26a0cb5 to
edd3097
Compare
Collaborator
|
Committed 309512@main (edd3097): https://commits.webkit.org/309512@main Reviewed commits have been landed. Closing PR #60812 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 tv-sim
edd3097
26a0cb5
🛠 win🧪 win-tests🧪 api-mac🧪 ios-wk2-wpt🧪 api-mac-debug🧪 api-ios🧪 mac-AS-debug-wk2🛠 playstation🛠 mac-safer-cpp