pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/WebKit/WebKit/pull/60812

/assets/global-68dd150ce6c8e711.css" /> REGRESSION(309358@main): [macOS] Create color picker synchronously in WebPageProxy::showColorPicker by zakariaridouh · Pull Request #60812 · WebKit/WebKit · GitHub
Skip to content

REGRESSION(309358@main): [macOS] Create color picker synchronously in WebPageProxy::showColorPicker#60812

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
zakariaridouh:eng/REGRESSION-309358-main-macOS-ASSERTION-FAILED-WTF-RefPtr-WebKit-WebColorPicker-operator-const-T-WebKit-WebColorPicker-_PtrTraits-WTF-RawPtrTraits-WebKit-WebColorPicker
Mar 18, 2026
Merged

REGRESSION(309358@main): [macOS] Create color picker synchronously in WebPageProxy::showColorPicker#60812
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
zakariaridouh:eng/REGRESSION-309358-main-macOS-ASSERTION-FAILED-WTF-RefPtr-WebKit-WebColorPicker-operator-const-T-WebKit-WebColorPicker-_PtrTraits-WTF-RawPtrTraits-WebKit-WebColorPicker

Conversation

@zakariaridouh
Copy link
Contributor

@zakariaridouh zakariaridouh commented Mar 17, 2026

edd3097

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

26a0cb5

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe 🛠 win ⏳ 🛠 ios-apple
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests ⏳ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
🧪 ios-wk2-wpt 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
🧪 api-ios ✅ 🛠 gtk
✅ 🛠 ios-safer-cpp ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress 🛠 playstation
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2
✅ 🛠 tv 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@zakariaridouh zakariaridouh requested a review from cdumez as a code owner March 17, 2026 22:48
@zakariaridouh zakariaridouh self-assigned this Mar 17, 2026
@zakariaridouh zakariaridouh added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Mar 17, 2026
@zakariaridouh zakariaridouh requested a review from pxlcoder March 17, 2026 22:51
@zakariaridouh zakariaridouh force-pushed the eng/REGRESSION-309358-main-macOS-ASSERTION-FAILED-WTF-RefPtr-WebKit-WebColorPicker-operator-const-T-WebKit-WebColorPicker-_PtrTraits-WTF-RawPtrTraits-WebKit-WebColorPicker branch from 051c7e4 to 9b014b5 Compare March 17, 2026 22:54
@zakariaridouh zakariaridouh changed the title REGRESSION(309358@main): [macOS] ASSERTION FAILED: WTF::RefPtr<WebKit::WebColorPicker>::operator*() const [T = WebKit::WebColorPicker, _PtrTraits = WTF::RawPtrTraits<WebKit::WebColorPicker REGRESSION(309358@main): [macOS] Null-check colorPicker in WebPageProxy::Internals::didChooseColor Mar 17, 2026
Copy link
Member

@pxlcoder pxlcoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@zakariaridouh zakariaridouh changed the title REGRESSION(309358@main): [macOS] Null-check colorPicker in WebPageProxy::Internals::didChooseColor REGRESSION(309358@main): [macOS] Create color picker synchronously in WebPageProxy::showColorPicker Mar 18, 2026
@zakariaridouh zakariaridouh force-pushed the eng/REGRESSION-309358-main-macOS-ASSERTION-FAILED-WTF-RefPtr-WebKit-WebColorPicker-operator-const-T-WebKit-WebColorPicker-_PtrTraits-WTF-RawPtrTraits-WebKit-WebColorPicker branch from 9b014b5 to e799ab8 Compare March 18, 2026 03:54
@zakariaridouh zakariaridouh force-pushed the eng/REGRESSION-309358-main-macOS-ASSERTION-FAILED-WTF-RefPtr-WebKit-WebColorPicker-operator-const-T-WebKit-WebColorPicker-_PtrTraits-WTF-RawPtrTraits-WebKit-WebColorPicker branch from e799ab8 to 5cc6edc Compare March 18, 2026 18:02
@zakariaridouh zakariaridouh requested a review from a team as a code owner March 18, 2026 18:02
@zakariaridouh zakariaridouh requested a review from pxlcoder March 18, 2026 18:08
@zakariaridouh zakariaridouh force-pushed the eng/REGRESSION-309358-main-macOS-ASSERTION-FAILED-WTF-RefPtr-WebKit-WebColorPicker-operator-const-T-WebKit-WebColorPicker-_PtrTraits-WTF-RawPtrTraits-WebKit-WebColorPicker branch from 5cc6edc to 26a0cb5 Compare March 18, 2026 22:30
@zakariaridouh zakariaridouh added the merge-queue Applied to send a pull request to merge-queue label Mar 18, 2026
… 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
@webkit-commit-queue webkit-commit-queue force-pushed the eng/REGRESSION-309358-main-macOS-ASSERTION-FAILED-WTF-RefPtr-WebKit-WebColorPicker-operator-const-T-WebKit-WebColorPicker-_PtrTraits-WTF-RawPtrTraits-WebKit-WebColorPicker branch from 26a0cb5 to edd3097 Compare March 18, 2026 23:45
@webkit-commit-queue
Copy link
Collaborator

Committed 309512@main (edd3097): https://commits.webkit.org/309512@main

Reviewed commits have been landed. Closing PR #60812 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit edd3097 into WebKit:main Mar 18, 2026
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Bugs Unclassified bugs are placed in this component until the correct component can be determined.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy