[webkit-changes] [WebKit/WebKit] ce9f6d: Cleanup some localMainFrame/localTopDocument usage

2024-12-22 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ce9f6de6dbe34aef669f0af3535ef95e272ccd4d
  
https://github.com/WebKit/WebKit/commit/ce9f6de6dbe34aef669f0af3535ef95e272ccd4d
  Author: Brady Eidson 
  Date:   2024-12-22 (Sun, 22 Dec 2024)

  Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/editing/ReplaceSelectionCommand.cpp
M Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm
M Source/WebCore/editing/markup.cpp
M Source/WebCore/html/HTMLAnchorElement.cpp
M Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
M Source/WebCore/inspector/agents/InspectorPageAgent.cpp
M Source/WebCore/loader/cache/CachedResourceLoader.cpp
M Source/WebCore/page/Chrome.cpp
M Source/WebCore/page/DebugPageOverlays.cpp
M Source/WebCore/page/FocusController.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/page/PageDebuggable.cpp
M Source/WebCore/page/PerformanceMonitor.cpp
M Source/WebCore/page/SettingsBase.cpp
M Source/WebCore/page/mac/PageMac.mm
M Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
M Source/WebCore/svg/graphics/SVGImage.cpp
M Source/WebCore/testing/InternalSettings.cpp
M Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp
M Source/WebCore/workers/shared/context/SharedWorkerThreadProxy.cpp
M Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp
M Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm

  Log Message:
  ---
  Cleanup some localMainFrame/localTopDocument usage
rdar://141858346
https://bugs.webkit.org/show_bug.cgi?id=285056

Reviewed by Alex Christensen.

This patch does the following:
- Logs an error whenever `Document::topDocument()` returns the incorrect 
Document as a fallback
- Introduces some obviously missing null checks
- Uses a safer/easier `localTopDocument` accessor instead of 
`localMainFrame->document()`
- Avoids localTopDocument and localMainFrame altogether in some cases where 
Page already has the data
- Other assorted cleanup and refactoring

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::topDocument const):
* Source/WebCore/dom/Document.h:
* Source/WebCore/editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):
* Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::sanitizeMarkupWithArchive):
* Source/WebCore/editing/markup.cpp:
(WebCore::sanitizeMarkup):
* Source/WebCore/html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):
* Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
* Source/WebCore/inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::navigate):
(WebCore::InspectorPageAgent::setEmulatedMedia):
* Source/WebCore/loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* Source/WebCore/page/Chrome.cpp:
(WebCore::Chrome::runModal):
* Source/WebCore/page/DebugPageOverlays.cpp:
(WebCore::InteractionRegionOverlay::activeLayer const):
* Source/WebCore/page/FocusController.cpp:
(WebCore::FocusController::advanceFocusInDocumentOrder):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::disabledAdaptations const):
(WebCore::Page::setOverrideViewportArguments):
(WebCore::Page::accessibilityTreeData const):
(WebCore::Page::showAllPlugins const):
(WebCore::Page::setPageScaleFactor):
(WebCore::Page::pageCount const):
(WebCore::Page::prioritizeVisibleResources):
(WebCore::Page::themeColor const):
(WebCore::Page::localTopDocument):
(WebCore::Page::localTopDocument const):
(WebCore::Page::proofreadingSessionSuggestionTextRectsInRootViewCoordinates 
const):
(WebCore::Page::updateTextVisibilityForActiveWritingToolsSession):
(WebCore::Page::textPreviewDataForActiveWritingToolsSession):
(WebCore::Page::decorateTextReplacementsForActiveWritingToolsSession):
(WebCore::Page::setSelectionForActiveWritingToolsSession):
* Source/WebCore/page/Page.h:
* Source/WebCore/page/PageDebuggable.cpp:
(WebCore::PageDebuggable::name const):
(WebCore::PageDebuggable::url const):
* Source/WebCore/page/PerformanceMonitor.cpp:
(WebCore::reportPageOverPostLoadResourceThreshold):
* Source/WebCore/page/SettingsBase.cpp:
(WebCore::SettingsBase::backgroundShouldExtendBeyondPageChanged):
(WebCore::SettingsBase::scrollingPerformanceTestingEnabledChanged):
* Source/WebCore/page/mac/PageMac.mm:
(WebCore::Page::platformInitialize):
* Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
* Source/WebCore/svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::reportApproximateMemoryCost co

[webkit-changes] [WebKit/WebKit] acacbb: Replace most dynamicDowncast casting o...

2024-12-20 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: acacbbd2f5150982b130dcd87692d819a4202a71
  
https://github.com/WebKit/WebKit/commit/acacbbd2f5150982b130dcd87692d819a4202a71
  Author: Brady Eidson 
  Date:   2024-12-20 (Fri, 20 Dec 2024)

  Changed paths:
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
M Source/WebCore/accessibility/AccessibilityObject.cpp
M Source/WebCore/accessibility/AccessibilityObject.h
M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
M Source/WebCore/css/query/MediaQueryFeatures.cpp
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/DocumentMarkerController.cpp
M Source/WebCore/dom/EventDispatcher.cpp
M Source/WebCore/editing/Editor.cpp
M Source/WebCore/editing/ReplaceSelectionCommand.cpp
M Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm
M Source/WebCore/editing/markup.cpp
M Source/WebCore/history/BackForwardCache.cpp
M Source/WebCore/history/BackForwardController.cpp
M Source/WebCore/history/CachedPage.cpp
M Source/WebCore/html/HTMLAnchorElement.cpp
M Source/WebCore/html/MediaElementSession.cpp
M Source/WebCore/inspector/InspectorFrontendAPIDispatcher.cpp
M Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
M Source/WebCore/inspector/InspectorFrontendHost.cpp
M Source/WebCore/inspector/InspectorOverlay.cpp
M Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
M Source/WebCore/inspector/agents/InspectorPageAgent.cpp
M Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp
M Source/WebCore/inspector/agents/page/PageAuditAgent.cpp
M Source/WebCore/inspector/agents/page/PageDebuggerAgent.cpp
M Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
M Source/WebCore/loader/FrameLoader.cpp
M Source/WebCore/loader/HistoryController.cpp
M Source/WebCore/loader/cache/CachedResource.cpp
M Source/WebCore/loader/cache/CachedResourceLoader.cpp
M Source/WebCore/page/Chrome.cpp
M Source/WebCore/page/DebugPageOverlays.cpp
M Source/WebCore/page/DragController.cpp
M Source/WebCore/page/EventHandler.cpp
M Source/WebCore/page/FocusController.cpp
M Source/WebCore/page/LocalDOMWindow.cpp
M Source/WebCore/page/LocalFrame.cpp
M Source/WebCore/page/LocalFrame.h
M Source/WebCore/page/LocalFrameView.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/page/PageColorSampler.cpp
M Source/WebCore/page/PageConsoleClient.cpp
M Source/WebCore/page/PageDebuggable.cpp
M Source/WebCore/page/PageOverlayController.cpp
M Source/WebCore/page/PageSerializer.cpp
M Source/WebCore/page/PerformanceMonitor.cpp
M Source/WebCore/page/PointerCaptureController.cpp
M Source/WebCore/page/SettingsBase.cpp
M Source/WebCore/page/mac/PageMac.mm
M Source/WebCore/page/mac/ServicesOverlayController.mm
M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
M Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
M Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm
M Source/WebCore/plugins/PluginInfoProvider.cpp
M Source/WebCore/rendering/RenderLayerCompositor.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/svg/graphics/SVGImage.cpp
M Source/WebCore/testing/InternalSettings.cpp
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/workers/service/ServiceWorkerContainer.cpp
M Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp
M Source/WebCore/workers/shared/context/SharedWorkerThreadProxy.cpp
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
M Source/WebKit/WebProcess/Geolocation/WebGeolocationManager.cpp
M Source/WebKit/WebProcess/Inspector/WebInspectorInternal.cpp
M Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp
M Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
M Source/WebKit/WebProcess/Network/WebSocketChannel.cpp
M Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebResourceLoadObserver.cpp
M Source/WebKit/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm
M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
M Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp
M Source/WebKit/WebProcess/WebPage/WebFrame.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm

  Log Message:
  ---
  Replace most dynamicDowncast casting of main frames with more 
user friendly accessors
rdar://141842378
https://bugs.webkit.org

[webkit-changes] [WebKit/WebKit] b96ecd: Declarative Web Push: Move the window context Push...

2024-12-19 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b96ecd4d82e2ac0f15580a7a1ea7e54b653d3867
  
https://github.com/WebKit/WebKit/commit/b96ecd4d82e2ac0f15580a7a1ea7e54b653d3867
  Author: Brady Eidson 
  Date:   2024-12-19 (Thu, 19 Dec 2024)

  Changed paths:
M 
LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Headers.cmake
R Source/WebCore/Modules/push-api/NavigatorPush.idl
M Source/WebCore/Modules/push-api/PushStrategy.h
A Source/WebCore/Modules/push-api/WindowPush.idl
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/bindings/js/WebCoreBuiltinNames.h
M Source/WebCore/page/DOMWindow.cpp
M Source/WebCore/page/DOMWindow.h
M Source/WebCore/page/DOMWindow.idl
M Source/WebCore/page/LocalDOMWindow.cpp
M Source/WebCore/page/LocalDOMWindow.h
M Source/WebCore/page/Navigator.cpp
M Source/WebCore/page/Navigator.h
M Source/WebCore/page/Navigator.idl
M Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  ---
  Declarative Web Push: Move the window context PushManager from Navigator to 
DOMWindow
rdar://141786288
https://bugs.webkit.org/show_bug.cgi?id=284980

Reviewed by Chris Dumez.

Since our initial implementation, standards work has moved this from 
window.navigator directly onto window.

* 
LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Modules/push-api/PushStrategy.h:
* Source/WebCore/Modules/push-api/WindowPush.idl: Renamed from 
Source/WebCore/Modules/push-api/NavigatorPush.idl.
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/WebCoreBuiltinNames.h:
* Source/WebCore/page/DOMWindow.cpp:
* Source/WebCore/page/DOMWindow.h:
* Source/WebCore/page/DOMWindow.idl:
* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::m_pushManager):
(WebCore::LocalDOMWindow::pushManager):
(WebCore::toScope):
(WebCore::LocalDOMWindow::subscribeToPushService):
(WebCore::LocalDOMWindow::unsubscribeFromPushService):
(WebCore::LocalDOMWindow::getPushSubscription):
(WebCore::LocalDOMWindow::getPushPermissionState):
(WebCore::ContextDestructionObserver): Deleted.
* Source/WebCore/page/LocalDOMWindow.h:
* Source/WebCore/page/Navigator.cpp:
(WebCore::Navigator::Navigator):
(WebCore::Navigator::pushManager): Deleted.
(WebCore::toScope): Deleted.
(WebCore::Navigator::subscribeToPushService): Deleted.
(WebCore::Navigator::unsubscribeFromPushService): Deleted.
(WebCore::Navigator::getPushSubscription): Deleted.
(WebCore::Navigator::getPushPermissionState): Deleted.
* Source/WebCore/page/Navigator.h:
* Source/WebCore/page/Navigator.idl:
* Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::windowSubscribeToPushService):
(WebKit::WebPlatformStrategies::windowUnsubscribeFromPushService):
(WebKit::WebPlatformStrategies::windowGetPushSubscription):
(WebKit::WebPlatformStrategies::windowGetPushPermissionState):
(WebKit::WebPlatformStrategies::navigatorSubscribeToPushService): Deleted.
(WebKit::WebPlatformStrategies::navigatorUnsubscribeFromPushService): Deleted.
(WebKit::WebPlatformStrategies::navigatorGetPushSubscription): Deleted.
(WebKit::WebPlatformStrategies::navigatorGetPushPermissionState): Deleted.
* Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::subscribe):
(TestWebKitAPI::getPushSubscription):

Canonical link: https://commits.webkit.org/288144@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 95f773: Autogenerate process sync'ing of DocumentClass

2024-12-19 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 95f7734a07a0eabb2f95d4670af371838e37b17d
  
https://github.com/WebKit/WebKit/commit/95f7734a07a0eabb2f95d4670af371838e37b17d
  Author: Brady Eidson 
  Date:   2024-12-19 (Thu, 19 Dec 2024)

  Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/Scripts/generate-process-sync-data.py
M Source/WebCore/Scripts/tests/DocumentSyncData.cpp
M Source/WebCore/Scripts/tests/DocumentSyncData.h
M Source/WebCore/Scripts/tests/ProcessSyncClient.cpp
M Source/WebCore/Scripts/tests/ProcessSyncClient.h
M Source/WebCore/Scripts/tests/ProcessSyncData.h
M Source/WebCore/Scripts/tests/ProcessSyncData.serialization.in
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/cssjit/SelectorCompiler.cpp
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
A Source/WebCore/dom/DocumentClasses.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/page/ProcessSyncData.in
M Source/WebCore/svg/SVGElement.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  ---
  Autogenerate process sync'ing of DocumentClass
rdar://141713881
https://bugs.webkit.org/show_bug.cgi?id=284909

Reviewed by Alex Christensen.

This is necessary for answering other topDocument questions in the future,
but can directly be used today to answer "is top document an SVG document".

* Source/WebCore/Scripts/generate-process-sync-data.py:
(generate_process_sync_data_header):
(main):
* Source/WebCore/Scripts/tests/DocumentSyncData.cpp:
(WebCore::DocumentSyncData::update):
(WebCore::DocumentSyncData::DocumentSyncData):
* Source/WebCore/Scripts/tests/DocumentSyncData.h:
* Source/WebCore/Scripts/tests/ProcessSyncClient.cpp:
(WebCore::ProcessSyncClient::broadcastMainFrameURLChangeToOtherProcesses):
(WebCore::ProcessSyncClient::broadcastUserDidInteractWithPageToOtherProcesses):
* Source/WebCore/Scripts/tests/ProcessSyncClient.h:
* Source/WebCore/Scripts/tests/ProcessSyncData.h:
* Source/WebCore/Scripts/tests/ProcessSyncData.serialization.in:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::testIsHTMLClassOnDocument):
* Source/WebCore/dom/Document.cpp:
(WebCore::m_syncData):
(WebCore::Document::populateDocumentSyncDataForNewlyConstructedDocument):
* Source/WebCore/dom/Document.h:
* Source/WebCore/dom/DocumentClasses.h: Added.
* Source/WebCore/page/Page.cpp:
(WebCore::Page::topDocumentHasDocumentClass const):
(WebCore::Page::updateProcessSyncData):
* Source/WebCore/page/Page.h:
* Source/WebCore/page/ProcessSyncData.in:
* Source/WebCore/svg/SVGElement.cpp:
(WebCore::SVGElement::title const):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/288092@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 7b4f80: Generate "top document URL" and "top document secu...

2024-12-18 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7b4f80884df1954b0fb7c58d2543d5cc4b038fef
  
https://github.com/WebKit/WebKit/commit/7b4f80884df1954b0fb7c58d2543d5cc4b038fef
  Author: Brady Eidson 
  Date:   2024-12-18 (Wed, 18 Dec 2024)

  Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/page/LocalFrame.cpp
M Source/WebCore/page/LocalFrame.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/page/ProcessSyncData.in
M Source/WebKit/WebProcess/WebPage/WebPage.cpp

  Log Message:
  ---
  Generate "top document URL" and "top document security origin" synchronization
rdar://141635748
https://bugs.webkit.org/show_bug.cgi?id=284839

Reviewed by Alex Christensen.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::topOrigin const):
(WebCore::Document::setURL):
(WebCore::Document::securityOriginDidChange):
* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::documentURLOrOriginDidChange):
(WebCore::LocalFrame::documentURLDidChange): Deleted.
* Source/WebCore/page/LocalFrame.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setMainFrame):
(WebCore::Page::setMainFrameURLAndOrigin):
(WebCore::Page::updateProcessSyncData):
(WebCore::Page::updateTopDocumentSyncData):
(WebCore::Page::mainFrameURL const):
(WebCore::Page::mainFrameOrigin const):
(WebCore::Page::setSessionID):
(WebCore::Page::setMainFrameURL): Deleted.
* Source/WebCore/page/Page.h:
(WebCore::Page::mainFrameURL const): Deleted.
* Source/WebCore/page/ProcessSyncData.in:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAnimationController):

Canonical link: https://commits.webkit.org/288038@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] f6a878: on Make DocumentSyncData RefCounted, and have Page...

2024-12-17 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f6a87862c44de5e1ce311bb7064af66428b40d48
  
https://github.com/WebKit/WebKit/commit/f6a87862c44de5e1ce311bb7064af66428b40d48
  Author: Brady Eidson 
  Date:   2024-12-17 (Tue, 17 Dec 2024)

  Changed paths:
M Source/WebCore/Scripts/generate-process-sync-data.py
M Source/WebCore/Scripts/tests/DocumentSyncData.cpp
M Source/WebCore/Scripts/tests/DocumentSyncData.h
M Source/WebCore/Scripts/tests/ProcessSyncClient.cpp
M Source/WebCore/Scripts/tests/ProcessSyncClient.h
M Source/WebCore/Scripts/tests/ProcessSyncData.h
M Source/WebCore/Scripts/tests/ProcessSyncData.serialization.in
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in

  Log Message:
  ---
  on Make DocumentSyncData RefCounted, and have Page objects reference the main 
document copy
rdar://141587316
https://bugs.webkit.org/show_bug.cgi?id=284792

Reviewed by Alex Christensen.

This page makes DocumentSyncData RefCounted, and Documents always ref() their 
own copy.

Pages used to clear out their `m_topDocumentSyncData` member whenever the main 
document changed.
Now - whenever the main document changes - the Page will ref() its copy instead.

This easily propagates existing data from the new top document into the Pages 
concept of that data.

It also allows us to broadcast the entire DocumentSyncData to all other 
processes at the point in
time that the main document changes.

* Source/WebCore/Scripts/generate-process-sync-data.py:
(generate_process_sync_client_impl):
(generate_process_sync_data_header):
(generate_document_synched_data_header):
(generate_document_synched_data_impl):
(generate_process_sync_data_serialiation_in):
(generate_process_sync_data_serialiation_in.WebCore):
(sort_data_lists):
(sort_datas_for_variant_order):
(sort_datas_for_document_sync_data_order):
(main):
* Source/WebCore/Scripts/tests/DocumentSyncData.cpp:
(WebCore::DocumentSyncData::update):
(WebCore::DocumentSyncData::DocumentSyncData):
* Source/WebCore/Scripts/tests/DocumentSyncData.h:
(WebCore::DocumentSyncData::create):
* Source/WebCore/Scripts/tests/ProcessSyncClient.cpp:
(WebCore::ProcessSyncClient::broadcastAudioSessionTypeToOtherProcesses):
(WebCore::ProcessSyncClient::broadcastMainFrameURLChangeToOtherProcesses):
(WebCore::ProcessSyncClient::broadcastUserDidInteractWithPageToOtherProcesses):
(WebCore::ProcessSyncClient::broadcastIsAutofocusProcessedToOtherProcesses):
* Source/WebCore/Scripts/tests/ProcessSyncClient.h:
(WebCore::ProcessSyncClient::broadcastTopDocumentSyncDataToOtherProcesses):
* Source/WebCore/Scripts/tests/ProcessSyncData.h:
* Source/WebCore/Scripts/tests/ProcessSyncData.serialization.in:
* Source/WebCore/dom/Document.cpp:
(WebCore::m_syncData):
(WebCore::m_frameIdentifier): Deleted.
* Source/WebCore/dom/Document.h:
(WebCore::Document::syncData):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::updateTopDocumentSyncData):
(WebCore::Page::hasLocalMainFrame):
(WebCore::Page::didChangeMainDocument):
* Source/WebCore/page/Page.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::broadcastTopDocumentSyncData):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp:
(WebKit::WebProcessSyncClient::broadcastTopDocumentSyncDataToOtherProcesses):
* Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::processSyncDataChangedInAnotherProcess):
(WebKit::WebPage::topDocumentSyncDataChangedInAnotherProcess):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

Canonical link: https://commits.webkit.org/287960@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 17a846: Replace LocalFrame::hasHadUserInteraction() with D...

2024-12-13 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 17a84631900e9432c83d9bfd956965210ffb8299
  
https://github.com/WebKit/WebKit/commit/17a84631900e9432c83d9bfd956965210ffb8299
  Author: Brady Eidson 
  Date:   2024-12-13 (Fri, 13 Dec 2024)

  Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/UserGestureIndicator.cpp
M Source/WebCore/page/LocalDOMWindow.cpp
M Source/WebCore/page/LocalFrame.h

  Log Message:
  ---
  Replace LocalFrame::hasHadUserInteraction() with 
Document::hasHadUserInteraction()
rdar://141466008
https://bugs.webkit.org/show_bug.cgi?id=284673

Reviewed by Alex Christensen.

Every place that checked this flag on LocalFrame could've checked it on that 
Frame's Document instead.

I think it's possible all of these checks can be folded into a single data 
member of the top document sync data,
but removing the LocalFrame copy is a standalone step in that direction.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::isNavigationBlockedByThirdPartyIFrameRedirectBlocking):
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::focus):
* Source/WebCore/dom/UserGestureIndicator.cpp:
* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::LocalDOMWindow::focus):
* Source/WebCore/page/LocalFrame.h:

Canonical link: https://commits.webkit.org/287829@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] a0ddf2: Add a manual test to verify the output of generate...

2024-12-13 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a0ddf2f9d9624db2d2674f4621100dc4ca5395f1
  
https://github.com/WebKit/WebKit/commit/a0ddf2f9d9624db2d2674f4621100dc4ca5395f1
  Author: Brady Eidson 
  Date:   2024-12-13 (Fri, 13 Dec 2024)

  Changed paths:
A Source/WebCore/Scripts/tests/DocumentSyncData.cpp
A Source/WebCore/Scripts/tests/DocumentSyncData.h
A Source/WebCore/Scripts/tests/Makefile
A Source/WebCore/Scripts/tests/ProcessSyncClient.cpp
A Source/WebCore/Scripts/tests/ProcessSyncClient.h
A Source/WebCore/Scripts/tests/ProcessSyncData.h
A Source/WebCore/Scripts/tests/ProcessSyncData.serialization.in
A Source/WebCore/Scripts/tests/TestProcessSyncData.in

  Log Message:
  ---
  Add a manual test to verify the output of generate-process-sync-data.py
rdar://141462263
https://bugs.webkit.org/show_bug.cgi?id=284667

Reviewed by Alex Christensen.

Whenever you change generate-process-sync-data.py, `cd` into this tests 
directory and run `make`.
Then scrutinize the changes to the generated files against what you expect.

* Source/WebCore/Scripts/tests/DocumentSyncData.cpp: Added.
(WebCore::DocumentSyncData::update):
* Source/WebCore/Scripts/tests/DocumentSyncData.h: Added.
* Source/WebCore/Scripts/tests/Makefile: Added.
* Source/WebCore/Scripts/tests/ProcessSyncClient.cpp: Added.
(WebCore::ProcessSyncClient::broadcastAudioSessionTypeToOtherProcesses):
(WebCore::ProcessSyncClient::broadcastMainFrameURLChangeToOtherProcesses):
(WebCore::ProcessSyncClient::broadcastUserDidInteractWithPageToOtherProcesses):
(WebCore::ProcessSyncClient::broadcastIsAutofocusProcessedToOtherProcesses):
* Source/WebCore/Scripts/tests/ProcessSyncClient.h: Added.
(WebCore::ProcessSyncClient::broadcastProcessSyncDataToOtherProcesses):
* Source/WebCore/Scripts/tests/ProcessSyncData.h: Added.
* Source/WebCore/Scripts/tests/ProcessSyncData.serialization.in: Added.
* Source/WebCore/Scripts/tests/TestProcessSyncData.in: Added.

Canonical link: https://commits.webkit.org/287821@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] f8feef: Autogenerate syncing of `IsAutofocusProcessed` and...

2024-12-13 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f8feef1a83396879cc2755f94cb25c2871fd0a27
  
https://github.com/WebKit/WebKit/commit/f8feef1a83396879cc2755f94cb25c2871fd0a27
  Author: Brady Eidson 
  Date:   2024-12-13 (Fri, 13 Dec 2024)

  Changed paths:
M Source/WebCore/Scripts/generate-process-sync-data.py
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/UserGestureIndicator.cpp
M Source/WebCore/html/HTMLDialogElement.cpp
M Source/WebCore/html/HTMLElement.cpp
M Source/WebCore/loader/FrameLoader.cpp
M Source/WebCore/page/EventHandler.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/page/ProcessSyncData.in

  Log Message:
  ---
  Autogenerate syncing of `IsAutofocusProcessed` and `UserDidInteractWithPage` 
data
rdar://141378639
https://bugs.webkit.org/show_bug.cgi?id=284573

Reviewed by Alex Christensen.

Adding these two types at the same time exposed the next issue that needed to 
be solved
in the generator script - having multiple copies of the same type in the 
variant.

We handle this by:
1 - Switching from direct initialization of the variant to using emplace() with 
an index
2 - Switching from std::get to std::get<(integer index>)
3 - Giving explicit integer values to the `enum class` member that aligns with 
the type's index

* Source/WebCore/Scripts/generate-process-sync-data.py:
(SyncedData.__init__):
(generate_process_sync_client_header):
(generate_process_sync_client_impl):
(generate_process_sync_data_header):
(generate_document_synched_data_header):
(generate_document_synched_data_impl):
(generate_process_sync_data_serialiation_in):
(sort_datas_for_variant_order):
(main):
(sorted_qualified_types): Deleted.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::noteUserInteractionWithMediaElement):
(WebCore::Document::flushAutofocusCandidates):
* Source/WebCore/dom/Document.h:
(WebCore::Document::isAutofocusProcessed const): Deleted.
(WebCore::Document::setAutofocusProcessed): Deleted.
(WebCore::Document::setUserDidInteractWithPage): Deleted.
(WebCore::Document::userDidInteractWithPage const): Deleted.
* Source/WebCore/dom/Element.cpp:
(WebCore::shouldAutofocus):
* Source/WebCore/dom/UserGestureIndicator.cpp:
* Source/WebCore/html/HTMLDialogElement.cpp:
(WebCore::HTMLDialogElement::runFocusingSteps):
* Source/WebCore/html/HTMLElement.cpp:
(WebCore::runPopoverFocusingSteps):
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::shouldAskForNavigationConfirmation):
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::keyEvent):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setUserDidInteractWithPage):
(WebCore::Page::userDidInteractWithPage const):
(WebCore::Page::setAutofocusProcessed):
(WebCore::Page::autofocusProcessed const):
(WebCore::Page::updateProcessSyncData):
* Source/WebCore/page/Page.h:
* Source/WebCore/page/ProcessSyncData.in:

Canonical link: https://commits.webkit.org/287820@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 8a50c3: Remove overzealous and incorrect RELEASE_ASSERT ca...

2024-12-12 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a50c3abc000b01aa466d5fec758b46a7adaf27e
  
https://github.com/WebKit/WebKit/commit/8a50c3abc000b01aa466d5fec758b46a7adaf27e
  Author: Brady Eidson 
  Date:   2024-12-12 (Thu, 12 Dec 2024)

  Changed paths:
M Source/WebKit/webpushd/WebPushDaemon.mm

  Log Message:
  ---
  Remove overzealous and incorrect RELEASE_ASSERT causing API test issues
https://bugs.webkit.org/show_bug.cgi?id=284383
rdar://141230069

Unreviewed.

This was added in 287485@main in error.

* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::showNotification):

Canonical link: https://commits.webkit.org/287786@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 3c6899: Add `DocumentSyncData` to process sync data machin...

2024-12-11 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3c6899ca1a461716192c9dd3c2c0f7ce012c8f88
  
https://github.com/WebKit/WebKit/commit/3c6899ca1a461716192c9dd3c2c0f7ce012c8f88
  Author: Brady Eidson 
  Date:   2024-12-11 (Wed, 11 Dec 2024)

  Changed paths:
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Headers.cmake
M Source/WebCore/Modules/audiosession/DOMAudioSession.cpp
M Source/WebCore/Scripts/generate-process-sync-data.py
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/dom/Document.h
M Source/WebCore/page/LocalFrame.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/page/ProcessSyncData.in
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  ---
  Add `DocumentSyncData` to process sync data machinery, and make first use of 
it for audio session
rdar://141294171
https://bugs.webkit.org/show_bug.cgi?id=284474

Reviewed by Alex Christensen.

This patch adds a `DocumentSyncData` object - to be stored on Page - that is a 
stand-in for all
data that used to be stored on the topDocument().

It adds capabilities to generate-process-sync-data.py to enable:
- Data types to opt-in to being part of "DocumentSyncData"
- Data types to have a compile-time conditional
- Data types to specify their associated required header instead of throwing it 
into a global set

Most of the magic is in the generated code, as evidence by how little of the 
hand written code
had to change to support this.

* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Modules/audiosession/DOMAudioSession.cpp:
(WebCore::DOMAudioSession::setType):
(WebCore::DOMAudioSession::type const):
* Source/WebCore/Scripts/generate-process-sync-data.py:
(SyncedData.__init__):
(sorted_headers_from_datas):
(parse_process_sync_data):
(generate_process_sync_client_header):
(generate_process_sync_client_impl):
(sorted_qualified_types):
(generate_process_sync_data_header):
(generate_document_synched_data_header):
(generate_document_synched_data_impl):
(generate_process_sync_data_serialiation_in):
(main):
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/Document.h:
(WebCore::Document::setAudioSessionType): Deleted.
(WebCore::Document::audioSessionType const): Deleted.
* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::documentURLDidChange):
* Source/WebCore/page/Page.cpp:
(WebCore::m_documentSyncData):
(WebCore::Page::setMainFrameURLInternal):
(WebCore::Page::setMainFrameURL):
(WebCore::Page::setAudioSessionType):
(WebCore::Page::audioSessionType const):
(WebCore::Page::updateProcessSyncData):
(WebCore::m_activeNowPlayingSessionUpdateTimer): Deleted.
* Source/WebCore/page/Page.h:
* Source/WebCore/page/ProcessSyncData.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/287717@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] a78694: Adopt standards renames for declarative web push, ...

2024-12-10 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a786946331264a29f40aca673a1953d573fa60d7
  
https://github.com/WebKit/WebKit/commit/a786946331264a29f40aca673a1953d573fa60d7
  Author: Brady Eidson 
  Date:   2024-12-10 (Tue, 10 Dec 2024)

  Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Modules/notifications/Notification.cpp
M Source/WebCore/Modules/notifications/Notification.h
M Source/WebCore/Modules/notifications/Notification.idl
M Source/WebCore/Modules/notifications/NotificationData.cpp
M Source/WebCore/Modules/notifications/NotificationData.h
M Source/WebCore/Modules/notifications/NotificationDataCocoa.mm
M Source/WebCore/Modules/notifications/NotificationOptions.idl
M Source/WebCore/Modules/notifications/NotificationPayload.cpp
M Source/WebCore/Modules/push-api/PushEvent.cpp
M Source/WebCore/Modules/push-api/PushEvent.h
M Source/WebCore/Modules/push-api/PushEvent.idl
R Source/WebCore/Modules/push-api/PushNotificationEvent.cpp
R Source/WebCore/Modules/push-api/PushNotificationEvent.h
R Source/WebCore/Modules/push-api/PushNotificationEvent.idl
R Source/WebCore/Modules/push-api/PushNotificationEventInit.h
R Source/WebCore/Modules/push-api/PushNotificationEventInit.idl
M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/bindings/js/WebCoreBuiltinNames.h
M Source/WebCore/dom/EventInterfaces.in
M Source/WebCore/page/WorkerNavigator.cpp
M Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp
M Source/WebCore/workers/service/ServiceWorkerGlobalScope.h
M Source/WebCore/workers/service/ServiceWorkerRegistration.cpp
M Source/WebCore/workers/service/context/ServiceWorkerThread.cpp
M Source/WebCore/workers/service/context/ServiceWorkerThread.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  ---
  Adopt standards renames for declarative web push, and enable it
rdar://141082392
https://bugs.webkit.org/show_bug.cgi?id=284214

Reviewed by Per Arne Vollan.

Recent edits to the standards PRs have renamed a property, and moved some 
properties from
a new type of push event object onto the existing PushEvent.

Adopt those changes and enable.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Modules/notifications/Notification.cpp:
(WebCore::Notification::create):
(WebCore::Notification::Notification):
(WebCore::Notification::data const):
* Source/WebCore/Modules/notifications/Notification.h:
* Source/WebCore/Modules/notifications/Notification.idl:
* Source/WebCore/Modules/notifications/NotificationData.cpp:
(WebCore::NotificationData::isolatedCopy const):
(WebCore::NotificationData::isolatedCopy):
* Source/WebCore/Modules/notifications/NotificationData.h:
* Source/WebCore/Modules/notifications/NotificationDataCocoa.mm:
(WebCore::NotificationData::dictionaryRepresentation const):
* Source/WebCore/Modules/notifications/NotificationOptions.idl:
* Source/WebCore/Modules/notifications/NotificationPayload.cpp:
(WebCore::NotificationPayload::fromNotificationData):
(WebCore::NotificationPayload::toNotificationData const):
* Source/WebCore/Modules/push-api/PushEvent.cpp:
(WebCore::PushEvent::create):
(WebCore::PushEvent::PushEvent):
(WebCore::PushEvent::notification):
(WebCore::PushEvent::appBadge):
(WebCore::PushEvent::updatedNotificationData const):
* Source/WebCore/Modules/push-api/PushEvent.h:
* Source/WebCore/Modules/push-api/PushEvent.idl:
* Source/WebCore/Modules/push-api/PushNotificationEvent.cpp: Removed.
* Source/WebCore/Modules/push-api/PushNotificationEvent.h: Removed.
* Source/WebCore/Modules/push-api/PushNotificationEvent.idl: Removed.
* Source/WebCore/Modules/push-api/PushNotificationEventInit.h: Removed.
* Source/WebCore/Modules/push-api/PushNotificationEventInit.idl: Removed.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/WebCoreBuiltinNames.h:
* Source/WebCore/dom/EventInterfaces.in:
* Source/WebCore/page/WorkerNavigator.cpp:
(WebCore::WorkerNavigator::setAppBadge):
* Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::dispatchPushEvent):
(WebCore::ServiceWorkerGlobalScope

[webkit-changes] [WebKit/WebKit] 6ee754: Update Safer CPP Exceptions for JSPushEvent.cpp

2024-12-08 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6ee754d6b183f24531494fa90a37ecd280d1739d
  
https://github.com/WebKit/WebKit/commit/6ee754d6b183f24531494fa90a37ecd280d1739d
  Author: Brady Eidson 
  Date:   2024-12-08 (Sun, 08 Dec 2024)

  Changed paths:
M Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations

  Log Message:
  ---
  Update Safer CPP Exceptions for JSPushEvent.cpp
rdar://141134322
https://bugs.webkit.org/show_bug.cgi?id=284267

Unreviewed.

287525@main unveiled a SaferCPP violation that derived sources is liable to 
make.
Add it to the expectations.

* Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations:

Canonical link: https://commits.webkit.org/287536@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 79bda7: Adopt standards renames for declarative web push, ...

2024-12-08 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 79bda7ce145cbd5c2e4b786e82920e9e587a37cd
  
https://github.com/WebKit/WebKit/commit/79bda7ce145cbd5c2e4b786e82920e9e587a37cd
  Author: Brady Eidson 
  Date:   2024-12-08 (Sun, 08 Dec 2024)

  Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Modules/notifications/Notification.cpp
M Source/WebCore/Modules/notifications/Notification.h
M Source/WebCore/Modules/notifications/Notification.idl
M Source/WebCore/Modules/notifications/NotificationData.cpp
M Source/WebCore/Modules/notifications/NotificationData.h
M Source/WebCore/Modules/notifications/NotificationDataCocoa.mm
M Source/WebCore/Modules/notifications/NotificationOptions.idl
M Source/WebCore/Modules/notifications/NotificationPayload.cpp
M Source/WebCore/Modules/push-api/PushEvent.cpp
M Source/WebCore/Modules/push-api/PushEvent.h
M Source/WebCore/Modules/push-api/PushEvent.idl
R Source/WebCore/Modules/push-api/PushNotificationEvent.cpp
R Source/WebCore/Modules/push-api/PushNotificationEvent.h
R Source/WebCore/Modules/push-api/PushNotificationEvent.idl
R Source/WebCore/Modules/push-api/PushNotificationEventInit.h
R Source/WebCore/Modules/push-api/PushNotificationEventInit.idl
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/bindings/js/WebCoreBuiltinNames.h
M Source/WebCore/dom/EventInterfaces.in
M Source/WebCore/page/WorkerNavigator.cpp
M Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp
M Source/WebCore/workers/service/ServiceWorkerGlobalScope.h
M Source/WebCore/workers/service/ServiceWorkerRegistration.cpp
M Source/WebCore/workers/service/context/ServiceWorkerThread.cpp
M Source/WebCore/workers/service/context/ServiceWorkerThread.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  ---
  Adopt standards renames for declarative web push, and enable it
rdar://141082392
https://bugs.webkit.org/show_bug.cgi?id=284214

Reviewed by Per Arne Vollan.

Recent edits to the standards PRs have renamed a property, and moved some 
properties from
a new type of push event object onto the existing PushEvent.

Adopt those changes and enable.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Modules/notifications/Notification.cpp:
(WebCore::Notification::create):
(WebCore::Notification::Notification):
(WebCore::Notification::data const):
* Source/WebCore/Modules/notifications/Notification.h:
* Source/WebCore/Modules/notifications/Notification.idl:
* Source/WebCore/Modules/notifications/NotificationData.cpp:
(WebCore::NotificationData::isolatedCopy const):
(WebCore::NotificationData::isolatedCopy):
* Source/WebCore/Modules/notifications/NotificationData.h:
* Source/WebCore/Modules/notifications/NotificationDataCocoa.mm:
(WebCore::NotificationData::dictionaryRepresentation const):
* Source/WebCore/Modules/notifications/NotificationOptions.idl:
* Source/WebCore/Modules/notifications/NotificationPayload.cpp:
(WebCore::NotificationPayload::fromNotificationData):
(WebCore::NotificationPayload::toNotificationData const):
* Source/WebCore/Modules/push-api/PushEvent.cpp:
(WebCore::PushEvent::create):
(WebCore::PushEvent::PushEvent):
(WebCore::PushEvent::notification):
(WebCore::PushEvent::appBadge):
(WebCore::PushEvent::updatedNotificationData const):
* Source/WebCore/Modules/push-api/PushEvent.h:
* Source/WebCore/Modules/push-api/PushEvent.idl:
* Source/WebCore/Modules/push-api/PushNotificationEvent.cpp: Removed.
* Source/WebCore/Modules/push-api/PushNotificationEvent.h: Removed.
* Source/WebCore/Modules/push-api/PushNotificationEvent.idl: Removed.
* Source/WebCore/Modules/push-api/PushNotificationEventInit.h: Removed.
* Source/WebCore/Modules/push-api/PushNotificationEventInit.idl: Removed.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/WebCoreBuiltinNames.h:
* Source/WebCore/dom/EventInterfaces.in:
* Source/WebCore/page/WorkerNavigator.cpp:
(WebCore::WorkerNavigator::setAppBadge):
* Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::dispatchPushEvent):
(WebCore::ServiceWorkerGlobalScope::dispatchDeclarativePushEvent):
(WebCore::ServiceWorkerGlobalScope::clearDeclarativePushEvent):
(WebCore::ServiceWorkerGlobalScope

[webkit-changes] [WebKit/WebKit] 986e05: Update Declarative Web Push to some recent standar...

2024-12-06 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 986e05d99d9e6bde8dd22bb035a815564994ce2b
  
https://github.com/WebKit/WebKit/commit/986e05d99d9e6bde8dd22bb035a815564994ce2b
  Author: Brady Eidson 
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
M 
LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/Modules/notifications/NotificationJSONParser.cpp
M Source/WebCore/Modules/notifications/NotificationJSONParser.h
M Source/WebCore/Modules/notifications/NotificationPayload.cpp
M Source/WebCore/Modules/notifications/NotificationPayload.h
M Source/WebKit/webpushd/WebPushDaemon.h
M Source/WebKit/webpushd/WebPushDaemon.mm
M Tools/DumpRenderTree/mac/DumpRenderTree.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  ---
  Update Declarative Web Push to some recent standards changes
rdar://114886376
https://bugs.webkit.org/show_bug.cgi?id=284094

Reviewed by Ben Nham.

This patch:
- Detects as a declarative push message via the new special JSON key/value
- Shows the notification automatically when possible
- Enables it (retaining the switch to disable)

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Modules/notifications/NotificationJSONParser.cpp:
(WebCore::hasDeclarativeMessageJSONValues):
(WebCore::NotificationJSONParser::hasDeclarativeMessageHeader):
(WebCore::NotificationJSONParser::parseNotificationPayload):
(WebCore::NotificationJSONParser::parseNotificationOptions):
(WebCore::dirKey): Deleted.
(WebCore::langKey): Deleted.
(WebCore::bodyKey): Deleted.
(WebCore::tagKey): Deleted.
(WebCore::iconKey): Deleted.
(WebCore::dataKey): Deleted.
(WebCore::silentKey): Deleted.
(WebCore::defaultActionURLKey): Deleted.
(WebCore::titleKey): Deleted.
(WebCore::appBadgeKey): Deleted.
(WebCore::mutableKey): Deleted.
* Source/WebCore/Modules/notifications/NotificationJSONParser.h:
* Source/WebCore/Modules/notifications/NotificationPayload.cpp:
(WebCore::NotificationPayload::hasDeclarativeMessageHeader):
(WebCore::NotificationPayload::toNotificationData const):
* Source/WebCore/Modules/notifications/NotificationPayload.h:
* Source/WebKit/webpushd/WebPushDaemon.h:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::platformDefaultActionBundleIdentifier):
(WebPushD::WebPushDaemon::injectPushMessageForTesting):
(WebPushD::supportsBuiltinNotifications):
(WebPushD::WebPushDaemon::handleIncomingPushImpl):
(WebPushD::WebPushDaemon::showNotification):

* Tools/DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::(WebPushD, DeclarativeWebPushHandling)):
* 
LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:

Canonical link: https://commits.webkit.org/287485@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ab6372: (Re-landing) Generate "process synched data" code

2024-11-19 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ab6372b0d30b82ae1ab311320dbf549ef2787adc
  
https://github.com/WebKit/WebKit/commit/ab6372b0d30b82ae1ab311320dbf549ef2787adc
  Author: Brady Eidson 
  Date:   2024-11-19 (Tue, 19 Nov 2024)

  Changed paths:
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Headers.cmake
A Source/WebCore/Scripts/generate-process-sync-data.py
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
R Source/WebCore/page/ProcessSyncClient.h
A Source/WebCore/page/ProcessSyncData.in
M Source/WebKit/CMakeLists.txt
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in

  Log Message:
  ---
  (Re-landing) Generate "process synched data" code
rdar://139974832
https://bugs.webkit.org/show_bug.cgi?id=283178

Reviewed by Charlie Wolfe.

With site isolation, there's a lot of bits of data that are generated in one 
WebContent process that
other WebContent processes need to be aware of.

We'd started down a somewhat slow road of writing messages for each case, ad 
hoc.
Keeping with that approach seems undesirable.

This patch adds a new `ProcessSyncData.in` file where you declare a property 
that needs to be synced.
It also adds a script that processes that file.

The script generates `ProcessSyncClient` with one method per data to broadcast 
the change.
It also generates `ProcessSyncData` code to wrap the data type being broadcast 
as well as generate its
serializers for message passing.

To add a new synced data type is now as simple as:
1 - Adding an entry for it in `ProcessSyncData.in`
2 - Make a one line call to the new `ProcessSyncClient` method where the data 
change is generated
3 - Handle the new switch case in `Page::updateProcessSyncData` to receive the 
data change broadcast

I fully expect this mechanism will grow to become much more flexible (e.g. 
targeting specific frames)
but for now most of the complexity was getting all of the scripts and build 
system stuff figured out;
Future expansion of the mechanism should be much easier.

The behavior change of moving "MainFrameURLChange" over to this new mechanism 
is covered by an API test:
SiteIsolation.MainFrameURLAfterFragmentNavigation

* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Headers.cmake:

* Source/WebCore/Scripts/generate-process-sync-data.py: Added.
(SyncedData):
(SyncedData.__init__):
(parse_process_sync_data):
(generate_process_sync_client_header):
(generate_process_sync_client_impl):
(sorted_qualified_types):
(generate_process_sync_data_header):
(generate_process_sync_data_header.ProcessSyncDataType):
(generate_process_sync_data_serialiation_in):
(generate_process_sync_data_serialiation_in.WebCore):
(main):

* Source/WebCore/Sources.txt:

* Source/WebCore/page/Page.cpp:
(WebCore::Page::updateProcessSyncData):
* Source/WebCore/page/Page.h:

* Source/WebCore/page/ProcessSyncClient.h: Removed.
* Source/WebCore/page/ProcessSyncData.in: Added.

* Source/WebKit/CMakeLists.txt:
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::broadcastProcessSyncData):
(WebKit::WebPageProxy::broadcastMainFrameURLChangeToOtherProcesses): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:

* Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp:
(WebKit::WebProcessSyncClient::broadcastProcessSyncDataToOtherProcesses):
(WebKit::WebProcessSyncClient::broadcastMainFrameURLChangeToOtherProcesses): 
Deleted.
* Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.h:

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::processSyncDataChangedInAnotherProcess):
(WebKit::WebPage::mainFrameURLChangedInAnotherProcess): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

Canonical link: https://commits.webkit.org/286821@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit

[webkit-changes] [WebKit/WebKit] 3490e9: Add new safer CPP expectation noticed in PR 36833

2024-11-19 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3490e9efa4034a387e16443e75d63043a0736500
  
https://github.com/WebKit/WebKit/commit/3490e9efa4034a387e16443e75d63043a0736500
  Author: Brady Eidson 
  Date:   2024-11-19 (Tue, 19 Nov 2024)

  Changed paths:
M Source/WebCore/SaferCPPExpectations/NoUncountedMemberCheckerExpectations

  Log Message:
  ---
  Add new safer CPP expectation noticed in PR 36833
rdar://140232113
https://bugs.webkit.org/show_bug.cgi?id=283382

Unreviewed (suggested by Ryosuke Niwa and Brianna Fan)

PR 36833 did not touch this file, yet the bot flagged it.
It's being looked in to, but update expectations for now.

* Source/WebCore/SaferCPPExpectations/NoUncountedMemberCheckerExpectations:

Canonical link: https://commits.webkit.org/286823@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 376f4e: Generate "process synched data" code

2024-11-15 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 376f4eaf9750f0df5b0f91ab0dad9e81fe217c37
  
https://github.com/WebKit/WebKit/commit/376f4eaf9750f0df5b0f91ab0dad9e81fe217c37
  Author: Brady Eidson 
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Headers.cmake
A Source/WebCore/Scripts/generate-process-sync-data.py
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
R Source/WebCore/page/ProcessSyncClient.h
A Source/WebCore/page/ProcessSyncData.in
M Source/WebKit/CMakeLists.txt
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in

  Log Message:
  ---
  Generate "process synched data" code
https://bugs.webkit.org/show_bug.cgi?id=283178


Reviewed by Charlie Wolfe.

With site isolation, there's a lot of bits of data that are generated in one 
WebContent process that
other WebContent processes need to be aware of.

We'd started down a somewhat slow road of writing messages for each case, ad 
hoc.
Keeping with that approach seems undesirable.

This patch adds a new `ProcessSyncData.in` file where you declare a property 
that needs to be synced.
It also adds a script that processes that file.

The script generates `ProcessSyncClient` with one method per data to broadcast 
the change.
It also generates `ProcessSyncData` code to wrap the data type being broadcast 
as well as generate its
serializers for message passing.

To add a new synced data type is now as simple as:
1 - Adding an entry for it in `ProcessSyncData.in`
2 - Make a one line call to the new `ProcessSyncClient` method where the data 
change is generated
3 - Handle the new switch case in `Page::updateProcessSyncData` to receive the 
data change broadcast

I fully expect this mechanism will grow to become much more flexible (e.g. 
targeting specific frames)
but for now most of the complexity was getting all of the scripts and build 
system stuff figured out;
Future expansion of the mechanism should be much easier.

The behavior change of moving "MainFrameURLChange" over to this new mechanism 
is covered by an API test:
SiteIsolation.MainFrameURLAfterFragmentNavigation

* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:

* Source/WebCore/Scripts/generate-process-sync-data.py: Added.
(SyncedData):
(SyncedData.__init__):
(parse_process_sync_data):
(generate_process_sync_client_header):
(generate_process_sync_client_impl):
(sorted_qualified_types):
(generate_process_sync_data_header):
(generate_process_sync_data_header.ProcessSyncDataType):
(generate_process_sync_data_serialiation_in):
(generate_process_sync_data_serialiation_in.WebCore):
(main):

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:

* Source/WebCore/page/Page.cpp:
(WebCore::Page::updateProcessSyncData):
* Source/WebCore/page/Page.h:

* Source/WebCore/page/ProcessSyncClient.h: Removed.

* Source/WebCore/page/ProcessSyncData.in: Added.

* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::broadcastProcessSyncData):
(WebKit::WebPageProxy::broadcastMainFrameURLChangeToOtherProcesses): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:

* Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp:
(WebKit::WebProcessSyncClient::broadcastProcessSyncDataToOtherProcesses):
(WebKit::WebProcessSyncClient::broadcastMainFrameURLChangeToOtherProcesses): 
Deleted.
* Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.h:

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::processSyncDataChangedInAnotherProcess):
(WebKit::WebPage::mainFrameURLChangedInAnotherProcess): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

Canonical link: https://commits.webkit.org/286671@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webki

[webkit-changes] [WebKit/WebKit] 1b6a2d: Introduce ProcessSyncClient, and move broadcastMai...

2024-11-06 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1b6a2d49b73b499f03bfd3270d7d55d6e78999cc
  
https://github.com/WebKit/WebKit/commit/1b6a2d49b73b499f03bfd3270d7d55d6e78999cc
  Author: Brady Eidson 
  Date:   2024-11-06 (Wed, 06 Nov 2024)

  Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/loader/EmptyClients.cpp
M Source/WebCore/loader/EmptyFrameLoaderClient.h
M Source/WebCore/loader/LocalFrameLoaderClient.h
M Source/WebCore/page/LocalFrame.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/page/PageConfiguration.cpp
M Source/WebCore/page/PageConfiguration.h
A Source/WebCore/page/ProcessSyncClient.h
M Source/WebKit/Sources.txt
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.h
A Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp
A Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
M Source/WebKitLegacy/mac/WebView/WebView.mm

  Log Message:
  ---
  Introduce ProcessSyncClient, and move 
broadcastMainFrameURLChangeToOtherProcesses to it
rdar://139370028
https://bugs.webkit.org/show_bug.cgi?id=282700

Reviewed by Alex Christensen.

With site isolation, there will be many fields of data set by one process that 
need to be broadcast to all processes.

The existing, ad-hoc one-off "mainFrameURLChange" was the first of these. It 
won't be the last.

We need a better mechanism to handle synchronizing all this data.
And that mechanism is the ProcessSyncClient that is added to Page.

For now, I move the main frame URL broadcast away from FrameLoaderClient to 
ProcessSyncClient.
In the next patch, I autogenerate the relevant code.
Then after that, I'll start adding more properties that need to be broadcast.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:

* Source/WebCore/loader/EmptyClients.cpp:
(WebCore::pageConfigurationWithEmptyClients):
(WebCore::EmptyFrameLoaderClient::broadcastMainFrameURLChangeToOtherProcesses): 
Deleted.
* Source/WebCore/loader/EmptyFrameLoaderClient.h:

* Source/WebCore/loader/LocalFrameLoaderClient.h:

* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::documentURLDidChange):

* Source/WebCore/page/Page.cpp:
(WebCore::Page::Page):
* Source/WebCore/page/Page.h:
(WebCore::Page::processSyncClient):
(WebCore::Page::processSyncClient const):

* Source/WebCore/page/PageConfiguration.cpp:
(WebCore::PageConfiguration::PageConfiguration):
* Source/WebCore/page/PageConfiguration.h:

* Source/WebCore/page/ProcessSyncClient.h: Added.
(WebCore::ProcessSyncClient::broadcastMainFrameURLChangeToOtherProcesses):

* Source/WebKit/Sources.txt:

* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::broadcastMainFrameURLChangeToOtherProcesses):
 Deleted.
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.h:

* Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.cpp: Added.
(WebKit::WebProcessSyncClient::WebProcessSyncClient):
(WebKit::WebProcessSyncClient::protectedPage const):
(WebKit::WebProcessSyncClient::siteIsolationEnabled):
(WebKit::WebProcessSyncClient::broadcastMainFrameURLChangeToOtherProcesses):
* Source/WebKit/WebProcess/WebCoreSupport/WebProcessSyncClient.h: Added.

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAnimationController):

* Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient::updateOpener):

* Source/WebKitLegacy/mac/WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Canonical link: https://commits.webkit.org/286247@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 39df9e: Replace a lot of topDocument() use with a new Docu...

2024-11-05 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 39df9e7d63a0fe38d02421f27e815e4a20d99f6a
  
https://github.com/WebKit/WebKit/commit/39df9e7d63a0fe38d02421f27e815e4a20d99f6a
  Author: Brady Eidson 
  Date:   2024-11-05 (Tue, 05 Nov 2024)

  Changed paths:
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/page/Quirks.cpp

  Log Message:
  ---
  Replace a lot of topDocument() use with a new Document::topURL() function
rdar://139246039
https://bugs.webkit.org/show_bug.cgi?id=282579

Reviewed by Alex Christensen.

Quirks code relentlessly accessed topDocument() just to get the main frame URL,
which we already have broadcast to each web process for other reasons.

This patch adds a Document::topURL() accessor which grabs the correct URL 
depending
on the situation.

* Source/WebCore/dom/Document.cpp:
(WebCore::Document::topURL const):
* Source/WebCore/dom/Document.h:

* Source/WebCore/page/Quirks.cpp:
(WebCore::isYahooMail):
(WebCore::Quirks::isDomain const):
(WebCore::Quirks::needsFormControlToBeMouseFocusable const):
(WebCore::Quirks::isTouchBarUpdateSuppressedForHiddenContentEditable const):
(WebCore::Quirks::isNeverRichlyEditableForTouchBar const):
(WebCore::Quirks::shouldSuppressAutocorrectionAndAutocapitalizationInHiddenEditableAreas
 const):
(WebCore::Quirks::shouldDisableWritingSuggestionsByDefault const):
(WebCore::Quirks::isAmazon const):
(WebCore::Quirks::isGoogleMaps const):
(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
(WebCore::Quirks::shouldPreventDispatchOfTouchEvent const):
(WebCore::Quirks::shouldAvoidResizingWhenInputViewBoundsChange const):
(WebCore::Quirks::needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand 
const):
(WebCore::Quirks::shouldBypassBackForwardCache const):
(WebCore::Quirks::shouldBypassAsyncScriptDeferring const):
(WebCore::Quirks::requestStorageAccessAndHandleClick const):
(WebCore::Quirks::requiresUserGestureToPauseInPictureInPicture const):
(WebCore::Quirks::shouldDisableEndFullscreenEventWhenEnteringPictureInPictureFromFullscreenQuirk
 const):
(WebCore::Quirks::allowLayeredFullscreenVideos const):
(WebCore::Quirks::shouldPreventOrientationMediaQueryFromEvaluatingToLandscape 
const):
(WebCore::Quirks::shouldFlipScreenDimensions const):
(WebCore::Quirks::shouldIgnoreTextAutoSizing const):
(WebCore::Quirks::scriptToEvaluateBeforeRunningScriptFromURL):
(WebCore::Quirks::shouldHideCoarsePointerCharacteristics const):
(WebCore::Quirks::implicitMuteWhenVolumeSetToZero const):

Canonical link: https://commits.webkit.org/286200@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] e5382e: Remove uses of "topDocument.hidden()"

2024-11-01 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e5382ecf2d30dd3a847b3a2497ffa48c6541ca60
  
https://github.com/WebKit/WebKit/commit/e5382ecf2d30dd3a847b3a2497ffa48c6541ca60
  Author: Brady Eidson 
  Date:   2024-11-01 (Fri, 01 Nov 2024)

  Changed paths:
M Source/WebCore/Modules/mediasession/MediaSession.cpp
M Source/WebCore/Modules/mediastream/MediaDevices.cpp
M Source/WebCore/dom/Document.cpp

  Log Message:
  ---
  Remove uses of "topDocument.hidden()"
rdar://139089701
https://bugs.webkit.org/show_bug.cgi?id=282457

Reviewed by Tim Nguyen.

With extremely limited exceptions, "hidden()" is a page-wide concept, and 
therefore
shared between the current Document and the topDocument.

For the use cases that grab topDocument first, it's irrelevant to do so.

* Source/WebCore/Modules/mediasession/MediaSession.cpp:
(WebCore::MediaSession::updateCaptureState):
* Source/WebCore/Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::getDisplayMedia):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::voiceActivityDetected):

Canonical link: https://commits.webkit.org/286038@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 4d56d8: Add some metrics to WKFrameInfo when snapshotting ...

2024-10-30 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4d56d8b6c952bb803a2cd30e2589a5777b6e5e4a
  
https://github.com/WebKit/WebKit/commit/4d56d8b6c952bb803a2cd30e2589a5777b6e5e4a
  Author: Brady Eidson 
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
M Source/WebKit/CMakeLists.txt
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Shared/FrameInfoData.h
M Source/WebKit/Shared/FrameInfoData.serialization.in
A Source/WebKit/Shared/WebFrameMetrics.h
A Source/WebKit/Shared/WebFrameMetrics.serialization.in
M Source/WebKit/UIProcess/API/APIFrameInfo.h
M Source/WebKit/UIProcess/API/Cocoa/WKFrameInfo.mm
M Source/WebKit/UIProcess/API/Cocoa/WKFrameInfoPrivate.h
M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

  Log Message:
  ---
  Add some metrics to WKFrameInfo when snapshotting the frame tree for client 
use
rdar://116842131
https://bugs.webkit.org/show_bug.cgi?id=282334

Reviewed by Alex Christensen.

Clients that used to walk WKBundleFrames to get this information can now grab a 
snapshot of the frame tree
from the UI process and use the metrics there.

* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/FrameInfoData.h:
* Source/WebKit/Shared/FrameInfoData.serialization.in:
* Source/WebKit/Shared/WebFrameMetrics.h: Copied from 
Source/WebKit/Shared/FrameInfoData.h.
* Source/WebKit/Shared/WebFrameMetrics.serialization.in: Copied from 
Source/WebKit/Shared/FrameInfoData.serialization.in.
* Source/WebKit/UIProcess/API/APIFrameInfo.h:
* Source/WebKit/UIProcess/API/Cocoa/WKFrameInfo.mm:
(-[WKFrameInfo _isScrollable]):
(-[WKFrameInfo _contentSize]):
(-[WKFrameInfo _visibleContentSize]):
(-[WKFrameInfo _visibleContentSizeExcludingScrollbars]):
* Source/WebKit/UIProcess/API/Cocoa/WKFrameInfoPrivate.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::info const):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, FrameMetrics)):

Canonical link: https://commits.webkit.org/285927@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 8f9f5a: Expand webpushd connection SPI to enable regressio...

2024-09-11 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8f9f5a32d4cee9eceba7c5fe2bb6ffda454b329d
  
https://github.com/WebKit/WebKit/commit/8f9f5a32d4cee9eceba7c5fe2bb6ffda454b329d
  Author: Brady Eidson 
  Date:   2024-09-11 (Wed, 11 Sep 2024)

  Changed paths:
M Source/WebCore/Modules/notifications/Notification.cpp
M Source/WebCore/Modules/notifications/NotificationData.h
M Source/WebCore/Modules/notifications/NotificationDataCocoa.mm
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/API/APIWebPushDaemonConnection.cpp
M Source/WebKit/UIProcess/API/APIWebPushDaemonConnection.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKNotificationData.h
M Source/WebKit/UIProcess/API/Cocoa/_WKNotificationData.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKNotificationDataInternal.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebPushDaemonConnection.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebPushDaemonConnection.mm
M Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp
M Source/WebKit/webpushd/WebPushDaemon.mm
M Tools/MiniBrowser/mac/AppDelegate.m
M Tools/TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  ---
  Expand webpushd connection SPI to enable regression testing of notifications
rdar://135722662
https://bugs.webkit.org/show_bug.cgi?id=279447

Reviewed by Sihui Liu.

Also includes a drive-by fix of tag processing in webpushd, which was easy to 
test
because of this change!

* Source/WebCore/Modules/notifications/NotificationData.h:

* Source/WebKit/UIProcess/API/APIWebPushDaemonConnection.cpp:
(API::WebPushDaemonConnection::showNotification):
(API::WebPushDaemonConnection::getNotifications):
(API::WebPushDaemonConnection::cancelNotification):
* Source/WebKit/UIProcess/API/APIWebPushDaemonConnection.h:

* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

* Source/WebKit/UIProcess/API/Cocoa/_WKNotificationData.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKNotificationData.mm:
(-[_WKNotificationData _init]):
(-[_WKNotificationData _initWithCoreData:]):
(-[_WKNotificationData _getCoreData]):
(-[_WKNotificationData setTitle:]):
(-[_WKNotificationData title]):
(-[_WKNotificationData setDir:]):
(-[_WKNotificationData dir]):
(-[_WKNotificationData setLang:]):
(-[_WKNotificationData lang]):
(-[_WKNotificationData setBody:]):
(-[_WKNotificationData body]):
(-[_WKNotificationData setTag:]):
(-[_WKNotificationData tag]):
(-[_WKNotificationData setAlert:]):
(-[_WKNotificationData alert]):
(-[_WKNotificationData setData:]):
(-[_WKNotificationData data]):
(-[_WKNotificationData origin]):
(-[_WKNotificationData setSecurityOrigin:]):
(-[_WKNotificationData securityOrigin]):
(-[_WKNotificationData setServiceWorkerRegistrationURL:]):
(-[_WKNotificationData serviceWorkerRegistrationURL]):
(-[_WKNotificationData identifier]):
(-[_WKNotificationData setUuid:]):
(-[_WKNotificationData uuid]):
(-[_WKNotificationData userInfo]):
(-[_WKNotificationData dealloc]):
(-[_WKMutableNotificationData init]):
(-[_WKNotificationData initWithCoreData:dataStore:]): Deleted.
(-[_WKNotificationData dictionaryRepresentation]): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/_WKNotificationDataInternal.h:

* Source/WebKit/UIProcess/API/Cocoa/_WKWebPushDaemonConnection.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebPushDaemonConnection.mm:
(-[_WKWebPushDaemonConnection showNotification:completionHandler:]):
(-[_WKWebPushDaemonConnection getNotifications:tag:completionHandler:]):
(-[_WKWebPushDaemonConnection cancelNotification:uuid:]):

* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::getNotifications):

* Tools/MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate createBrowserWindowController:]): Unfortunately, because 
Obj-C is
  what it is, and `tag` is a common selector, do gnarly Obj-C tricks here.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::(WebPushD, WKWebPushDaemonConnectionPushNotifications)):
(TestWebKitAPI::(WebPushD, WKWebPushDaemonConnectionPushSubscription)): Deleted.

Canonical link: https://commits.webkit.org/283493@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 23ffad: Take a background task when handling web push actions

2024-09-03 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 23ffada2529984583b48f7ca35b837c426df7d8b
  
https://github.com/WebKit/WebKit/commit/23ffada2529984583b48f7ca35b837c426df7d8b
  Author: Brady Eidson 
  Date:   2024-09-03 (Tue, 03 Sep 2024)

  Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.mm

  Log Message:
  ---
  Take a background task when handling web push actions
rdar://135201512
https://bugs.webkit.org/show_bug.cgi?id=279067

Reviewed by Ben Nham.

Client apps should not have to worry about this; WebKit can manage it.

* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _handleNextPushMessageWithCompletionHandler:]):
(-[WKWebsiteDataStore _handleWebPushAction:]):
(-[WKWebsiteDataStore _handleNextPushMessage]): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.mm:
(+[_WKWebPushAction _webPushActionWithNotificationResponse:]):
(-[_WKWebPushAction _nameForBackgroundTaskAndLogging]):
(-[_WKWebPushAction beginBackgroundTaskForHandling]):

Canonical link: https://commits.webkit.org/283129@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] c22b64: Use notification center delegate events to drive c...

2024-08-30 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c22b64a0bc64c82042e780557fde3f38bbefb04e
  
https://github.com/WebKit/WebKit/commit/c22b64a0bc64c82042e780557fde3f38bbefb04e
  Author: Brady Eidson 
  Date:   2024-08-30 (Fri, 30 Aug 2024)

  Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h

  Log Message:
  ---
  Use notification center delegate events to drive close and click events
rdar://134990333
https://bugs.webkit.org/show_bug.cgi?id=278897

Reviewed by Ben Nham.

Relying on the other mechanism for this required more work than is possible at 
this time.

This patch adds:
- SPI for clients to pass in UNNotificationResponse objects to be handled
- Changes the default notification center delegate to use that SPI for 
automatic handling
  in cases where the client doesn't have their own notification center delegate

* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStoreNotificationCenterDelegate 
userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:]):
(+[WKWebsiteDataStore handleNotificationResponse:]):
(-[_WKWebsiteDataStoreBSActionHandler handleNotificationResponse:]):
(-[_WKWebsiteDataStoreBSActionHandler 
_respondToApplicationActions:fromTransitionContext:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:

Canonical link: https://commits.webkit.org/283013@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6f82e5: TestWebKitAPI.WebPushDBuiltInTest.ImplicitSilentPu...

2024-08-30 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6f82e5b91c8b0bbdcaeccaaec881493739d21839
  
https://github.com/WebKit/WebKit/commit/6f82e5b91c8b0bbdcaeccaaec881493739d21839
  Author: Brady Eidson 
  Date:   2024-08-30 (Fri, 30 Aug 2024)

  Changed paths:
M Source/WebKit/webpushd/_WKMockUserNotificationCenter.h
M Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm

  Log Message:
  ---
  
TestWebKitAPI.WebPushDBuiltInTest.ImplicitSilentPushTimerCancelledOnShowingNotification
 is a constant failure (due to webpushd crash)
https://bugs.webkit.org/show_bug.cgi?id=278931
rdar://134969476

Reviewed by Sihui Liu.

`webpushd` started using a new UNUserNotifcationCenter API that our 
_WKMockUserNotificationCenter object didn't implement.
Therefore it crashed due to a missing selector.
Stub it out to fix up the test.

* Source/WebKit/webpushd/_WKMockUserNotificationCenter.h:
* Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm:
(-[_WKMockUserNotificationCenter setNotificationCategories:]):

Canonical link: https://commits.webkit.org/282994@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] adf781: Fix issue with notificationclick/close at launch

2024-08-29 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: adf7818ea55a6164521bdb3cce8b5bf38c43c1f2
  
https://github.com/WebKit/WebKit/commit/adf7818ea55a6164521bdb3cce8b5bf38c43c1f2
  Author: Brady Eidson 
  Date:   2024-08-29 (Thu, 29 Aug 2024)

  Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm

  Log Message:
  ---
  Fix issue with notificationclick/close at launch
rdar://134953334
https://bugs.webkit.org/show_bug.cgi?id=278873

Reviewed by Ben Nham.

There needs to be *a* UNUserNotificationCenter delegate installed to get 
notification related events at launch,
even if it does nothing.
So let's install one.

* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStoreNotificationCenterDelegate 
userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:]):
(+[WKWebsiteDataStore _setWebPushActionHandler:]):

Canonical link: https://commits.webkit.org/282919@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 135df2: Revamp handling of notificationclick and notificat...

2024-08-28 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 135df2fc81755218135e1a49886e6efe74a30a99
  
https://github.com/WebKit/WebKit/commit/135df2fc81755218135e1a49886e6efe74a30a99
  Author: Brady Eidson 
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
M Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h
M Source/WebKit/Platform/spi/ios/BaseBoardSPI.h
M Source/WebKit/Platform/spi/ios/UIKitSPI.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.mm
A Source/WebKit/UIProcess/API/Cocoa/_WKWebPushActionInternal.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/webpushd/WebPushDaemon.mm

  Log Message:
  ---
  Revamp handling of notificationclick and notificationclose
rdar://131365403
https://bugs.webkit.org/show_bug.cgi?id=278825

Reviewed by Ben Nham.

This reworks some logic in webpushd and in the WebKit UIProcess to properly
capture and route "notificationclick" and "notificationclose" events for
clients using built-in notifications.

* Source/WebKit/Platform/spi/ios/BaseBoardSPI.h:
* Source/WebKit/Platform/spi/ios/UIKitSPI.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore 
_processWebCorePersistentNotificationClick:completionHandler:]):
(-[WKWebsiteDataStore _processPersistentNotificationClick:completionHandler:]):
(-[WKWebsiteDataStore 
_processWebCorePersistentNotificationClose:completionHandler:]):
(-[WKWebsiteDataStore _processPersistentNotificationClose:completionHandler:]):
(+[WKWebsiteDataStore _setWebPushActionHandler:]):
(-[WKWebsiteDataStore _handleNextPushMessage]):
(-[WKWebsiteDataStore _handleWebPushAction:]):
(-[_WKWebsiteDataStoreBSActionHandler 
_respondToApplicationActions:fromTransitionContext:]):
* Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.mm:
(+[_WKWebPushAction _webPushActionWithNotificationResponse:]):
* Source/WebKit/UIProcess/API/Cocoa/_WKWebPushActionInternal.h: Copied from 
Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.h.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::platformDefaultActionBundleIdentifier):
(WebPushD::WebPushDaemon::notifyClientPushMessageIsAvailable):
(WebPushD::WebPushDaemon::showNotification):

Canonical link: https://commits.webkit.org/282885@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] a984be: `webpushd` app launch improvements

2024-08-23 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a984be0fb37d9428c4bdfa7ca7d86755836a44e0
  
https://github.com/WebKit/WebKit/commit/a984be0fb37d9428c4bdfa7ca7d86755836a44e0
  Author: Brady Eidson 
  Date:   2024-08-23 (Fri, 23 Aug 2024)

  Changed paths:
M Source/WebCore/PAL/pal/spi/cocoa/WritingToolsSPI.h
M Source/WebKit/Configurations/WebKit.xcconfig
M Source/WebKit/Platform/spi/ios/BaseBoardSPI.h
M Source/WebKit/Platform/spi/ios/FrontBoardServicesSPI.h
M Source/WebKit/Platform/spi/ios/UIKitSPI.h
M Source/WebKit/Scripts/process-entitlements.sh
M Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h
M Source/WebKit/Shared/WebPushDaemonConstants.h
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h
A Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.h
A Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.mm
M Source/WebKit/UIProcess/Cocoa/CoreTelephonyUtilities.h
M Source/WebKit/UIProcess/Cocoa/PlatformWritingToolsUtilities.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/webpushd/WebPushDaemon.mm
M Tools/MobileMiniBrowser/MobileMiniBrowser/MobileMiniBrowser.entitlements
M Tools/MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.m
M Tools/MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m
M 
WebKitLibraries/SDKs/iphoneos17.0-additions.sdk/System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices.tbd
A 
WebKitLibraries/SDKs/iphoneos17.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd
M 
WebKitLibraries/SDKs/iphoneos18.0-additions.sdk/System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices.tbd
A 
WebKitLibraries/SDKs/iphoneos18.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd
M 
WebKitLibraries/SDKs/iphonesimulator17.0-additions.sdk/System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices.tbd
A 
WebKitLibraries/SDKs/iphonesimulator17.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd
M 
WebKitLibraries/SDKs/iphonesimulator18.0-additions.sdk/System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices.tbd
A 
WebKitLibraries/SDKs/iphonesimulator18.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd
A 
WebKitLibraries/SDKs/xros1.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd
A 
WebKitLibraries/SDKs/xrsimulator1.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd

  Log Message:
  ---
  `webpushd` app launch improvements
rdar://131365223
https://bugs.webkit.org/show_bug.cgi?id=278443

Reviewed by Ben Nham.

This allows for targeting app launch in a much more flexible way,
allowing for dictionary based communication with the launched app instead of 
URL based.

* Source/WebCore/PAL/pal/spi/cocoa/WritingToolsSPI.h:
* Source/WebKit/Configurations/WebKit.xcconfig:
* Source/WebKit/Platform/spi/ios/BaseBoardSPI.h:
* Source/WebKit/Platform/spi/ios/FrontBoardServicesSPI.h:
* Source/WebKit/Platform/spi/ios/UIKitSPI.h:
* Source/WebKit/Scripts/process-entitlements.sh:
* Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h:
* Source/WebKit/Shared/WebPushDaemonConstants.h:
(WebKit::WebPushD::pushActionVersionKey):
(WebKit::WebPushD::currentPushActionVersion):
(WebKit::WebPushD::pushActionPartitionKey):
(WebKit::WebPushD::pushActionTypeKey):
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore _setWebPushActionHandler:]):
(+[_WKWebsiteDataStoreBSActionHandler shared]):
(-[_WKWebsiteDataStoreBSActionHandler setWebPushActionHandler:]):
(-[_WKWebsiteDataStoreBSActionHandler 
_respondToApplicationActions:fromTransitionContext:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.h: Copied from 
Source/WebKit/Platform/spi/ios/BaseBoardSPI.h.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.mm: Copied from 
Source/WebKit/Platform/spi/ios/FrontBoardServicesSPI.h.
(+[_WKWebPushAction webPushActionWithDictionary:]):
* Source/WebKit/UIProcess/Cocoa/CoreTelephonyUtilities.h:
* Source/WebKit/UIProcess/Cocoa/PlatformWritingToolsUtilities.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::notifyClientPushMessageIsAvailable):
* Tools/MobileMiniBrowser/MobileMiniBrowser/MobileMiniBrowser.entitlements:
* Tools/MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.m:
(-[AppDelegate application:didFinishLaunchingWithOptions:]):
* Tools/MobileMiniBrowser

[webkit-changes] [WebKit/WebKit] 5f6455: `webpushd` app launch improvements

2024-08-21 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5f64555f4058965c0e6713df2d174e0e12217b97
  
https://github.com/WebKit/WebKit/commit/5f64555f4058965c0e6713df2d174e0e12217b97
  Author: Brady Eidson 
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
M Source/WebCore/PAL/pal/spi/cocoa/WritingToolsSPI.h
M Source/WebKit/Configurations/WebKit.xcconfig
M Source/WebKit/Platform/spi/ios/BaseBoardSPI.h
M Source/WebKit/Platform/spi/ios/FrontBoardServicesSPI.h
M Source/WebKit/Platform/spi/ios/UIKitSPI.h
M Source/WebKit/Scripts/process-entitlements.sh
M Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h
M Source/WebKit/Shared/WebPushDaemonConstants.h
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h
A Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.h
A Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.mm
M Source/WebKit/UIProcess/Cocoa/CoreTelephonyUtilities.h
M Source/WebKit/UIProcess/Cocoa/PlatformWritingToolsUtilities.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/webpushd/WebPushDaemon.mm
M Tools/MobileMiniBrowser/MobileMiniBrowser/MobileMiniBrowser.entitlements
M Tools/MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.m
M Tools/MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m
M 
WebKitLibraries/SDKs/iphoneos17.0-additions.sdk/System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices.tbd
A 
WebKitLibraries/SDKs/iphoneos17.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd
M 
WebKitLibraries/SDKs/iphoneos18.0-additions.sdk/System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices.tbd
A 
WebKitLibraries/SDKs/iphoneos18.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd
M 
WebKitLibraries/SDKs/iphonesimulator17.0-additions.sdk/System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices.tbd
A 
WebKitLibraries/SDKs/iphonesimulator17.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd
M 
WebKitLibraries/SDKs/iphonesimulator18.0-additions.sdk/System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices.tbd
A 
WebKitLibraries/SDKs/iphonesimulator18.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd
A 
WebKitLibraries/SDKs/xros1.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd
A 
WebKitLibraries/SDKs/xrsimulator1.0-additions.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices.tbd

  Log Message:
  ---
  `webpushd` app launch improvements
rdar://131365223
https://bugs.webkit.org/show_bug.cgi?id=278443

Reviewed by Ben Nham.

This allows for targeting app launch in a much more flexible way,
allowing for dictionary based communication with the launched app instead of 
URL based.

* Source/WebCore/PAL/pal/spi/cocoa/WritingToolsSPI.h:
* Source/WebKit/Configurations/WebKit.xcconfig:
* Source/WebKit/Platform/spi/ios/BaseBoardSPI.h:
* Source/WebKit/Platform/spi/ios/FrontBoardServicesSPI.h:
* Source/WebKit/Platform/spi/ios/UIKitSPI.h:
* Source/WebKit/Scripts/process-entitlements.sh:
* Source/WebKit/Shared/API/Cocoa/WebKitPrivate.h:
* Source/WebKit/Shared/WebPushDaemonConstants.h:
(WebKit::WebPushD::pushActionVersionKey):
(WebKit::WebPushD::currentPushActionVersion):
(WebKit::WebPushD::pushActionPartitionKey):
(WebKit::WebPushD::pushActionTypeKey):
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore _setWebPushActionHandler:]):
(+[_WKWebsiteDataStoreBSActionHandler shared]):
(-[_WKWebsiteDataStoreBSActionHandler setWebPushActionHandler:]):
(-[_WKWebsiteDataStoreBSActionHandler 
_respondToApplicationActions:fromTransitionContext:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.h: Copied from 
Source/WebKit/Platform/spi/ios/BaseBoardSPI.h.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebPushAction.mm: Copied from 
Source/WebKit/Platform/spi/ios/FrontBoardServicesSPI.h.
(+[_WKWebPushAction webPushActionWithDictionary:]):
* Source/WebKit/UIProcess/Cocoa/CoreTelephonyUtilities.h:
* Source/WebKit/UIProcess/Cocoa/PlatformWritingToolsUtilities.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::notifyClientPushMessageIsAvailable):
* Tools/MobileMiniBrowser/MobileMiniBrowser/MobileMiniBrowser.entitlements:
* Tools/MobileMiniBrowser/MobileMiniBrowserFramework/AppDelegate.m:
(-[AppDelegate application:didFinishLaunchingWithOptions:]):
* Tools/MobileMiniBrowser

[webkit-changes] [WebKit/WebKit] 443327: Handle setAppBadge in webpushd

2024-08-02 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4433278ba6e8807bab110a7ebf65b27e74351bc5
  
https://github.com/WebKit/WebKit/commit/4433278ba6e8807bab110a7ebf65b27e74351bc5
  Author: Brady Eidson 
  Date:   2024-08-02 (Fri, 02 Aug 2024)

  Changed paths:
M Source/WebKit/Configurations/WebKit.xcconfig
M Source/WebKit/NetworkProcess/NetworkProcess.cpp
M Source/WebKit/NetworkProcess/NetworkProcess.h
M Source/WebKit/NetworkProcess/NetworkProcess.messages.in
M Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp
M Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.h
M Source/WebKit/Platform/spi/ios/UIKitSPI.h
M 
Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.webpushd.sb.in
M Source/WebKit/Scripts/process-entitlements.sh
M Source/WebKit/Shared/Notifications/NotificationManagerMessageHandler.h
M 
Source/WebKit/Shared/Notifications/NotificationManagerMessageHandler.messages.in
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h
M Source/WebKit/UIProcess/Notifications/ServiceWorkerNotificationHandler.h
M 
Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h
M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
M Source/WebKit/WebProcess/WebProcess.cpp
M Source/WebKit/webpushd/PushClientConnection.h
M Source/WebKit/webpushd/PushClientConnection.messages.in
M Source/WebKit/webpushd/PushClientConnection.mm
M Source/WebKit/webpushd/WebPushDaemon.h
M Source/WebKit/webpushd/WebPushDaemon.mm
M Source/WebKit/webpushd/_WKMockUserNotificationCenter.h
M Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm
M Source/WebKit/webpushd/mac/com.apple.WebKit.webpushd.mac.sb.in
M Source/WebKit/webpushd/mac/com.apple.WebKit.webpushd.relocatable.mac.sb.in
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm
A 
WebKitLibraries/SDKs/iphoneos17.0-additions.sdk/System/Library/PrivateFrameworks/UIKitServices.framework/UIKitServices.tbd
A 
WebKitLibraries/SDKs/iphoneos18.0-additions.sdk/System/Library/PrivateFrameworks/UIKitServices.framework/UIKitServices.tbd
A 
WebKitLibraries/SDKs/iphonesimulator17.0-additions.sdk/System/Library/PrivateFrameworks/UIKitServices.framework/UIKitServices.tbd
A 
WebKitLibraries/SDKs/iphonesimulator18.0-additions.sdk/System/Library/PrivateFrameworks/UIKitServices.framework/UIKitServices.tbd

  Log Message:
  ---
  Handle setAppBadge in webpushd
rdar://131363431
https://bugs.webkit.org/show_bug.cgi?id=277526

Reviewed by Ben Nham.

A lot of message plumbing to get the "set app badge" logic into webpushd,
alongside other notifications-related bits.

* Source/WebKit/Configurations/WebKit.xcconfig:
* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::getAppBadgeForTesting):
* Source/WebKit/NetworkProcess/NetworkProcess.h:
* Source/WebKit/NetworkProcess/NetworkProcess.messages.in:

* Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp:
(WebKit::NetworkNotificationManager::setAppBadge):
(WebKit::NetworkNotificationManager::getAppBadgeForTesting):
* Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.h:

* Source/WebKit/Platform/spi/ios/UIKitSPI.h:
* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.webpushd.sb.in:
* Source/WebKit/Scripts/process-entitlements.sh:

* Source/WebKit/Shared/Notifications/NotificationManagerMessageHandler.h:
* 
Source/WebKit/Shared/Notifications/NotificationManagerMessageHandler.messages.in:

* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _getAppBadgeForTesting:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:

* Source/WebKit/UIProcess/Notifications/ServiceWorkerNotificationHandler.h:
* Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h:

* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::getAppBadgeForTesting):
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:

* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setAppBadge):

* Source/WebKit/webpushd/PushClientConnection.h:
* Source/WebKit/webpushd/PushClientConnection.messages.in:
* Source/WebKit/webpushd/PushClientConnection.mm:
(WebPushD::PushClientConnection::setAppBadge):
(WebPushD::PushClientConnection::getAppBadgeForTesting):

* Source/WebKit/webpushd/WebPushDaemon.h:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::setAppBadge):
(WebPushD::WebPushDaemon::getAppBadgeForTesting):

* Source/WebKit/webpushd/_WKMockUserNotificationCenter.h:
* Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm:
(centersByBundleIdentifier):
(-[_WKMockUserNotificationCenter _internalInitWithBundleIdentifier:]):
(-[_WKMockUserNotifica

[webkit-changes] [WebKit/WebKit] 0794e1: Handle Notification.close in webpushd

2024-07-26 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0794e187a8ecab72143d0a90c889977676da3f86
  
https://github.com/WebKit/WebKit/commit/0794e187a8ecab72143d0a90c889977676da3f86
  Author: Brady Eidson 
  Date:   2024-07-26 (Fri, 26 Jul 2024)

  Changed paths:
M Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp
M Source/WebKit/webpushd/PushClientConnection.h
M Source/WebKit/webpushd/PushClientConnection.messages.in
M Source/WebKit/webpushd/PushClientConnection.mm
M Source/WebKit/webpushd/WebPushDaemon.h
M Source/WebKit/webpushd/WebPushDaemon.mm
M Source/WebKit/webpushd/_WKMockUserNotificationCenter.h
M Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  ---
  Handle Notification.close in webpushd
rdar://131363011
https://bugs.webkit.org/show_bug.cgi?id=277171

Reviewed by Chris Dumez.

IPC message plumbing and a little new code inside webpushd itself.

* Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp:
(WebKit::NetworkNotificationManager::cancelNotification):
* Source/WebKit/webpushd/PushClientConnection.h:
* Source/WebKit/webpushd/PushClientConnection.messages.in:
* Source/WebKit/webpushd/PushClientConnection.mm:
(WebPushD::PushClientConnection::cancelNotification):
* Source/WebKit/webpushd/WebPushDaemon.h:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::cancelNotification):
* Source/WebKit/webpushd/_WKMockUserNotificationCenter.h:
* Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm:
(-[_WKMockUserNotificationCenter 
removePendingNotificationRequestsWithIdentifiers:]):
(-[_WKMockUserNotificationCenter removeDeliveredNotificationsWithIdentifiers:]):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

Canonical link: https://commits.webkit.org/281438@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b4acae: Add API tests for webpushd built-in notifications

2024-07-25 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b4acaee10c9773188f8386327a4bdeafc3eae994
  
https://github.com/WebKit/WebKit/commit/b4acaee10c9773188f8386327a4bdeafc3eae994
  Author: Brady Eidson 
  Date:   2024-07-25 (Thu, 25 Jul 2024)

  Changed paths:
M Source/WTF/wtf/PlatformHave.h
M Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/webpushd/PushClientConnection.h
M Source/WebKit/webpushd/PushClientConnection.messages.in
M Source/WebKit/webpushd/PushClientConnection.mm
M Source/WebKit/webpushd/WebPushDaemon.h
M Source/WebKit/webpushd/WebPushDaemon.mm
A Source/WebKit/webpushd/_WKMockUserNotificationCenter.h
A Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm
M Source/WebKit/webpushd/mac/com.apple.WebKit.webpushd.mac.sb.in
M Source/WebKit/webpushd/mac/com.apple.WebKit.webpushd.relocatable.mac.sb.in
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  ---
  Add API tests for webpushd built-in notifications
https://bugs.webkit.org/show_bug.cgi?id=277062

Reviewed by Ben Nham.

This adds a mock notification center to capture displayed notifications.
It then exercises push messages to get showNotification and getNotifications to 
use that mock center,
delivering the results back to JavaScript

* Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h:

* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

* Source/WebKit/webpushd/PushClientConnection.h:
* Source/WebKit/webpushd/PushClientConnection.messages.in:
* Source/WebKit/webpushd/PushClientConnection.mm:
(WebPushD::PushClientConnection::enableMockUserNotificationCenterForTesting):

* Source/WebKit/webpushd/WebPushDaemon.h:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::injectPushMessageForTesting):
(WebPushD::platformNotificationCenterBundleIdentifier):
(WebPushD::WebPushDaemon::enableMockUserNotificationCenterForTesting):
(WebPushD::WebPushDaemon::showNotification):
(WebPushD::WebPushDaemon::getNotifications):

* Source/WebKit/webpushd/_WKMockUserNotificationCenter.h: Copied from 
Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h.
* Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm: Added.
(notificationsByBundleIdentifier):
(-[_WKMockUserNotificationCenter initWithBundleIdentifier:]):
(-[_WKMockUserNotificationCenter 
addNotificationRequest:withCompletionHandler:]):
(-[_WKMockUserNotificationCenter 
getDeliveredNotificationsWithCompletionHandler:]):

* Source/WebKit/webpushd/mac/com.apple.WebKit.webpushd.mac.sb.in:
* Source/WebKit/webpushd/mac/com.apple.WebKit.webpushd.relocatable.mac.sb.in:

* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(-[PushNotificationDelegate init]):
(-[PushNotificationDelegate websiteDataStore:showNotification:]):

Canonical link: https://commits.webkit.org/281371@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 4ecdb7: Update UserNotificationsSPI.h for some older platf...

2024-07-23 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4ecdb77bc337d5f2841808f39f14605d22618368
  
https://github.com/WebKit/WebKit/commit/4ecdb77bc337d5f2841808f39f14605d22618368
  Author: Brady Eidson 
  Date:   2024-07-23 (Tue, 23 Jul 2024)

  Changed paths:
M Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h

  Log Message:
  ---
  Update UserNotificationsSPI.h for some older platforms
rdar://132343007
https://bugs.webkit.org/show_bug.cgi?id=276971

Reviewed by Elliott Williams.

* Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h: Explicitly include 
UNNotificationIcon.h

Canonical link: https://commits.webkit.org/281262@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b3fdb1: Update for availability of UNNotificationIcon

2024-07-22 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b3fdb12c06e823a79bec31a652e9ec99ec543f9c
  
https://github.com/WebKit/WebKit/commit/b3fdb12c06e823a79bec31a652e9ec99ec543f9c
  Author: Brady Eidson 
  Date:   2024-07-22 (Mon, 22 Jul 2024)

  Changed paths:
M Source/WTF/wtf/PlatformHave.h
M Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h
M Source/WebKit/webpushd/WebPushDaemon.mm

  Log Message:
  ---
  Update for availability of UNNotificationIcon
rdar://132253861
https://bugs.webkit.org/show_bug.cgi?id=276891

Reviewed by Ben Nham.

This usage was added in https://commits.webkit.org/281190@main, but needs to be 
limited to certain macOS versions.

* Source/WTF/wtf/PlatformHave.h:
* Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::showNotification):

Canonical link: https://commits.webkit.org/281213@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 9d08f2: Implement webpushd built-in showNotification and g...

2024-07-22 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9d08f2e924fa8aacf079af47286772d3498f61c0
  
https://github.com/WebKit/WebKit/commit/9d08f2e924fa8aacf079af47286772d3498f61c0
  Author: Brady Eidson 
  Date:   2024-07-22 (Mon, 22 Jul 2024)

  Changed paths:
M Source/WebCore/en.lproj/Localizable.strings
M Source/WebKit/Configurations/WebKit.xcconfig
M Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp
M Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.h
M Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp
M Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.h
M 
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in
A Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h
M Source/WebKit/Platform/spi/ios/UIKitSPI.h
M 
Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.webpushd.sb.in
M Source/WebKit/Scripts/process-entitlements.sh
M Source/WebKit/UIProcess/WebPreferences.cpp
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp
M Source/WebKit/webpushd/PushClientConnection.h
M Source/WebKit/webpushd/PushClientConnection.messages.in
M Source/WebKit/webpushd/PushClientConnection.mm
M Source/WebKit/webpushd/WebPushDaemon.h
M Source/WebKit/webpushd/WebPushDaemon.mm

  Log Message:
  ---
  Implement webpushd built-in showNotification and getNotifications
rdar://131362923
https://bugs.webkit.org/show_bug.cgi?id=276823

Reviewed by Andy Estes.

Instead of delegating out notifications-related things to more than one client 
app implementation,
we should have webpushd just do as much of it all as possible.

A big glaring "FIXME" removed in this patch shows this was long planned, which 
made this
easier to finally start as some of the pieces were in place.

iOS Web.app-only for now, with some FIXMEs pointing out some missing macOS 
details.

This is also without tests, for now, as we don't API test on iOS devices.
The next patch that adds macOS details for notifications will also add API 
tests.

* Source/WebCore/en.lproj/Localizable.strings:
* Source/WebKit/Configurations/WebKit.xcconfig:

* Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp:
(WebKit::NetworkNotificationManager::showNotification):
(WebKit::NetworkNotificationManager::getNotifications):
* Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.h:

* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::getNotifications):
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.h:
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:

* Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h: Added.
* Source/WebKit/Platform/spi/ios/UIKitSPI.h:

* Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.webpushd.sb.in:
* Source/WebKit/Scripts/process-entitlements.sh:

* Source/WebKit/UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::updateBoolValueForKey):

* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

* Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::getNotifications):

* Source/WebKit/webpushd/PushClientConnection.h:
* Source/WebKit/webpushd/PushClientConnection.messages.in:
* Source/WebKit/webpushd/PushClientConnection.mm:
(WebPushD::PushClientConnection::showNotification):
(WebPushD::PushClientConnection::getNotifications):
(WebPushD::PushClientConnection::associatedWebClipTitle const):

* Source/WebKit/webpushd/WebPushDaemon.h:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::platformShouldPlaySound):
(WebPushD::platformDefaultActionBundleIdentifier):
(WebPushD::platformNotificationCenterBundleIdentifier):
(WebPushD::platformNotificationSourceForDisplay):
(WebPushD::WebPushDaemon::showNotification):
(WebPushD::WebPushDaemon::getNotifications):

Canonical link: https://commits.webkit.org/281190@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] de1ee0: Update notifications build flags

2024-07-19 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: de1ee04a47f67865cdfb2b67c5a6bf6a64edc8e5
  
https://github.com/WebKit/WebKit/commit/de1ee04a47f67865cdfb2b67c5a6bf6a64edc8e5
  Author: Brady Eidson 
  Date:   2024-07-19 (Fri, 19 Jul 2024)

  Changed paths:
M Source/WTF/wtf/PlatformEnableCocoa.h

  Log Message:
  ---
  Update notifications build flags
rdar://132114891
https://bugs.webkit.org/show_bug.cgi?id=276838

Reviewed by Tim Horton.

* Source/WTF/wtf/PlatformEnableCocoa.h:

Canonical link: https://commits.webkit.org/281153@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 7a24c2: Rename BUILT_IN_NOTIFICATIONS compile time flag

2024-07-03 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7a24c271d23c644cdc17f585bdb455c7ec758861
  
https://github.com/WebKit/WebKit/commit/7a24c271d23c644cdc17f585bdb455c7ec758861
  Author: Brady Eidson 
  Date:   2024-07-03 (Wed, 03 Jul 2024)

  Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WTF/wtf/PlatformEnableCocoa.h
M Source/WebCore/page/DeprecatedGlobalSettings.h
M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
M Source/WebKit/NetworkProcess/NetworkProcess.cpp
M Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h
M 
Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.serialization.in
M Source/WebKit/NetworkProcess/NetworkSession.cpp
M Source/WebKit/NetworkProcess/NetworkSession.h
M 
Source/WebKit/NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm
M Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp
M Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.h
M Source/WebKit/NetworkProcess/Notifications/WebPushDaemonConnection.cpp
M Source/WebKit/NetworkProcess/Notifications/WebPushDaemonConnection.h
M Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp
M Source/WebKit/Platform/IPC/DaemonConnection.cpp
M Source/WebKit/Platform/IPC/cocoa/DaemonConnectionCocoa.mm
M Source/WebKit/PlatformMac.cmake
M Source/WebKit/Shared/API/Cocoa/WKMain.mm
M Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
M 
Source/WebKit/WebProcess/Notifications/NotificationPermissionRequestManager.cpp
M Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp
M Source/WebKit/webpushd/PushClientConnection.h
M Source/WebKit/webpushd/PushClientConnection.messages.in
M Source/WebKit/webpushd/PushClientConnection.mm
M Source/WebKit/webpushd/WebPushDaemon.h
M Source/WebKit/webpushd/WebPushDaemon.mm
M Source/WebKit/webpushd/WebPushDaemonMain.h
M Source/WebKit/webpushd/WebPushDaemonMain.mm
M Source/WebKit/webpushd/webpushtool/WebPushToolConnection.mm

  Log Message:
  ---
  Rename BUILT_IN_NOTIFICATIONS compile time flag
rdar://131052533
https://bugs.webkit.org/show_bug.cgi?id=276175

Reviewed by Ben Nham.

Some planned rearchitecting work for webpushd will need to reclaim this compile 
time flag.
Which is fine: The meaning of this flag already changed over time to basically 
mean "Web Push Notifications".

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebCore/page/DeprecatedGlobalSettings.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::setPushAndNotificationsEnabledForOrigin):
(WebKit::NetworkProcess::deletePushAndNotificationRegistration):
(WebKit::NetworkProcess::hasPushSubscriptionForTesting):
* Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h:
* 
Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.serialization.in:
* Source/WebKit/NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::NetworkSession):
* Source/WebKit/NetworkProcess/NetworkSession.h:
* 
Source/WebKit/NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm:
* Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.cpp:
* Source/WebKit/NetworkProcess/Notifications/NetworkNotificationManager.h:
* Source/WebKit/NetworkProcess/Notifications/WebPushDaemonConnection.cpp:
* Source/WebKit/NetworkProcess/Notifications/WebPushDaemonConnection.h:
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::resolveUnregistrationJobInClient):
(WebKit::WebSWServerConnection::subscribeToPushService):
(WebKit::WebSWServerConnection::unsubscribeFromPushService):
(WebKit::WebSWServerConnection::getPushSubscription):
(WebKit::WebSWServerConnection::getPushPermissionState):
* Source/WebKit/Platform/IPC/DaemonConnection.cpp:
* Source/WebKit/Platform/IPC/cocoa/DaemonConnectionCocoa.mm:
* Source/WebKit/Shared/API/Cocoa/WKMain.mm:
(WKWebPushDaemonMain):
(WKWebPushToolMain):
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):
* 
Source/WebKit/WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
* Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::sendMessage):
* Source/WebKit/webpushd/PushClientConnection.h:
* Source/WebKit/webpushd/PushClientConnection.messages.in:
* Source/WebKit/webpushd/PushClientConnection.mm:
* Sou

[webkit-changes] [WebKit/WebKit] fc9024: Perform a respondsToSelector: check before calling...

2024-06-25 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fc90249d745382d553eb9efec91e5074095b548d
  
https://github.com/WebKit/WebKit/commit/fc90249d745382d553eb9efec91e5074095b548d
  Author: Brady Eidson 
  Date:   2024-06-25 (Tue, 25 Jun 2024)

  Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKHTTPCookieStore.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm

  Log Message:
  ---
  Perform a respondsToSelector: check before calling optional cookie delegate 
method
rdar://130405395
https://bugs.webkit.org/show_bug.cgi?id=275875

Reviewed by Per Arne Vollan.

The WKHTTPCookieStoreObserver method `cookiesDidChangeInCookieStore:` is 
optional,
but WebKit always calls it on registered observers.

Let's do a `respondsToSelectorCheck:` first, instead.

* Source/WebKit/UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TEST(WKHTTPCookieStore, ObserveCookiesReceivedFromHTTP)):

Canonical link: https://commits.webkit.org/280357@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 927f3f: Fix a specific crash where a WebPageProxy outlives...

2024-06-18 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 927f3f7dfde6e87358894dd55b3a583f4964c36e
  
https://github.com/WebKit/WebKit/commit/927f3f7dfde6e87358894dd55b3a583f4964c36e
  Author: Brady Eidson 
  Date:   2024-06-18 (Tue, 18 Jun 2024)

  Changed paths:
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h

  Log Message:
  ---
  Fix a specific crash where a WebPageProxy outlives its PageClient
rdar://129558032
https://bugs.webkit.org/show_bug.cgi?id=275508

Reviewed by Youenn Fablet.

It's known that WebPageProxy objects can outlive their client view object 
(WKContentView or WebViewImpl)
And since the client view object owns the PageClient, WebPageProxy objects can 
exist without a PageClient.

The WebPageProxy::pageClient() accessor acknowledges this with a debug-only 
ASSERT.

The gamepad access hysteresis skips some of the other "close() or process 
crashed" cleanup that other
member objects perform, such as timers. So it's very possible that simply 
cancelling the hysteresis when
those events occur is good enough.

This patch does that, but also explicitly closes the hazard of assuming the 
PageClient is non-null.

I believe there's still a submarine risk of many other "protectedPageClient()" 
calls happening on a null
page client, driven by racey IPC timing. A followup will apply null checking 
more widely.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::optionalProtectedPageClient const):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::recentGamepadAccessStateChanged):
* Source/WebKit/UIProcess/WebPageProxy.h:

Canonical link: https://commits.webkit.org/280131@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 443a65: REGRESSION (273650@main): Back forward list doesn’...

2024-06-07 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 443a65a4c3a25485b3083c8a92f3be46e71102f2
  
https://github.com/WebKit/WebKit/commit/443a65a4c3a25485b3083c8a92f3be46e71102f2
  Author: Brady Eidson 
  Date:   2024-06-07 (Fri, 07 Jun 2024)

  Changed paths:
M LayoutTests/loader/stateobjects/pushstate-size-expected.txt
M LayoutTests/loader/stateobjects/pushstate-size-iframe-expected.txt
M LayoutTests/loader/stateobjects/pushstate-size-iframe.html
M LayoutTests/loader/stateobjects/pushstate-size.html
M LayoutTests/loader/stateobjects/resources/pushstate-iframe.html
M Source/WebCore/history/HistoryItem.cpp
M Source/WebCore/history/HistoryItem.h
M Source/WebCore/loader/FrameLoader.cpp
M Source/WebCore/loader/HistoryController.cpp
M Source/WebCore/loader/HistoryController.h
M Source/WebKit/Shared/WebBackForwardListItem.h
M Source/WebKit/UIProcess/API/C/WKBackForwardListItemRef.cpp
M Source/WebKit/UIProcess/API/C/WKBackForwardListItemRef.h
M Source/WebKit/UIProcess/API/Cocoa/WKBackForwardListItem.h
M Source/WebKit/UIProcess/API/Cocoa/WKBackForwardListItem.mm
M Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp
M Source/WebKitLegacy/mac/History/HistoryPropertyList.mm
M Source/WebKitLegacy/mac/History/WebHistory.mm
M Source/WebKitLegacy/mac/History/WebHistoryItem.mm
M Source/WebKitLegacy/mac/History/WebHistoryItemInternal.h
M Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKBackForwardListTests.mm

  Log Message:
  ---
  REGRESSION (273650@main): Back forward list doesn’t have any webpage titles
rdar://128448221
https://bugs.webkit.org/show_bug.cgi?id=275280

Reviewed by Alex Christensen.

273650@main was an update to the web APIs "pushState" and "replaceState" to 
remove their
ability to change the title on a back/forward list item.

That ability had left the other browsers and left the spec, so it was a fine 
removal to make.
Unfortunately that change incorrectly assumed that no back/forward list item 
ever has a title.

They do have titles - populated by WebKit itself from document titles - and 
they do show up
in both the native WebKit API and inside WebKit based browsers.

document.title population of the back/forward list entries happens in other 
browsers, as well.

This change is a partial revert of 273650@main, leaving the web API changes in 
tact but
restoring the WKBackForwardListItem.title functionality.

* LayoutTests/loader/stateobjects/pushstate-size-expected.txt:
* LayoutTests/loader/stateobjects/pushstate-size-iframe-expected.txt:
* LayoutTests/loader/stateobjects/pushstate-size-iframe.html:
* LayoutTests/loader/stateobjects/pushstate-size.html:
* LayoutTests/loader/stateobjects/resources/pushstate-iframe.html:
* Source/WebCore/history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem):
(WebCore::HistoryItem::reset):
(WebCore::HistoryItem::title const):
(WebCore::HistoryItem::alternateTitle const):
(WebCore::HistoryItem::setAlternateTitle):
(WebCore::HistoryItem::setTitle):
* Source/WebCore/history/HistoryItem.h:
(WebCore::HistoryItem::create):
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::didChangeTitle):
* Source/WebCore/loader/HistoryController.cpp:
(WebCore::HistoryController::setCurrentItemTitle):
(WebCore::HistoryController::initializeItem):
* Source/WebCore/loader/HistoryController.h:
* Source/WebKit/Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::title const):
* Source/WebKit/UIProcess/API/C/WKBackForwardListItemRef.cpp:
(WKBackForwardListItemCopyTitle):
* Source/WebKit/UIProcess/API/C/WKBackForwardListItemRef.h:
* Source/WebKit/UIProcess/API/Cocoa/WKBackForwardListItem.h:
* Source/WebKit/UIProcess/API/Cocoa/WKBackForwardListItem.mm:
(-[WKBackForwardListItem title]):
* Source/WebKit/WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toBackForwardListItemState):
(WebKit::applyFrameState):
(WebKit::toHistoryItem):
* Source/WebKitLegacy/mac/History/HistoryPropertyList.mm:
(HistoryPropertyListWriter::writeHistoryItem):
* Source/WebKitLegacy/mac/History/WebHistory.mm:
(-[WebHistoryPrivate visitedURL:withTitle:]):
* Source/WebKitLegacy/mac/History/WebHistoryItem.mm:
(-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
(-[WebHistoryItem title]):
(-[WebHistoryItem setAlternateTitle:]):
(-[WebHistoryItem alternateTitle]):
(-[WebHistoryItem 
initWithURLString:title:displayTitle:lastVisitedTimeInterval:]):
(-[WebHistoryItem setTitle:]):
(-[WebHistoryItem _visitedWithTitle:]):
(-[WebHistoryItem _visited]): Deleted.
* Source/WebKitLegacy/mac/History/WebHistoryItemInternal.h:
* Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::setTitle):
* Tools/TestWebKitAPI/Tests/WebKit/WKBackForwardListTests.mm:
(TEST(WKBackForwardList, SessionStateTitleTruncation)):

Canonical link: https://commits.we

[webkit-changes] [WebKit/WebKit] ec419d: Validate the attributes CFDictionaryRef when decod...

2024-06-05 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ec419da7f4621af0ce69a9cce5e4eed57d8df190
  
https://github.com/WebKit/WebKit/commit/ec419da7f4621af0ce69a9cce5e4eed57d8df190
  Author: Brady Eidson 
  Date:   2024-06-05 (Wed, 05 Jun 2024)

  Changed paths:
M Source/WebCore/PAL/pal/spi/cf/CoreTextSPI.h
M Source/WebCore/platform/graphics/FontPlatformData.h
M Source/WebCore/platform/graphics/coretext/FontPlatformDataCoreText.cpp
M Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.serialization.in

  Log Message:
  ---
  Validate the attributes CFDictionaryRef when decoding FontPlatformData classes
rdar://125475043
https://bugs.webkit.org/show_bug.cgi?id=274933

Reviewed by Alex Christensen.

This is the first dive into the expected key/values in the FontPlatformData 
attributes dictionary.
Like other IPC validation we've done, it's more robust (while being less 
flexible) to rely on structs
that pull out values for serialization an deserialization.

* Source/WebCore/PAL/pal/spi/cf/CoreTextSPI.h:
* Source/WebCore/platform/graphics/FontPlatformData.h:
* Source/WebCore/platform/graphics/coretext/FontPlatformDataCoreText.cpp:
(WebCore::FontPlatformData::fromIPCData):
(WebCore::FontPlatformData::toIPCData const):
(WebCore::FontPlatformSerializedAttributes::fromCF):
(WebCore::FontPlatformSerializedAttributes::toCFDictionary const):
(WebCore::FontPlatformSerializedTraits::fromCF):
(WebCore::FontPlatformSerializedTraits::toCFDictionary const):
(WebCore::FontPlatformOpticalSize::fromCF):
(WebCore::FontPlatformOpticalSize::toCF const):
* Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.serialization.in:

Canonical link: https://commits.webkit.org/279743@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 26b41e: Cleanup various "nil vs empty" confusions in seria...

2024-05-18 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 26b41e6069aaf52423f7f73664cf8c29aef70bd8
  
https://github.com/WebKit/WebKit/commit/26b41e6069aaf52423f7f73664cf8c29aef70bd8
  Author: Brady Eidson 
  Date:   2024-05-18 (Sat, 18 May 2024)

  Changed paths:
M Source/WebKit/Shared/Cocoa/CoreIPCPassKit.h
M Source/WebKit/Shared/Cocoa/CoreIPCPassKit.mm
M Source/WebKit/Shared/Cocoa/CoreIPCPassKit.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCPersonNameComponents.mm
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Cleanup various "nil vs empty" confusions in serializaiton of some ObjC types
rdar://128027011
https://bugs.webkit.org/show_bug.cgi?id=274342

Reviewed by Alex Christensen.

Similar to what I fixed over in https://commits.webkit.org/277627@main, various 
other ObjC serializers
have some "nil vs empty" confusion that can lead to various wonky side effects.

Let's support the different between nil and empty wherever we can spot it.

* Source/WebKit/Shared/Cocoa/CoreIPCPassKit.h:
(WebKit::CoreIPCPKContact::CoreIPCPKContact):
* Source/WebKit/Shared/Cocoa/CoreIPCPassKit.mm:
(WebKit::CoreIPCPKContact::CoreIPCPKContact):
(WebKit::CoreIPCPKContact::toID const):
* Source/WebKit/Shared/Cocoa/CoreIPCPassKit.serialization.in:

* Source/WebKit/Shared/Cocoa/CoreIPCPersonNameComponents.mm:
(WebKit::CoreIPCPersonNameComponents::toID const):

* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(TEST(IPCSerialization, Basic)):

Canonical link: https://commits.webkit.org/278966@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] a3042d: Refactor StoreAppHighlight message to be a reply t...

2024-05-17 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a3042dc679d60719edb88ec5db7eff11705430b1
  
https://github.com/WebKit/WebKit/commit/a3042dc679d60719edb88ec5db7eff11705430b1
  Author: Brady Eidson 
  Date:   2024-05-17 (Fri, 17 May 2024)

  Changed paths:
M Source/WebCore/Modules/highlight/AppHighlight.h
M Source/WebCore/Modules/highlight/AppHighlightStorage.cpp
M Source/WebCore/Modules/highlight/AppHighlightStorage.h
M Source/WebCore/loader/EmptyClients.cpp
M Source/WebCore/loader/EmptyClients.h
M Source/WebCore/page/Chrome.cpp
M Source/WebCore/page/Chrome.h
M Source/WebCore/page/ChromeClient.h
M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
M Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h
M Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm

  Log Message:
  ---
  Refactor StoreAppHighlight message to be a reply to 
CreateAppHighlightInSelectedRange
https://bugs.webkit.org/show_bug.cgi?id=271768
rdar://125081140

Reviewed by Chris Dumez.

StoreAppHighlight is logically a reply to CreateAppHighlightInSelectedRange 
that is always expected.
The messages.in machinery allows us to express this explicitly.
This helps clean up other ChromeClient code, etc, as well.

* Source/WebCore/Modules/highlight/AppHighlight.h:
(IPC::AsyncReplyError::create):

* Source/WebCore/Modules/highlight/AppHighlightStorage.cpp:
(WebCore::AppHighlightStorage::storeAppHighlight):
* Source/WebCore/Modules/highlight/AppHighlightStorage.h:

* Source/WebCore/loader/EmptyClients.cpp:
(WebCore::EmptyChromeClient::storeAppHighlight const): Deleted.
* Source/WebCore/loader/EmptyClients.h:

* Source/WebCore/page/Chrome.cpp:
(WebCore::Chrome::storeAppHighlight const): Deleted.
* Source/WebCore/page/Chrome.h:
* Source/WebCore/page/ChromeClient.h:

* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::createAppHighlightInSelectedRange):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::storeAppHighlight): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:

* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::storeAppHighlight const): Deleted.
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createAppHighlightInSelectedRange):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

* Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h:
* Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::storeAppHighlight const): Deleted.

Originally-landed-as: 272448.815@safari-7618-branch (493520248f45). 
rdar://128087550
Canonical link: https://commits.webkit.org/278915@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 01f11d: Add a platform specific method to call when "gamep...

2024-05-16 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 01f11ddb6c104c73d97f7ba1a879b38be925e2c6
  
https://github.com/WebKit/WebKit/commit/01f11ddb6c104c73d97f7ba1a879b38be925e2c6
  Author: Brady Eidson 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.h
M Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
M Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.h
M Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm
M Source/WebKit/UIProcess/PageClient.h
M Source/WebKit/UIProcess/WebPageProxy.cpp

  Log Message:
  ---
  Add a platform specific method to call when "gamepads recently accessed" 
state changes
rdar://128171648
https://bugs.webkit.org/show_bug.cgi?id=274238

Reviewed by Aditya Keerthi.

Some Apple builds will implement this for now, and it can remain a no-op for 
others.

* Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.h:
* Source/WebCore/platform/gamepad/cocoa/GameControllerSoftLink.mm:

* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setGamepadsRecentlyAccessed:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h:

* Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.h:
* Source/WebKit/UIProcess/Cocoa/PageClientImplCocoa.mm:
(WebKit::PageClientImplCocoa::setGamepadsRecentlyAccessed):
* Source/WebKit/UIProcess/PageClient.h:
(WebKit::PageClient::setGamepadsRecentlyAccessed):

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recentGamepadAccessStateChanged):

Canonical link: https://commits.webkit.org/278887@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b5e71b: Add a mechanism for tracking whether web pages hav...

2024-05-14 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b5e71b32c88ce4dfbcb216ab61dea9535727dbfd
  
https://github.com/WebKit/WebKit/commit/b5e71b32c88ce4dfbcb216ab61dea9535727dbfd
  Author: Brady Eidson 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp
M Source/WebCore/Modules/gamepad/NavigatorGamepad.h
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/page/ChromeClient.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebKit/UIProcess/API/APIUIClient.h
M Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
M Source/WebKit/UIProcess/Cocoa/UIDelegate.h
M Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebProcess.cpp
M Tools/TestWebKitAPI/Tests/mac/HIDGamepads.mm

  Log Message:
  ---
  Add a mechanism for tracking whether web pages have "recently" used gamepads
rdar://127892698
https://bugs.webkit.org/show_bug.cgi?id=274134

Reviewed by Sihui Liu.

In some configurations the UIProcess might want to configure specific behaviors 
based on
whether or not content in a web page has "recently" accessed gamepads via 
JavaScript.

Do to the polling nature of navigator.getGamepads() we consider a web page to 
have "recently"
accessed them as long as that function is called periodically during an 
arbitrary timespan
I have arbitrarily chosen as 1.5 seconds.

This patch adds the behavior and tests it via TestWebKitAPI.
Actually using this behavior to do something interesting will come in a 
followup.

* Source/WebCore/Headers.cmake:

* Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::setGamepadsRecentlyAccessedThreshold):
(WebCore::NavigatorGamepad::maybeNotifyRecentAccess):
(WebCore::NavigatorGamepad::gamepads):
* Source/WebCore/Modules/gamepad/NavigatorGamepad.h:

* Source/WebCore/WebCore.xcodeproj/project.pbxproj:

* Source/WebCore/page/ChromeClient.h:
(WebCore::ChromeClient::gamepadsRecentlyAccessed):

* Source/WebKit/UIProcess/API/APIUIClient.h:
(API::UIClient::recentlyAccessedGamepadsForTesting):
(API::UIClient::stoppedAccessingGamepadsForTesting):

* Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

* Source/WebKit/UIProcess/Cocoa/UIDelegate.h:
* Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::recentlyAccessedGamepadsForTesting):
(WebKit::UIDelegate::UIClient::stoppedAccessingGamepadsForTesting):

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::m_recentGamepadAccessHysteresis):
(WebKit::WebPageProxy::recentGamepadAccessStateChanged):
(WebKit::WebPageProxy::gamepadsRecentlyAccessed):
(WebKit::m_browsingContextGroup): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:

* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::gamepadsRecentlyAccessed):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::gamepadsRecentlyAccessed):
* Source/WebKit/WebProcess/WebPage/WebPage.h:

* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

* Tools/TestWebKitAPI/Tests/mac/HIDGamepads.mm:
(-[GamepadUIDelegate _webViewRecentlyAccessedGamepadsForTesting:]):
(-[GamepadUIDelegate _webViewStoppedAccessingGamepadsForTesting:]):
(TestWebKitAPI::(Gamepad, GamepadState)):

Canonical link: https://commits.webkit.org/278782@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] d4b4c4: Switch the ConnectionMap lock to os_unfair_lock

2024-04-28 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d4b4c478068cdfd2b2ffe86a776be750779351ba
  
https://github.com/WebKit/WebKit/commit/d4b4c478068cdfd2b2ffe86a776be750779351ba
  Author: Brady Eidson 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
M Source/WTF/wtf/Lock.h
M Source/WTF/wtf/Locker.h
M Source/WTF/wtf/PlatformEnableCocoa.h
M Source/WebKit/Platform/IPC/Connection.cpp
M Source/WebKit/Platform/IPC/Connection.h

  Log Message:
  ---
  Switch the ConnectionMap lock to os_unfair_lock
rdar://127171137
https://bugs.webkit.org/show_bug.cgi?id=273360

Reviewed by Chris Dumez.

The ConnectionMap is accessed from multiple threads (obviously, since it's 
guarded with a lock)
Sometimes, a background thread accessing it is really low priority. e.g. The 
"Log Queue" thread.

In these cases, the extremely low priority background thread can be preempted 
while holding the lock.
Which causes the main thread to hang when also trying to acquire it, such as 
when tearing down a Connection.

This situation was radically improved in https://commits.webkit.org/278072@main 
by holding the lock for
a significantly lower amount of time, protecting just the memory reads of a 
hash lookup.

But the fundamental problem still exists - Because our standard WTF Lock 
"spinlock" doesn't participate in
donation, aren't priority inheriting, etc...  The fundamental problem still 
exists.

So this patch introduces WTF::UnfairLock to wrap os_unfair_lock, and switches 
the ConnectionMap lock to use
it on platforms that support it.

It maintains all the decorations for thread safety analysis, etc.
It also removes some bits from the Connection class itself to reduce the chance 
that a client can hog the lock
for longer than necessary going forward.

* Source/WTF/wtf/Lock.h:
* Source/WTF/wtf/Locker.h:
* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebKit/Platform/IPC/Connection.cpp:
(IPC::WTF_REQUIRES_LOCK):
(IPC::Connection::connection):
(IPC::Connection::connectionMap): Deleted.
* Source/WebKit/Platform/IPC/Connection.h:
(IPC::Connection::send):

Canonical link: https://commits.webkit.org/278088@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 18f50a: Form of Connection::send() that grabs the s_connec...

2024-04-26 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 18f50a6105512b7ba4abaa5a80493cdd9c8f97bd
  
https://github.com/WebKit/WebKit/commit/18f50a6105512b7ba4abaa5a80493cdd9c8f97bd
  Author: Brady Eidson 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M Source/WebKit/Platform/IPC/Connection.h

  Log Message:
  ---
  Form of Connection::send() that grabs the s_connectionMapLock lock should not 
hold the lock for the entire duration of the message send
rdar://126915951

Reviewed by Chris Dumez.

Message sends can take awhile. Especially if they're on a low priority 
background thread, and on a system under pressure.
Holding this lock for longer than necessary can be hazardous to other, higher 
priority threads.
So let's stop doing that.

* Source/WebKit/Platform/IPC/Connection.h:
(IPC::Connection::send):

Canonical link: https://commits.webkit.org/278072@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 2b1e91: WebKit's CNPostalAddress serialization confuses em...

2024-04-17 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2b1e91d086f9cc43aa9115c91b28d4baa77faeda
  
https://github.com/WebKit/WebKit/commit/2b1e91d086f9cc43aa9115c91b28d4baa77faeda
  Author: Brady Eidson 
  Date:   2024-04-17 (Wed, 17 Apr 2024)

  Changed paths:
M Source/WebKit/Shared/Cocoa/CoreIPCContacts.mm
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  WebKit's CNPostalAddress serialization confuses empty-vs-nil for 
formattedAddress
rdar://126270905

Reviewed by Ben Nham.

The default (NSString *) operator converts null strings to an empty @""

For CNPostalAddress, that means we were losing important fidelity in the 
deserialized object
that was breaking other frameworks in subtle ways.

This was further confused by the fact that CNPostalAddresses `isEqual:` method 
treats nil
and empty string as equivalent on these properties.

`nsStringNilIfNull` to the rescue - along with a regression test that manually 
makes sure we
got the nil-vs-empty part correct.

* Source/WebKit/Shared/Cocoa/CoreIPCContacts.mm:
(WebKit::CoreIPCCNPostalAddress::toID const):

* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(CNPostalAddressTesting_isEqual):
(operator==):
(TEST(IPCSerialization, Basic)):

Canonical link: https://commits.webkit.org/277627@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ca7602: Speculative improvements for rdar://125652518

2024-04-05 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ca760255d2d5e4dffe3e11b5b342e58dc28e1d4b
  
https://github.com/WebKit/WebKit/commit/ca760255d2d5e4dffe3e11b5b342e58dc28e1d4b
  Author: Brady Eidson 
  Date:   2024-04-05 (Fri, 05 Apr 2024)

  Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm
M Source/WebKit/UIProcess/API/Cocoa/WKUserContentController.mm

  Log Message:
  ---
  Speculative improvements for rdar://125652518
rdar://125652518
https://bugs.webkit.org/show_bug.cgi?id=272201

Reviewed by Per Arne Vollan and Ryosuke Niwa.

While we continue to explore this crash tracer (while deserializing a 
postMessage to a script message handler),
I spotted some room for improvements.

* Source/WebKit/UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
(API::SharedJSContext::ensureContext):
(API::sharedContext):
(API::SerializedScriptValue::deserialize):
(API::coreValueFromNSObject):
* Source/WebKit/UIProcess/API/Cocoa/WKUserContentController.mm:

Canonical link: https://commits.webkit.org/277131@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 5ae2c8: Generate serialization for CNContact

2024-02-12 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5ae2c85df7cb2b23c012f3d0c684f29ff660face
  
https://github.com/WebKit/WebKit/commit/5ae2c85df7cb2b23c012f3d0c684f29ff660face
  Author: Brady Eidson 
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
M Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.h
M Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.mm
M Source/WebCore/PAL/pal/spi/cocoa/ContactsSPI.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
M Source/WebKit/Shared/Cocoa/CoreIPCContacts.h
M Source/WebKit/Shared/Cocoa/CoreIPCContacts.mm
M Source/WebKit/Shared/Cocoa/CoreIPCContacts.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Generate serialization for CNContact
https://bugs.webkit.org/show_bug.cgi?id=269153

Reviewed by Alex Christensen.

* Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.mm:
* Source/WebCore/PAL/pal/spi/cocoa/ContactsSPI.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::decodeObjectDirectlyRequiringAllowedClasses>):
* Source/WebKit/Shared/Cocoa/CoreIPCContacts.h:
(WebKit::CoreIPCCNContact::CoreIPCCNContact):
* Source/WebKit/Shared/Cocoa/CoreIPCContacts.mm:
(WebKit::CoreIPCCNContact::CoreIPCCNContact):
(WebKit::CoreIPCCNContact::isValidCNContactType):
(WebKit::CoreIPCCNContact::toID const):
* Source/WebKit/Shared/Cocoa/CoreIPCContacts.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(TEST):

Canonical link: https://commits.webkit.org/274525@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] a121d7: Generate serialization for NSDateComponents

2024-02-09 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a121d7bf849bd4dd467af64329886e705fdad64e
  
https://github.com/WebKit/WebKit/commit/a121d7bf849bd4dd467af64329886e705fdad64e
  Author: Brady Eidson 
  Date:   2024-02-09 (Fri, 09 Feb 2024)

  Changed paths:
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
A Source/WebKit/Shared/Cocoa/CoreIPCDateComponents.h
A Source/WebKit/Shared/Cocoa/CoreIPCDateComponents.mm
A Source/WebKit/Shared/Cocoa/CoreIPCDateComponents.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
M Source/WebKit/Shared/Cocoa/CoreIPCTypes.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Generate serialization for NSDateComponents
https://bugs.webkit.org/show_bug.cgi?id=269099

Reviewed by Alex Christensen.

* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::shouldEnableStrictMode):
(IPC::decodeObjectDirectlyRequiringAllowedClasses>):
* Source/WebKit/Shared/Cocoa/CoreIPCDateComponents.h: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCTypes.h.
(WebKit::CoreIPCDateComponents::CoreIPCDateComponents):
* Source/WebKit/Shared/Cocoa/CoreIPCDateComponents.mm: Added.
(WebKit::CoreIPCDateComponents::CoreIPCDateComponents):
(WebKit::CoreIPCDateComponents::toID const):
(WebKit::CoreIPCDateComponents::hasCorrectNumberOfComponentValues):
* Source/WebKit/Shared/Cocoa/CoreIPCDateComponents.serialization.in: Added.
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):
* Source/WebKit/Shared/Cocoa/CoreIPCTypes.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(nsDateComponentsTesting_isEqual):
(operator==):
(TEST):

Canonical link: https://commits.webkit.org/274405@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 61c913: Generate serialization for some PassKit related cl...

2024-02-09 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 61c913ecf3c525a7de3662d08da273cbca20b362
  
https://github.com/WebKit/WebKit/commit/61c913ecf3c525a7de3662d08da273cbca20b362
  Author: Brady Eidson 
  Date:   2024-02-09 (Fri, 09 Feb 2024)

  Changed paths:
M Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.h
M Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.mm
M Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h
M Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.mm
M Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
M Source/WebKit/Shared/Cocoa/CoreIPCContacts.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
M Source/WebKit/Shared/Cocoa/CoreIPCPassKit.serialization.in
M Source/WebKit/Shared/Cocoa/WKKeyedCoder.mm
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Generate serialization for some PassKit related classes
https://bugs.webkit.org/show_bug.cgi?id=268960
rdar://122515353

Reviewed by Alex Christensen.

This started as an exercise to generate `PKPayment` and `PKPaymentMethod`
It turns out doing those two brought in even more PK types and some non-PK 
types.

I generate many of them, but had to call it quits at some point, adding some 
special
cases where we have a known type that we put through the generic NSSecureCoding 
path.

Generating for those types will come soon after.

* Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.mm:
* Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h:
* Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.mm:
* Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::getClass):
(IPC::getClass):
(IPC::getClass):
(IPC::getClass):
(IPC::getClass):
(IPC::getClass):
(IPC::typeFromObject):
(IPC::shouldEnableStrictMode):
(IPC::decodeObjectDirectlyRequiringAllowedClasses>):
* Source/WebKit/Shared/Cocoa/CoreIPCContacts.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):
* Source/WebKit/Shared/Cocoa/CoreIPCPassKit.serialization.in:
* Source/WebKit/Shared/Cocoa/WKKeyedCoder.mm:
(-[WKKeyedCoder encodeBool:forKey:]):
(-[WKKeyedCoder decodeBoolForKey:]):
(-[WKKeyedCoder encodeInt64:forKey:]):
(-[WKKeyedCoder decodeInt64ForKey:]):
(-[WKKeyedCoder encodeInteger:forKey:]):
(-[WKKeyedCoder decodeIntegerForKey:]):
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(wkDDActionContext_isEqual):
(wkSecureCoding_isEqual):
(operator==):
(postalAddressForTesting):
(pkContactForTesting):
(TEST):
(isEqual): Deleted.

Canonical link: https://commits.webkit.org/274384@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 46b3cc: Generate WKSecureCoding for PKPaymentMerchantSession

2024-02-02 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 46b3cc90a48cfdf8905654650313fb3741fdfc6b
  
https://github.com/WebKit/WebKit/commit/46b3cc90a48cfdf8905654650313fb3741fdfc6b
  Author: Brady Eidson 
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
M Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
M Source/WebKit/Shared/Cocoa/CoreIPCPassKit.serialization.in
M Source/WebKit/Shared/Cocoa/WKKeyedCoder.mm
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Generate WKSecureCoding for PKPaymentMerchantSession
https://bugs.webkit.org/show_bug.cgi?id=268605
rdar://122166988

Reviewed by Alex Christensen.

* Source/WebCore/PAL/pal/spi/cocoa/PassKitSPI.h:

* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::getClass):
(IPC::typeFromObject):

* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):
* Source/WebKit/Shared/Cocoa/CoreIPCPassKit.serialization.in:

* Source/WebKit/Shared/Cocoa/WKKeyedCoder.mm:
(-[WKKeyedCoder encodeObject:forKey:]):
(-[WKKeyedCoder decodeObjectOfClass:forKey:]):
(-[WKKeyedCoder decodeObjectOfClasses:forKey:]):

* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(TEST):

Canonical link: https://commits.webkit.org/274006@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] c7bb80: Fix DataDetectors/DataDetectorsCore availability c...

2024-01-08 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c7bb80f0facba76d56929639bb970ef15c1c78ef
  
https://github.com/WebKit/WebKit/commit/c7bb80f0facba76d56929639bb970ef15c1c78ef
  Author: Brady Eidson 
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm

  Log Message:
  ---
  Fix DataDetectors/DataDetectorsCore availability check
https://bugs.webkit.org/show_bug.cgi?id=267238
rdar://120661165

Reviewed by Alex Christensen and Chris Dumez.

* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::typeFromObject):

Canonical link: https://commits.webkit.org/272787@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 56991e: Check framework availability for all soft linked f...

2024-01-03 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 56991ea107a766bd954a0d9105f3a10aab98f43b
  
https://github.com/WebKit/WebKit/commit/56991ea107a766bd954a0d9105f3a10aab98f43b
  Author: Brady Eidson 
  Date:   2024-01-03 (Wed, 03 Jan 2024)

  Changed paths:
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm

  Log Message:
  ---
  Check framework availability for all soft linked frameworks in Core IPC code
https://bugs.webkit.org/show_bug.cgi?id=267052
rdar://120004741

Reviewed by Andy Estes.

If we softlink a framework, it stands to reason that it might be unavailable at 
runtime.
So before looking up a `Class` that exists in such a framework, make sure the 
framework is available.

* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::typeFromObject):

Canonical link: https://commits.webkit.org/272618@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] f144d3: Generate CFURLRef serializer

2023-12-19 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f144d32fb2fd5a87b566f24243f7fdfaba747789
  
https://github.com/WebKit/WebKit/commit/f144d32fb2fd5a87b566f24243f7fdfaba747789
  Author: Brady Eidson 
  Date:   2023-12-19 (Tue, 19 Dec 2023)

  Changed paths:
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
A Source/WebKit/Shared/Cocoa/CoreIPCCFURL.h
A Source/WebKit/Shared/Cocoa/CoreIPCCFURL.mm
A Source/WebKit/Shared/Cocoa/CoreIPCCFURL.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCDate.h
M Source/WebKit/Shared/cf/ArgumentCodersCF.cpp
M Source/WebKit/Shared/cf/ArgumentCodersCF.h
M Source/WebKit/Shared/cf/CFTypes.serialization.in
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Generate CFURLRef serializer
https://bugs.webkit.org/show_bug.cgi?id=266547

Reviewed by Alex Christensen.

CFURL is just different enough from NSURL and WTF::URL to get its own wrapper.

* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/Cocoa/CoreIPCCFURL.h: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCDate.h.
(WebKit::CoreIPCCFURL::CoreIPCCFURL):
(WebKit::CoreIPCCFURL::createCFURL const):
* Source/WebKit/Shared/Cocoa/CoreIPCCFURL.mm: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCDate.h.
(WebKit::CoreIPCCFURL::createWithBaseURLAndBytes):
(WebKit::CoreIPCCFURL::baseURL const):
(WebKit::CoreIPCCFURL::bytes const):
* Source/WebKit/Shared/Cocoa/CoreIPCCFURL.serialization.in: Copied from 
Source/WebKit/Shared/cf/CFTypes.serialization.in.
* Source/WebKit/Shared/Cocoa/CoreIPCDate.h:
(WebKit::CoreIPCDate::CoreIPCDate):
* Source/WebKit/Shared/cf/ArgumentCodersCF.cpp:
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
* Source/WebKit/Shared/cf/ArgumentCodersCF.h:
* Source/WebKit/Shared/cf/CFTypes.serialization.in:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(TEST):

Canonical link: https://commits.webkit.org/272318@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 1d4e78: Generate CFDate serializer using existing wrapper

2023-12-16 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1d4e789888d87dc921c184d042628f7d7aa25cc6
  
https://github.com/WebKit/WebKit/commit/1d4e789888d87dc921c184d042628f7d7aa25cc6
  Author: Brady Eidson 
  Date:   2023-12-16 (Sat, 16 Dec 2023)

  Changed paths:
M Source/WebKit/Shared/Cocoa/CoreIPCDate.h
M Source/WebKit/Shared/cf/ArgumentCodersCF.cpp
M Source/WebKit/Shared/cf/ArgumentCodersCF.h
M Source/WebKit/Shared/cf/CFTypes.serialization.in

  Log Message:
  ---
  Generate CFDate serializer using existing wrapper
rdar://119751053
https://bugs.webkit.org/show_bug.cgi?id=266530

Reviewed by Alex Christensen.

* Source/WebKit/Shared/Cocoa/CoreIPCDate.h:
(WebKit::CoreIPCDate::createCFDate const):
(WebKit::CoreIPCDate::toID const):
(WebKit::CoreIPCDate::createDate const): Deleted.
* Source/WebKit/Shared/cf/ArgumentCodersCF.cpp:
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
* Source/WebKit/Shared/cf/ArgumentCodersCF.h:
* Source/WebKit/Shared/cf/CFTypes.serialization.in:

Canonical link: https://commits.webkit.org/272181@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 8e97f8: Some build/link cleanup

2023-12-14 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8e97f894b076c23c78e14ca6e9e842ec64126a7c
  
https://github.com/WebKit/WebKit/commit/8e97f894b076c23c78e14ca6e9e842ec64126a7c
  Author: Brady Eidson 
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
M Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm
M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  ---
  Some build/link cleanup
https://bugs.webkit.org/show_bug.cgi?id=266304
rdar://119575178

Reviewed by Alex Christensen.

- Two getClass<> implementations were double defined
- ArgumentCodersCocoa.mm was somehow being included to build twice

* Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::getClass): Deleted.
(IPC::getClass): Deleted.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/272066@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] d3e0a4: Use existing Array/Date/Dictionary/URL wrappers fo...

2023-12-12 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d3e0a4bcbe56c457cdcadbdf33037756f2b813f7
  
https://github.com/WebKit/WebKit/commit/d3e0a4bcbe56c457cdcadbdf33037756f2b813f7
  Author: Brady Eidson 
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
M Source/WebKit/Platform/IPC/ArgumentCoders.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
M Source/WebKit/Shared/Cocoa/CoreIPCAVOutputContext.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCArray.h
M Source/WebKit/Shared/Cocoa/CoreIPCArray.mm
M Source/WebKit/Shared/Cocoa/CoreIPCArray.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCCFType.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCColor.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCContacts.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCDDActionContext.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCDate.h
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.mm
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCFont.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCLocale.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCNSValue.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCPassKit.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCString.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCURL.h
M Source/WebKit/Shared/Cocoa/CoreIPCURL.serialization.in
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/Shared/cf/ArgumentCodersCF.cpp
M Source/WebKit/Shared/cf/ArgumentCodersCF.h
M Source/WebKit/Shared/cf/CFTypes.serialization.in
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Use existing Array/Date/Dictionary/URL wrappers for their CF types
https://bugs.webkit.org/show_bug.cgi?id=266288
rdar://119559705

Reviewed by Alex Christensen.

* Source/WebKit/Platform/IPC/ArgumentCoders.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::encodeSecureCodingDirectlyImpl):
(IPC::encodeObjectDirectly>):
(IPC::decodeObjectDirectlyRequiringAllowedClasses>):
(IPC::encodeObjectDirectly):
* Source/WebKit/Shared/Cocoa/CoreIPCAVOutputContext.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCArray.h:
(WebKit::CoreIPCArray::createCFArray const):
* Source/WebKit/Shared/Cocoa/CoreIPCArray.mm:
(WebKit::CoreIPCArray::CoreIPCArray):
* Source/WebKit/Shared/Cocoa/CoreIPCArray.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCCFType.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCColor.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCContacts.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCDDActionContext.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCDate.h:
(WebKit::CoreIPCDate::createCFDate const):
(WebKit::CoreIPCDate::toID const):
(WebKit::CoreIPCDate::createDate const): Deleted.
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h:
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.mm:
(WebKit::CoreIPCDictionary::CoreIPCDictionary):
(WebKit::CoreIPCDictionary::createCFDictionary const):
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCFont.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCLocale.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(IPC::ArgumentCoder>::encode):
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCNSValue.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCPassKit.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCString.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCURL.h:
(WebKit::CoreIPCURL::CoreIPCURL):
(WebKit::CoreIPCURL::createCFURL const):
* Source/WebKit/Shared/Cocoa/CoreIPCURL.serialization.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/Shared/cf/ArgumentCodersCF.cpp:
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
* Source/WebKit/Shared/cf/ArgumentCoders

[webkit-changes] [WebKit/WebKit] 22afd2: Generate serialization for PKContact

2023-12-09 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 22afd2ad4c4ee26d6162de1d09eb069428330b39
  
https://github.com/WebKit/WebKit/commit/22afd2ad4c4ee26d6162de1d09eb069428330b39
  Author: Brady Eidson 
  Date:   2023-12-09 (Sat, 09 Dec 2023)

  Changed paths:
M Source/WTF/wtf/PlatformHave.h
M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
A Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.h
A Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.mm
A Source/WebCore/PAL/pal/spi/cocoa/ContactsSPI.h
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
A Source/WebKit/Shared/Cocoa/CoreIPCContacts.h
A Source/WebKit/Shared/Cocoa/CoreIPCContacts.mm
A Source/WebKit/Shared/Cocoa/CoreIPCContacts.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
A Source/WebKit/Shared/Cocoa/CoreIPCPassKit.h
A Source/WebKit/Shared/Cocoa/CoreIPCPassKit.mm
A Source/WebKit/Shared/Cocoa/CoreIPCPassKit.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCTypes.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Generate serialization for PKContact
https://bugs.webkit.org/show_bug.cgi?id=266115
rdar://119407339

Reviewed by Chris Dumez.

This does PKContact and the two Contacts types it relies on.

There's more Contacts and PassKit types coming, which are all closely related, 
hence the umbrella
serialization.in and implementation files.

* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
* Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.h: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCTypes.h.
* Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.mm: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCTypes.h.
* Source/WebCore/PAL/pal/spi/cocoa/ContactsSPI.h: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCTypes.h.
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::getClass):
(IPC::getClass):
(IPC::getClass):
(IPC::typeFromObject):
* Source/WebKit/Shared/Cocoa/CoreIPCContacts.h: Added.
(WebKit::CoreIPCCNPostalAddress::CoreIPCCNPostalAddress):
(WebKit::CoreIPCCNPhoneNumber::CoreIPCCNPhoneNumber):
* Source/WebKit/Shared/Cocoa/CoreIPCContacts.mm: Added.
(WebKit::CoreIPCCNPhoneNumber::CoreIPCCNPhoneNumber):
(WebKit::CoreIPCCNPhoneNumber::toID const):
(WebKit::CoreIPCCNPostalAddress::CoreIPCCNPostalAddress):
(WebKit::CoreIPCCNPostalAddress::toID const):
* Source/WebKit/Shared/Cocoa/CoreIPCContacts.serialization.in: Added.
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):
* Source/WebKit/Shared/Cocoa/CoreIPCPassKit.h: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCTypes.h.
(WebKit::CoreIPCPKContact::CoreIPCPKContact):
* Source/WebKit/Shared/Cocoa/CoreIPCPassKit.mm: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCTypes.h.
(WebKit::CoreIPCPKContact::CoreIPCPKContact):
(WebKit::CoreIPCPKContact::toID const):
* Source/WebKit/Shared/Cocoa/CoreIPCPassKit.serialization.in: Added.
* Source/WebKit/Shared/Cocoa/CoreIPCTypes.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(TEST):

Canonical link: https://commits.webkit.org/271807@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 415a49: Add an (off by default) code path to crash wheneve...

2023-12-08 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 415a49b8e806d09b279c29b35bf028a3e32fd0dd
  
https://github.com/WebKit/WebKit/commit/415a49b8e806d09b279c29b35bf028a3e32fd0dd
  Author: Brady Eidson 
  Date:   2023-12-08 (Fri, 08 Dec 2023)

  Changed paths:
M Source/WebKit/Shared/AuxiliaryProcess.cpp
M Source/WebKit/Shared/AuxiliaryProcessCreationParameters.h
M Source/WebKit/Shared/AuxiliaryProcessCreationParameters.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.h
M Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.mm
M Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  ---
  Add an (off by default) code path to crash whenever the CoreIPCSecureCoding 
wrapper is used
https://bugs.webkit.org/show_bug.cgi?id=266033
rdar://119344064

Reviewed by Alex Christensen.

This "crash on encountering an unspecified NSSecureCoding type" mode can be 
turned on via NSUserDefaults.

* Source/WebKit/Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::applyProcessCreationParameters):
* Source/WebKit/Shared/AuxiliaryProcessCreationParameters.h:
* Source/WebKit/Shared/AuxiliaryProcessCreationParameters.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.h:
* Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.mm:
(WebKit::SecureCoding::internalShouldCrashOnSecureCoding):
(WebKit::SecureCoding::internalClassNamesExemptFromSecureCodingCrash):
(WebKit::SecureCoding::shouldCrashOnSecureCoding):
(WebKit::SecureCoding::classNamesExemptFromSecureCodingCrash):
(WebKit::SecureCoding::applyProcessCreationParameters):
(WebKit::crashWithClassName):
(WebKit::CoreIPCSecureCoding::CoreIPCSecureCoding):
* Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::auxiliaryProcessParameters):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/271746@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 361273: Add WKKeyedCoder as an alternate code path for Web...

2023-12-06 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 361273dff3a1320574cb743de6930e21cbea87a6
  
https://github.com/WebKit/WebKit/commit/361273dff3a1320574cb743de6930e21cbea87a6
  Author: Brady Eidson 
  Date:   2023-12-06 (Wed, 06 Dec 2023)

  Changed paths:
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Scripts/generate-serializers.py
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h
M Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.cpp
M Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.h
M Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp
M Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in
M Source/WebKit/Scripts/webkit/tests/WebKitPlatformGeneratedSerializers.cpp
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
A Source/WebKit/Shared/Cocoa/CoreIPCAVOutputContext.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
A Source/WebKit/Shared/Cocoa/WKKeyedCoder.h
A Source/WebKit/Shared/Cocoa/WKKeyedCoder.mm
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Add WKKeyedCoder as an alternate code path for WebKit secure coding types 
(and use it to serialize AVOutputContext)
https://bugs.webkit.org/show_bug.cgi?id=265972
rdar://119279237

Reviewed by Alex Christensen.

For some types where adopting the WebKit property list format is slow-to-happen 
or not possible
(e.g. older operating systems) we can gather the equivalent property list 
ourselves with our own NSCoder.

WKKeyedCoder fills that role. It accumulates the key/value pairs encoded into 
an NSDictionary which
is then treated by the CoreIPC machinery as equivalent to a WebKit secure 
coding property list.

On the decode side, once validated like other WebKit property lists, it is used 
to recreate the object.

I chose a very simple first class to use this feature on - AVOutputContext and 
its (2) NSString members.
As we apply this strategy to more advanced classes we will also flesh out 
WKKeyedCoder's feature set.

* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Scripts/generate-serializers.py:
(SerializedType.__init__):
(generate_webkit_secure_coding_impl):
(generate_webkit_secure_coding_impl.is):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp:
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h:
* Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.cpp:
(WebKit::dictionaryForWebKitSecureCodingType):
(WebKit::CoreIPCAVOutputContext::CoreIPCAVOutputContext):
(WebKit::CoreIPCAVOutputContext::isValidDictionary):
(WebKit::CoreIPCAVOutputContext::toID const):
* Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.h:
(WebKit::CoreIPCAVOutputContext::CoreIPCAVOutputContext):
* Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp:
(WebKit::allSerializedTypes):
* Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in:
* Source/WebKit/Scripts/webkit/tests/WebKitPlatformGeneratedSerializers.cpp:
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::getClass):
(IPC::typeFromObject):
* Source/WebKit/Shared/Cocoa/CoreIPCAVOutputContext.serialization.in: Added.
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):
* Source/WebKit/Shared/Cocoa/WKKeyedCoder.h: Added.
* Source/WebKit/Shared/Cocoa/WKKeyedCoder.mm: Added.
(-[WKKeyedCoder init]):
(-[WKKeyedCoder initWithDictionary:]):
(-[WKKeyedCoder allowsKeyedCoding]):
(-[WKKeyedCoder encodeObject:forKey:]):
(-[WKKeyedCoder containsValueForKey:]):
(-[WKKeyedCoder decodeObjectOfClass:forKey:]):
(-[WKKeyedCoder decodeObjectForKey:]):
(-[WKKeyedCoder accumulatedDictionary]):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(TEST):

Canonical link: https://commits.webkit.org/271664@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 5776a8: Generate secure coding serializer for DDActionCont...

2023-12-05 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5776a8fdee1ed5230bafbb063ad15ac71d607f55
  
https://github.com/WebKit/WebKit/commit/5776a8fdee1ed5230bafbb063ad15ac71d607f55
  Author: Brady Eidson 
  Date:   2023-12-05 (Tue, 05 Dec 2023)

  Changed paths:
M Source/WebCore/PAL/pal/spi/mac/DataDetectorsSPI.h
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
A Source/WebKit/Shared/Cocoa/CoreIPCDDActionContext.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.mm
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
M Source/WebKit/Shared/Cocoa/CoreIPCNSValue.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSValue.mm
A Source/WebKit/Shared/Cocoa/CoreIPCPersonNameComponents.h
A Source/WebKit/Shared/Cocoa/CoreIPCPersonNameComponents.mm
A Source/WebKit/Shared/Cocoa/CoreIPCPersonNameComponents.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCTypes.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Generate secure coding serializer for DDActionContext (and the types it 
relies on)
https://bugs.webkit.org/show_bug.cgi?id=265890
rdar://119203785

Reviewed by Alex Christensen.

This adds the WebKit property list serialization code path for DDActionContext.
That includes the types it relies on - NSPersonNameComponents, and NSRect 
wrapped by NSValue.

On the surface - by looking at how our API test works - it appears almost as if 
we could serialize DDActionContext
directly by accessing members and recreating with setters.
Unfortunately that's not the case because not everything they need to 
encode/decode is directly accessible.

* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::getClass):
(IPC::typeFromObject):
* Source/WebKit/Shared/Cocoa/CoreIPCDDActionContext.serialization.in: Added.
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.mm:
(WebKit::CoreIPCDictionary::keyHasValueOfType const):
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):
* Source/WebKit/Shared/Cocoa/CoreIPCNSValue.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSValue.mm:
(WebKit::CoreIPCNSValue::valueFromNSValue):
(WebKit::CoreIPCNSValue::toID const):
(WebKit::CoreIPCNSValue::shouldWrapValue):
* Source/WebKit/Shared/Cocoa/CoreIPCPersonNameComponents.h: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCNSValue.h.
(WebKit::CoreIPCPersonNameComponents::CoreIPCPersonNameComponents):
* Source/WebKit/Shared/Cocoa/CoreIPCPersonNameComponents.mm: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCNSValue.mm.
(WebKit::CoreIPCPersonNameComponents::CoreIPCPersonNameComponents):
(WebKit::CoreIPCPersonNameComponents::toID const):
* Source/WebKit/Shared/Cocoa/CoreIPCPersonNameComponents.serialization.in: 
Added.
* Source/WebKit/Shared/Cocoa/CoreIPCTypes.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(isEqual):
(operator==):
(personNameComponentsForTesting):
(TEST):
(fakeDataDetectorResultForTesting):

Canonical link: https://commits.webkit.org/271585@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 9bd720: Generate everything needed regarding a WebKit Secu...

2023-12-05 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9bd720b73a8f1fea62d0e743755d4a9bda8fffb8
  
https://github.com/WebKit/WebKit/commit/9bd720b73a8f1fea62d0e743755d4a9bda8fffb8
  Author: Brady Eidson 
  Date:   2023-12-05 (Tue, 05 Dec 2023)

  Changed paths:
M Source/WebKit/DerivedSources-output.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Scripts/generate-serializers.py
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h
A Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.cpp
A Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.h
M Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp
M Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in
M Source/WebKit/Scripts/webkit/tests/WebKitPlatformGeneratedSerializers.cpp
R Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.h
R Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.mm
M Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.mm
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
M Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.h
M Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.mm
M Source/WebKit/Shared/Cocoa/CoreIPCTypes.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  ---
  Generate everything needed regarding a WebKit Secure Coding type (and move 
DDScannerResult over to the generated format)
https://bugs.webkit.org/show_bug.cgi?id=265728
rdar://119079477

Reviewed by Alex Christensen.

All WebKit Secure Coding types will follow the identical pattern of:
1 - Get property list dictionary
2 - Encode it
3 - Decode it
4 - Verify the decoded dictionary contents match the type
5 - Recreate the object with the property list

Instead of writing all of that code over time after time, let's generate it.

Given an Objective-C type and a description of its expected dictionary format, 
the generator now:
1 - Generates a CoreIPC wrapper for that type
2 - Generates the ArgumentCoders for that CoreIPC wrapper (including code that 
validates the dictionary format)
3 - Generates a description of the dictionary in SerializedTypeInfo
4 - Generates a description of the CoreIPC wrapper in SerializedTypeInfo

All of the above was enough to move DDScannerResult over to this new format, 
and will greatly
accelerate how quickly we can add new types.

* Source/WebKit/DerivedSources-output.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Scripts/generate-serializers.py:
(SerializedType.__init__):
(SerializedType.namespace_and_name):
(SerializedType.name_declaration_for_serialized_type_info):
(SerializedType.members_for_serialized_type_info):
(SerializedType.cpp_type_from_struct_or_class):
(SerializedType):
(SerializedType.cpp_struct_or_class_name):
(SerializedType.is_webkit_secure_coding_type):
(SerializedType.wrapper_for_webkit_secure_coding_type):
(generate_forward_declarations):
(generate_impl):
(generate_one_serialized_type_info):
(output_sorted_headers):
(generate_serialized_type_info):
(parse_serialized_types):
(generate_one_dictionary_member_validation):
(generate_webkit_secure_coding_impl):
(generate_webkit_secure_coding_impl.is):
(generate_webkit_secure_coding_header):
(main):
(SerializedType.namespace_unless_wtf_and_name): Deleted.
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp:
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h:
* Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.cpp: Added.
(WebKit::CoreIPCNSSomeFoundationType::CoreIPCNSSomeFoundationType):
(WebKit::CoreIPCNSSomeFoundationType::isValidDictionary):
(WebKit::CoreIPCNSSomeFoundationType::toID const):
(WebKit::CoreIPCDDScannerResult::CoreIPCDDScannerResult):
(WebKit::CoreIPCDDScannerResult::isValidDictionary):
(WebKit::CoreIPCDDScannerResult::toID const):
* Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.h: Added.
(WebKit::CoreIPCNSSomeFoundationType::CoreIPCNSSomeFoundationType):
(WebKit::CoreIPCDDScannerResult::CoreIPCDDScannerResult):
* Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp:
(WebKit::allSerializedTypes):
* Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in:
* Source/WebKit/Scripts/webkit/tests/WebKitPlatformGeneratedSerializers.cpp:
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder::decode):
* Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.h: Removed.
* Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.mm: Removed.
* Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h:
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.mm:
(W

[webkit-changes] [WebKit/WebKit] 26e825: Refactor count-handwritten-decoders to make it eas...

2023-11-28 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 26e8252c4b4131ee4eacae64754ed6ed130d7c7c
  
https://github.com/WebKit/WebKit/commit/26e8252c4b4131ee4eacae64754ed6ed130d7c7c
  Author: Brady Eidson 
  Date:   2023-11-28 (Tue, 28 Nov 2023)

  Changed paths:
A Tools/Scripts/count-handwritten-cocoa-decoders
R Tools/Scripts/count-handwritten-decoders

  Log Message:
  ---
  Refactor count-handwritten-decoders to make it easier to add exclusions (and 
add a few more exclusions)
https://bugs.webkit.org/show_bug.cgi?id=265428
rdar://118865137

Reviewed by Alex Christensen.

When adding some more exclusions, I got tired of the thrown together way of 
adding exclusions.
So I made it easier to add exclusions.

Also rename to count-handwritten-decoders-cocoa to represent the target 
platforms.

* Tools/Scripts/count-handwritten-decoders:

Canonical link: https://commits.webkit.org/271237@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] bee110: Refactor the "All CoreIPC types" variant to work f...

2023-11-20 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bee110f477b92fc7cded601ae4c995908b1e47d6
  
https://github.com/WebKit/WebKit/commit/bee110f477b92fc7cded601ae4c995908b1e47d6
  Author: Brady Eidson 
  Date:   2023-11-20 (Mon, 20 Nov 2023)

  Changed paths:
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
M Source/WebKit/Shared/Cocoa/CoreIPCArray.mm
M Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.h
M Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.mm
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.mm
M Source/WebKit/Shared/Cocoa/CoreIPCFont.mm
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.serialization.in
A Source/WebKit/Shared/Cocoa/CoreIPCTypes.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  ---
  Refactor the "All CoreIPC types" variant to work forward-delcared
https://bugs.webkit.org/show_bug.cgi?id=265114

Reviewed by Dan Glastonbury.

CoreIPCNSObject and some of the other CoreIPC wrappers have a circular 
dependency.
This is because of the variant of all wrappers that CoreIPCNSCFObject holds.

The circular dependency will become untenable in upcoming patches, so this is a 
straight refactor.
It does the following:
1 - Forward declares all the types for the variant instead of include their 
headers
2 - Because the types are forward declared, the variant can no longer be a 
direct member of
CoreIPCNSCFObject. So make it a UniqueRef<> instead
3 - Add a new "CoreIPCTypes.h" convenience header that *does* include all the 
wrapper headers.
4 - Include CoreIPCTypes.h in each .mm file that needs to work with the variant 
directly.

* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
* Source/WebKit/Shared/Cocoa/CoreIPCArray.mm:
* Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.h:
* Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.mm:
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h:
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.mm:
* Source/WebKit/Shared/Cocoa/CoreIPCFont.mm:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
(WebKit::CoreIPCNSCFObject::CoreIPCNSCFObject): Deleted.
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):
(WebKit::CoreIPCNSCFObject::CoreIPCNSCFObject):
(WebKit::CoreIPCNSCFObject::toID const):
(IPC::ArgumentCoder>::encode):
(IPC::ArgumentCoder>::decode):
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCTypes.h: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCArray.mm.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/270978@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 72c223: Generate serializers for DDScannerResult and NSValue

2023-11-16 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 72c2238b339fd7c807bb5f0d7f5534cb9cfc8f4f
  
https://github.com/WebKit/WebKit/commit/72c2238b339fd7c807bb5f0d7f5534cb9cfc8f4f
  Author: Brady Eidson 
  Date:   2023-11-16 (Thu, 16 Nov 2023)

  Changed paths:
M Source/WebCore/testing/Internals.h
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
A Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.h
A Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.mm
A Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
A Source/WebKit/Shared/Cocoa/CoreIPCNSValue.h
A Source/WebKit/Shared/Cocoa/CoreIPCNSValue.mm
A Source/WebKit/Shared/Cocoa/CoreIPCNSValue.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.h
M Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.mm
M Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Generate serializers for DDScannerResult and NSValue
https://bugs.webkit.org/show_bug.cgi?id=264915
rdar://118486039

Reviewed by Alex Christensen.

This patch starts the process of breaking out specific secure coding types into 
their own wrappers.

Starting with DDScannerResult, it optionally uses SPI on the object if it 
exists to grab a directly
serializable NSDictionary, or it falls back to just wrapping the object itself 
like any secure coding type.

That NSDictionary is known to contain NSValues that wrap an NSRange, so this 
patch also adds an NSValue wrapper.

Currently, any NSValues that are serialized would go through the secure coding 
path.
For this one wrapped type we're known to need (NSRange), we go through a 
directly serialized code path.

Headed down this road, the goal is to identify all specific types we need to 
serialize, have a direct wrapper
for each, and reduce our reliance on the secure coding code path to zero.

* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::getClass):
(IPC::typeFromObject):
* Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.h: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h.
(WebKit::CoreIPCDDScannerResult::CoreIPCDDScannerResult):
* Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.mm: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.mm.
(WebKit::shouldWrapDDScannerResult):
(WebKit::CoreIPCDDScannerResult::CoreIPCDDScannerResult):
(WebKit::CoreIPCDDScannerResult::toID const):
* Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.serialization.in: Added.
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):
* Source/WebKit/Shared/Cocoa/CoreIPCNSValue.h: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h.
(WebKit::CoreIPCNSValue::CoreIPCNSValue):
* Source/WebKit/Shared/Cocoa/CoreIPCNSValue.mm: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.mm.
(WebKit::CoreIPCNSValue::CoreIPCNSValue):
(WebKit::CoreIPCNSValue::toID const):
(WebKit::CoreIPCNSValue::shouldWrapValue):
* Source/WebKit/Shared/Cocoa/CoreIPCNSValue.serialization.in: Added.
* Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.h:
(WebKit::CoreIPCSecureCoding::CoreIPCSecureCoding):
* Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.mm:
(WebKit::CoreIPCSecureCoding::CoreIPCSecureCoding):
* Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::getClass): Deleted.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Since NSNumber is itself an NSValue, refactor these tests to explicitly emplace 
into the testing variant:
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(TEST):
(fakeDataDetectorResultForTesting):

Canonical link: https://commits.webkit.org/270840@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 2640f7: Fix Debug build on Monterey (Missing SoftLinked cl...

2023-11-14 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2640f7f95ff4b0d041e4fbed383cf42de591b647
  
https://github.com/WebKit/WebKit/commit/2640f7f95ff4b0d041e4fbed383cf42de591b647
  Author: Brady Eidson 
  Date:   2023-11-14 (Tue, 14 Nov 2023)

  Changed paths:
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm

  Log Message:
  ---
  Fix Debug build on Monterey (Missing SoftLinked classes)
https://bugs.webkit.org/show_bug.cgi?id=264858
rdar://118433817

Reviewed by Alex Christensen.

Monterey has at least one softlinked framework in place, but with a class that 
is missing.
The build was fine, but oh boy was using it in a Debug configuration very 
unhappy.

This situation used to be fine when we looked up allowed classes in a Vector 
(search for null is fine)
After we moved to looking up allowed classes in a HashSet...  Search for null 
is no longer fine.

This change simply null checks any softlinked class being looked up in the set.

* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::shouldEnableStrictMode):

Canonical link: https://commits.webkit.org/270754@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6be143: Generate serializers for NSArray, NSDictionary, an...

2023-11-12 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6be1434f578ebcb90ea96a1c71bca5348812e60a
  
https://github.com/WebKit/WebKit/commit/6be1434f578ebcb90ea96a1c71bca5348812e60a
  Author: Brady Eidson 
  Date:   2023-11-12 (Sun, 12 Nov 2023)

  Changed paths:
M Source/WebCore/platform/mac/SerializedPlatformDataCueMac.h
M Source/WebCore/platform/mac/SerializedPlatformDataCueMac.mm
M Source/WebKit/Platform/IPC/Decoder.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
M Source/WebKit/Shared/Cocoa/CoreIPCArray.h
A Source/WebKit/Shared/Cocoa/CoreIPCArray.mm
M Source/WebKit/Shared/Cocoa/CoreIPCArray.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCCFType.h
M Source/WebKit/Shared/Cocoa/CoreIPCColor.h
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h
A Source/WebKit/Shared/Cocoa/CoreIPCDictionary.mm
M Source/WebKit/Shared/Cocoa/CoreIPCDictionary.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCFont.h
A Source/WebKit/Shared/Cocoa/CoreIPCFont.mm
M Source/WebKit/Shared/Cocoa/CoreIPCFont.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.h
M Source/WebKit/Shared/Cocoa/CoreIPCString.h
M Source/WebKit/Shared/Cocoa/CoreIPCURL.h
M Source/WebKit/Shared/cf/CoreIPCNumber.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Generate serializers for NSArray, NSDictionary, and NSFont
https://bugs.webkit.org/show_bug.cgi?id=264696

Reviewed by Alex Christensen.

Now that we have the base CoreIPCNSCFObject wrapper and .serialization.in files 
for fundamental NS types, we can:
- Turn NSArray into a "Vector of CoreIPCNSCFObjects"
- Turn NSDictionary into a "Vector of key/value pairs where the keys and values 
are CoreIPCNSCFObjects"
- Directly serialize NSFont/UIFont, since we used an NSDictionary to do so 
before

* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::isSerializableValue):
(IPC::encodeObjectDirectly): Deleted.
(IPC::decodeObjectDirectlyRequiringAllowedClasses): Deleted.
(IPC::encodeObjectDirectly): Deleted.
(IPC::id>>): Deleted.
(IPC::decodeObjectDirectlyRequiringAllowedClasses): Deleted.
(IPC::encodeObjectDirectly): Deleted.
(IPC::decodeObjectDirectlyRequiringAllowedClasses): Deleted.
* Source/WebKit/Shared/Cocoa/CoreIPCArray.h:
(WebKit::CoreIPCArray::CoreIPCArray):
(WebKit::CoreIPCArray::toID): Deleted.
* Source/WebKit/Shared/Cocoa/CoreIPCArray.mm: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h.
(WebKit::CoreIPCArray::CoreIPCArray):
(WebKit::CoreIPCArray::toID const):
* Source/WebKit/Shared/Cocoa/CoreIPCArray.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h:
(WebKit::CoreIPCDictionary::CoreIPCDictionary):
(WebKit::CoreIPCDictionary::toID): Deleted.
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.mm: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h.
(WebKit::CoreIPCDictionary::CoreIPCDictionary):
(WebKit::CoreIPCDictionary::toID const):
* Source/WebKit/Shared/Cocoa/CoreIPCDictionary.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCFont.h:
(WebKit::CoreIPCFont::CoreIPCFont):
(WebKit::CoreIPCFont::toID): Deleted.
* Source/WebKit/Shared/Cocoa/CoreIPCFont.mm: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCArray.h.
(WebKit::CoreIPCFont::toID const):
* Source/WebKit/Shared/Cocoa/CoreIPCFont.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::CoreIPCNSCFObject::valueIsAllowed):
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.h:
(WebKit::CoreIPCSecureCoding::objectClass):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(operator==):
(TEST):

Canonical link: https://commits.webkit.org/270624@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] f10ee4: Rework ArgumentCodersCocoa to get us much closer t...

2023-11-11 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f10ee49ef636c10dd181239c2b624bf85a954ebc
  
https://github.com/WebKit/WebKit/commit/f10ee49ef636c10dd181239c2b624bf85a954ebc
  Author: Brady Eidson 
  Date:   2023-11-11 (Sat, 11 Nov 2023)

  Changed paths:
M Source/WebCore/platform/mac/SerializedPlatformDataCueMac.h
M Source/WebCore/platform/mac/SerializedPlatformDataCueMac.mm
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Platform/IPC/Decoder.h
M Source/WebKit/Scripts/generate-serializers.py
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
A Source/WebKit/Shared/Cocoa/CoreIPCArray.h
A Source/WebKit/Shared/Cocoa/CoreIPCArray.serialization.in
A Source/WebKit/Shared/Cocoa/CoreIPCCFType.h
A Source/WebKit/Shared/Cocoa/CoreIPCCFType.serialization.in
A Source/WebKit/Shared/Cocoa/CoreIPCColor.h
A Source/WebKit/Shared/Cocoa/CoreIPCColor.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCData.h
M Source/WebKit/Shared/Cocoa/CoreIPCDate.h
A Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h
A Source/WebKit/Shared/Cocoa/CoreIPCDictionary.serialization.in
A Source/WebKit/Shared/Cocoa/CoreIPCFont.h
A Source/WebKit/Shared/Cocoa/CoreIPCFont.serialization.in
A Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
A Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm
A Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.serialization.in
A Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.h
A Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.mm
A Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.serialization.in
A Source/WebKit/Shared/Cocoa/CoreIPCString.h
A Source/WebKit/Shared/Cocoa/CoreIPCString.serialization.in
A Source/WebKit/Shared/Cocoa/CoreIPCURL.h
A Source/WebKit/Shared/Cocoa/CoreIPCURL.serialization.in
M Source/WebKit/Shared/Cocoa/WebIconUtilities.mm
M Source/WebKit/Shared/cf/CoreIPCNumber.h
M Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm

  Log Message:
  ---
  Rework ArgumentCodersCocoa to get us much closer to generated serializers
https://bugs.webkit.org/show_bug.cgi?id=264588
rdar://118236121

Reviewed by Alex Christensen.

This changes introduces ObjC object wrappers.
Encoding an ObjC object directly creates a typed wrapper around it.

For wrappers around a type that we still do directly via ObjC (e.g. NSArray), 
encoding the wrapper
then ends up going down the old "encode ObjC directly" path.

This change has the following benefits:
1 - We now broadly use serialization.in files for all ObjC types.
2 - For catch-all types like SecureCoding, we can now easily break out 
individual types into
their own individual wrappers with individual serialization.
3 - So it follows, over time, the complicated logic in ArgumentCodersCocoa.mm 
can be whittled away.
4 - Having wrappers enables us to directly serialize collection types (like 
NSArray) without
relying on the existing ObjC code path

* Source/WebCore/platform/mac/SerializedPlatformDataCueMac.h:
* Source/WebCore/platform/mac/SerializedPlatformDataCueMac.mm:
(WebCore::SerializedPlatformDataCueMac::allowedClassesForNativeValues):
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Platform/IPC/Decoder.h:
(IPC::Decoder::decodeWithAllowedClasses):
(IPC::Decoder::allowedClasses const):
* Source/WebKit/Scripts/generate-serializers.py:
(decode_type):
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
(IPC::CoreIPCRetainPtr::CoreIPCRetainPtr):
(IPC::isObjectClassAllowed):
(IPC::decodeRequiringAllowedClasses):
(IPC::ArgumentCoder>::encode):
(IPC::ArgumentCoder>::decode):
(IPC::decodeWithAllowedClasses): Deleted.
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::typeFromObject):
(IPC::encodeObjectDirectly):
(IPC::decodeObjectDirectlyRequiringAllowedClasses):
(IPC::encodeObjectDirectly):
(IPC::id>>):
(IPC::decodeObjectDirectlyRequiringAllowedClasses):
(IPC::encodeObjectDirectly):
(IPC::decodeObjectDirectlyRequiringAllowedClasses):
(IPC::encodeObjectDirectly>):
(IPC::shouldEnableStrictMode):
(IPC::decodeObjectDirectlyRequiringAllowedClasses>):
(IPC::encodeObjectDirectly):
(IPC::decodeObjectDirectlyRequiringAllowedClasses):
(IPC::encodeObjectWithWrapper):
(IPC::decodeObjectFromWrapper):
(IPC::encodeArrayInternal): Deleted.
(IPC::decodeArrayInternal): Deleted.
(IPC::encodeColorInternal): Deleted.
(IPC::decodeColorInternal): Deleted.
(IPC::encodeDataInternal): Deleted.
(IPC::decodeDataInternal): Deleted.
(IPC::encodeDateInternal): Deleted.
(IPC::decodeDateInternal): Deleted.
(IPC::encodeDictionaryInternal): Deleted.
(I

[webkit-changes] [WebKit/WebKit] 90ecb2: Refactor some fundamentals in ArgumentCodersCocoa.h

2023-11-09 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 90ecb2cd9622645eadbe43708accc91290196bdf
  
https://github.com/WebKit/WebKit/commit/90ecb2cd9622645eadbe43708accc91290196bdf
  Author: Brady Eidson 
  Date:   2023-11-09 (Thu, 09 Nov 2023)

  Changed paths:
M Source/WebKit/Platform/IPC/Decoder.h
M Source/WebKit/Scripts/generate-serializers.py
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
M Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm
M Source/WebKit/Shared/mac/ObjCObjectGraph.mm
M Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm

  Log Message:
  ---
  Refactor some fundamentals in ArgumentCodersCocoa.h
https://bugs.webkit.org/show_bug.cgi?id=264385
rdar://118099847

Reviewed by Alex Christensen.

- Make all encode() methods work in terms of a single master encode() method
- Get rid of many extra decode() methods
- Make all decode() methods work in terms of a single master decode() method
- Rename the final decode() method that takes "allowed classes" to 
"decodeWithAllowedClasses" for compile
  safety and clarity
- Move the main "decodeWithAllowedClasses" entry point to Decoder itself to 
avoid re-entrancy in some situations.
- Make the way that "decodeWithAllowedClasses" gets the default 
array-of-allowed-classes a template so
  our softlinked classes can work with the default parameter
- Update callers that used to explicitly pass an allowed class to rely on the 
default, when possible.

Why do all this?

It makes Obj-C decode use nicer to write and to look at.

But also upcoming work for NSArray and NSDictionary will completely upend how 
we encode/decode for our Obj-C types
and this patch is a standalone prerequisite to enabling that work.

* Source/WebKit/Platform/IPC/Decoder.h:
(IPC::getClass):
(IPC::Decoder::decodeWithAllowedClasses):
* Source/WebKit/Scripts/generate-serializers.py:
(decode_type):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp:
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::decode):
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
(IPC::decodeWithAllowedClasses):
(IPC::ArgumentCoder>::decode):
(IPC::encode):
(IPC::decode): Deleted.
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::decodeFontInternal):
* Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::getClass):
(IPC::getClass):
(IPC::getClass):
(IPC::getClass):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::decode):
(IPC::ArgumentCoder::decode):
(IPC::getClass):
(IPC::ArgumentCoder::decode):
(IPC::getClass):
(IPC::ArgumentCoder::decodePlatformData):
(IPC::ArgumentCoder::decodePlatformData):
(IPC::getClass):
(IPC::ArgumentCoder>::decode):
* Source/WebKit/Shared/mac/ObjCObjectGraph.mm:
(WebKit::ObjCObjectGraph::decode):
* Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder::decodePlatformData):

Canonical link: https://commits.webkit.org/270461@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 3928a7: Move IPCSerialization from TestWebKitAPI to TestIPC

2023-11-03 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3928a73188814bd01bda64beb2d9b6fa6c45371f
  
https://github.com/WebKit/WebKit/commit/3928a73188814bd01bda64beb2d9b6fa6c45371f
  Author: Brady Eidson 
  Date:   2023-11-03 (Fri, 03 Nov 2023)

  Changed paths:
M Tools/TestWebKitAPI/Configurations/TestIPC.xcconfig
M Tools/TestWebKitAPI/SourcesCocoa.txt
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm
R Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm

  Log Message:
  ---
  Move IPCSerialization from TestWebKitAPI to TestIPC
https://bugs.webkit.org/show_bug.cgi?id=264187
rdar://117928143

Reviewed by Alex Christensen.

This always belonged in TestIPC.

* Tools/TestWebKitAPI/Configurations/TestIPC.xcconfig:
* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm: Renamed from 
Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm.
(SerializationTestSender::performSendWithAsyncReplyWithoutUsingIPCConnection 
const):
(CFHolderForTesting::valueAsCFType const):
(CFHolderForTesting::encode const):
(CFHolderForTesting::decode):
(operator==):
(ObjCHolderForTesting::valueAsID const):
(ObjCHolderForTesting::encode const):
(ObjCHolderForTesting::decode):
(ObjCPingBackMessage::name):
(ObjCPingBackMessage::asyncMessageReplyName):
(ObjCPingBackMessage::ObjCPingBackMessage):
(ObjCPingBackMessage::arguments):
(CFPingBackMessage::name):
(CFPingBackMessage::asyncMessageReplyName):
(CFPingBackMessage::CFPingBackMessage):
(CFPingBackMessage::arguments):
(TEST):

Canonical link: https://commits.webkit.org/270223@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 413e47: Refactor RevealItem to replace RVItem for IPC mess...

2023-11-02 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 413e473787ebd7cd36840613a9a3d6216ab18c6b
  
https://github.com/WebKit/WebKit/commit/413e473787ebd7cd36840613a9a3d6216ab18c6b
  Author: Brady Eidson 
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
M Source/WebCore/editing/cocoa/DictionaryLookup.mm
M Source/WebKit/Shared/Cocoa/RevealItem.h
M Source/WebKit/Shared/Cocoa/RevealItem.mm
M Source/WebKit/Shared/Cocoa/RevealItem.serialization.in
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

  Log Message:
  ---
  Refactor RevealItem to replace RVItem for IPC messaging
https://bugs.webkit.org/show_bug.cgi?id=264065
rdar://117822336

Reviewed by Megan Gardner.

The only RVItems that RevealItem every serialized for IPC were created 
internally with text and a range.
This patch changes serializing the RVItem to simply serializing the text and 
range.

* Source/WebCore/editing/cocoa/DictionaryLookup.mm:
* Source/WebKit/Shared/Cocoa/RevealItem.h:
(WebKit::RevealItemRange::RevealItemRange):
(WebKit::RevealItem::text const):
(WebKit::RevealItem::selectedRange const):
(WebKit::RevealItem::item const): Deleted.
* Source/WebKit/Shared/Cocoa/RevealItem.mm:
(WebKit::RevealItemRange::RevealItemRange):
(WebKit::RevealItem::RevealItem):
(WebKit::RevealItem::highlightRange const):
(WebKit::RevealItem::item const):
* Source/WebKit/Shared/Cocoa/RevealItem.serialization.in:
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::revealItemForCurrentSelection):

Canonical link: https://commits.webkit.org/270131@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 249189: Generate CGColor serialization

2023-10-30 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2491896493663e307f90dc6be53672e9ca59c4ef
  
https://github.com/WebKit/WebKit/commit/2491896493663e307f90dc6be53672e9ca59c4ef
  Author: Brady Eidson 
  Date:   2023-10-30 (Mon, 30 Oct 2023)

  Changed paths:
M Source/WebKit/Scripts/generate-serializers.py
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h
M Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in
M Source/WebKit/Shared/cf/ArgumentCodersCF.cpp
M Source/WebKit/Shared/cf/ArgumentCodersCF.h
M Source/WebKit/Shared/cf/CFTypes.serialization.in
M Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm

  Log Message:
  ---
  Generate CGColor serialization
https://bugs.webkit.org/show_bug.cgi?id=263932
rdar://117709336

Reviewed by David Kilzer.

WebCore::Color is already an appropriate wrapper class for CGColorRef.

But to use it, I needed to change generate-serializers.py to allow for:
- Fully custom "toCF" function
- Custom "fromCF" function
- Add an arbitrary forward declaration to the generated header.

With those changes, the actual code changes to WebKit are pure deletion.

* Source/WebKit/Scripts/generate-serializers.py:
(SerializedType.__init__):
(ConditionalForwardDeclaration):
(ConditionalForwardDeclaration.__init__):
(ConditionalForwardDeclaration.__lt__):
(ConditionalForwardDeclaration.__lt__.condition_str):
(ConditionalForwardDeclaration.__eq__):
(ConditionalForwardDeclaration.__hash__):
(generate_header):
(encode_cf_type):
(decode_cf_type):
(parse_serialized_types):
(main):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp:
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder>::decode):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h:
* Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in:
* Source/WebKit/Shared/cf/ArgumentCodersCF.cpp:
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
* Source/WebKit/Shared/cf/ArgumentCodersCF.h:
* Source/WebKit/Shared/cf/CFTypes.serialization.in:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm:
(TEST):

Canonical link: https://commits.webkit.org/269987@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] c50b2c: Generate CFBoolean coders

2023-10-30 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c50b2cb698b799b3ccef14ccfa4161d71db1bd8f
  
https://github.com/WebKit/WebKit/commit/c50b2cb698b799b3ccef14ccfa4161d71db1bd8f
  Author: Brady Eidson 
  Date:   2023-10-30 (Mon, 30 Oct 2023)

  Changed paths:
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Shared/cf/ArgumentCodersCF.cpp
M Source/WebKit/Shared/cf/ArgumentCodersCF.h
M Source/WebKit/Shared/cf/CFTypes.serialization.in
A Source/WebKit/Shared/cf/CoreIPCBoolean.h
A Source/WebKit/Shared/cf/CoreIPCBoolean.serialization.in
M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  ---
  Generate CFBoolean coders
https://bugs.webkit.org/show_bug.cgi?id=263904
rdar://117694738

Reviewed by David Kilzer.

* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/cf/ArgumentCodersCF.cpp:
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
* Source/WebKit/Shared/cf/ArgumentCodersCF.h:
* Source/WebKit/Shared/cf/CFTypes.serialization.in:
* Source/WebKit/Shared/cf/CoreIPCBoolean.h: Added.
(WebKit::CoreIPCBoolean::CoreIPCBoolean):
(WebKit::CoreIPCBoolean::createBoolean const):
* Source/WebKit/Shared/cf/CoreIPCBoolean.serialization.in: Copied from 
Source/WebKit/Shared/cf/CFTypes.serialization.in.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/269968@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] b96d6e: Add generation of CF serializers

2023-10-30 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b96d6e41056bce05390a67eaa3075b311a5aa59b
  
https://github.com/WebKit/WebKit/commit/b96d6e41056bce05390a67eaa3075b311a5aa59b
  Author: Brady Eidson 
  Date:   2023-10-30 (Mon, 30 Oct 2023)

  Changed paths:
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Scripts/generate-serializers.py
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h
M Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp
M Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in
M Source/WebKit/Shared/Cocoa/CoreIPCData.h
M Source/WebKit/Shared/Cocoa/CoreIPCData.serialization.in
M Source/WebKit/Shared/WTFArgumentCoders.serialization.in
M Source/WebKit/Shared/cf/ArgumentCodersCF.cpp
M Source/WebKit/Shared/cf/ArgumentCodersCF.h
A Source/WebKit/Shared/cf/CFTypes.serialization.in
M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  ---
  Add generation of CF serializers
https://bugs.webkit.org/show_bug.cgi?id=263800

Reviewed by David Kilzer.

A decent chunk of remaining handwritten coders are in ArgumentCodersCF.

The strategy is to add a C++ class to wrap each of the CFTypes we serialize,
and that C++ class's coders are also generated.

CoreIPCData is a prime candidate of this, in that it can easily wrap a 
CFDataRef.

This patch teachers the generator to look for types that end in "Ref" and are
followed by a "wrapped by" clause.
It then generates the encode/decode methods for that CF type in terms of the 
wrapper.

CFDataRef and CFStringRef, and already have suitable wrappers, so we'll start 
with them.
This can also be extended to NS* types in the future.

* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Scripts/generate-serializers.py:
(SerializedType.__init__):
(SerializedType.namespace_and_name):
(SerializedType.cf_wrapper_type):
(one_argument_coder_declaration_cf):
(one_argument_coder_declaration):
(generate_header):
(check_type_members):
(encode_cf_type):
(encode_type):
(decode_cf_type):
(decode_type):
(generate_one_impl):
(generate_serialized_type_info):
(parse_serialized_types):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp:
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder>::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder>::decode):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h:
(IPC::ArgumentCoder>::encode):
(IPC::ArgumentCoder>::encode):
* Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp:
* Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in:
* Source/WebKit/Shared/Cocoa/CoreIPCData.h:
(WebKit::CoreIPCData::CoreIPCData):
* Source/WebKit/Shared/Cocoa/CoreIPCData.serialization.in:
* Source/WebKit/Shared/WTFArgumentCoders.serialization.in:
* Source/WebKit/Shared/cf/ArgumentCodersCF.cpp:
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder>::decode): Deleted.
* Source/WebKit/Shared/cf/ArgumentCodersCF.h:
* Source/WebKit/Shared/cf/CFTypes.serialization.in: Copied from 
Source/WebKit/Shared/Cocoa/CoreIPCData.serialization.in.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/269951@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] dd5a34: Start directly testing serialization of some CF types

2023-10-27 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dd5a348f196e0fb2b55832c31dad39da0954fedb
  
https://github.com/WebKit/WebKit/commit/dd5a348f196e0fb2b55832c31dad39da0954fedb
  Author: Brady Eidson 
  Date:   2023-10-27 (Fri, 27 Oct 2023)

  Changed paths:
M Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
M Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm

  Log Message:
  ---
  Start directly testing serialization of some CF types
https://bugs.webkit.org/show_bug.cgi?id=263751

Reviewed by Alex Christensen.

* Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm:
(SerializationTestSender::performSendWithAsyncReplyWithoutUsingIPCConnection 
const):
(CFHolderForTesting::valueAsCFType const):
(CFHolderForTesting::encode const):
(CFHolderForTesting::decode):
(operator==):
(ObjCPingBackMessage::ObjCPingBackMessage):
(CFPingBackMessage::name):
(CFPingBackMessage::asyncMessageReplyName):
(CFPingBackMessage::CFPingBackMessage):
(CFPingBackMessage::arguments):
(TEST):
(ObjCSerializationTester::performSendWithAsyncReplyWithoutUsingIPCConnection 
const): Deleted.
(BasicPingBackMessage::name): Deleted.
(BasicPingBackMessage::asyncMessageReplyName): Deleted.
(BasicPingBackMessage::BasicPingBackMessage): Deleted.
(BasicPingBackMessage::arguments): Deleted.

Canonical link: https://commits.webkit.org/269872@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 4ee7d1: Make it easier to test multiple types in IPCSerial...

2023-10-26 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4ee7d142938d4707c6e22dcc910e319f470449bb
  
https://github.com/WebKit/WebKit/commit/4ee7d142938d4707c6e22dcc910e319f470449bb
  Author: Brady Eidson 
  Date:   2023-10-26 (Thu, 26 Oct 2023)

  Changed paths:
M Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm

  Log Message:
  ---
  Make it easier to test multiple types in IPCSerialization, and use it to test 
NSURL and NSData
https://bugs.webkit.org/show_bug.cgi?id=263740
rdar://117548102

Reviewed by Alex Christensen.

This makes it much easier to add new types and to test them.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm:
(ObjCHolderForTesting::valueAsID const):
(ObjCHolderForTesting::encode const):
(ObjCHolderForTesting::decode):
(operator==):
(BasicPingBackMessage::BasicPingBackMessage):
(TEST):

Canonical link: https://commits.webkit.org/269828@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] d9fd3e: Introduce TestWebKitAPI mechanism for directly tes...

2023-10-25 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d9fd3e0d1f7a2f914052383ccd29ac376b1f8895
  
https://github.com/WebKit/WebKit/commit/d9fd3e0d1f7a2f914052383ccd29ac376b1f8895
  Author: Brady Eidson 
  Date:   2023-10-25 (Wed, 25 Oct 2023)

  Changed paths:
M Source/WebKit/Shared/Cocoa/CoreIPCData.serialization.in
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
M Tools/TestWebKitAPI/SourcesCocoa.txt
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm

  Log Message:
  ---
  Introduce TestWebKitAPI mechanism for directly testing IPC serialization
https://bugs.webkit.org/show_bug.cgi?id=263703
rdar://117511848

Reviewed by Alex Christensen.

This patch introduces a framework to directly test serialization of object 
types that we know
we need to support coding for IPC, but might not have any indirect way to test.

The testing leverages IPC's support for MessageSenders to work without an 
IPC::Connection.
That support was originally added to support generated messages and encoding to 
our daemons,
but reusing it here fits nicely.

By using a test-specific MessageSender and 
sendWithAsyncReplyWithoutUsingIPCConnection, we coax
CoreIPC into encoding a message and decoding a reply the same way it does for 
actual IPC messaging.

The prime use-case for this technique is testing our Objective-C types as found 
in ArgumentCodersCocoa.mm
The CoreFoundation types in ArgumentCodersCF.mm are also a nice fit.

For the sake of introducing the mechanism at a high level, this patch only 
tests serialization of NSString.
With this framework introduced, testing other types will be trivial.

* Source/WebKit/Shared/Cocoa/CoreIPCData.serialization.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm: Added.
(ObjCSerializationTester::performSendWithAsyncReplyWithoutUsingIPCConnection 
const):
(ObjCHolderForTesting::encode const):
(ObjCHolderForTesting::decode):
(operator==):
(BasicPingBackMessage::name):
(BasicPingBackMessage::asyncMessageReplyName):
(BasicPingBackMessage::BasicPingBackMessage):
(BasicPingBackMessage::arguments):
(TEST):

Canonical link: https://commits.webkit.org/269802@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 8a46e6: Refactor Color IPC types to not be nested

2023-10-25 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a46e65b9cb7ac45212995d32d30048801b268fc
  
https://github.com/WebKit/WebKit/commit/8a46e65b9cb7ac45212995d32d30048801b268fc
  Author: Brady Eidson 
  Date:   2023-10-25 (Wed, 25 Oct 2023)

  Changed paths:
M Source/WebCore/platform/graphics/Color.cpp
M Source/WebCore/platform/graphics/Color.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  ---
  Refactor Color IPC types to not be nested
https://bugs.webkit.org/show_bug.cgi?id=263688
rdar://117499465

Reviewed by Alex Christensen.

This is necessary for upcoming work.

* Source/WebCore/platform/graphics/Color.cpp:
(WebCore::Color::Color):
(WebCore::Color::data const):
* Source/WebCore/platform/graphics/Color.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/269793@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 5bec43: Move ArgumentCodersCocoa.mm to WebKitPlatform

2023-10-25 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5bec434844a936e32702a2d26f835d388991dec0
  
https://github.com/WebKit/WebKit/commit/5bec434844a936e32702a2d26f835d388991dec0
  Author: Brady Eidson 
  Date:   2023-10-25 (Wed, 25 Oct 2023)

  Changed paths:
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  ---
  Move ArgumentCodersCocoa.mm to WebKitPlatform
https://bugs.webkit.org/show_bug.cgi?id=263681
rdar://117493028

Reviewed by Alex Christensen.

Moving this file to WebKitPlatform also revealed an unused symbol and 
unreachable code,
so this patch also resolves those issues.

* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::shouldEnableStrictMode):
(IPC::haveSecureActionContext): Deleted.
(IPC::haveStrictDecodableCNContact): Deleted.
(IPC::haveStrictDecodablePKContact): Deleted.
(IPC::haveStrictDecodableNSTextTable): Deleted.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/269792@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 67c142: Auto-generate a handful of WebKit/Shared serializers

2023-10-23 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 67c142aa6a6a646e2acc2385238769a7cdf0897a
  
https://github.com/WebKit/WebKit/commit/67c142aa6a6a646e2acc2385238769a7cdf0897a
  Author: Brady Eidson 
  Date:   2023-10-23 (Mon, 23 Oct 2023)

  Changed paths:
M Source/WebKit/CMakeLists.txt
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Shared/AppPrivacyReport.h
A Source/WebKit/Shared/AppPrivacyReportTestingData.serialization.in
M Source/WebKit/Shared/ResourceLoadStatisticsParameters.h
A Source/WebKit/Shared/ResourceLoadStatisticsParameters.serialization.in
R Source/WebKit/Shared/UserContentControllerParameters.cpp
M Source/WebKit/Shared/UserContentControllerParameters.h
A Source/WebKit/Shared/UserContentControllerParameters.serialization.in
M Source/WebKit/Shared/WebBackForwardListCounts.h
A Source/WebKit/Shared/WebBackForwardListCounts.serialization.in
M Source/WebKit/Sources.txt
M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  ---
  Auto-generate a handful of WebKit/Shared serializers
https://bugs.webkit.org/show_bug.cgi?id=263514
rdar://117332035

Reviewed by Alex Christensen.

* Source/WebKit/CMakeLists.txt:
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/AppPrivacyReport.h:
(WebKit::AppPrivacyReportTestingData::encode const): Deleted.
(WebKit::AppPrivacyReportTestingData::decode): Deleted.
* Source/WebKit/Shared/AppPrivacyReportTestingData.serialization.in: Added.
* Source/WebKit/Shared/ResourceLoadStatisticsParameters.h:
(WebKit::ResourceLoadStatisticsParameters::encode const): Deleted.
(WebKit::ResourceLoadStatisticsParameters::decode): Deleted.
* Source/WebKit/Shared/ResourceLoadStatisticsParameters.serialization.in: Added.
* Source/WebKit/Shared/UserContentControllerParameters.cpp: Removed.
* Source/WebKit/Shared/UserContentControllerParameters.h:
* Source/WebKit/Shared/UserContentControllerParameters.serialization.in: Added.
* Source/WebKit/Shared/WebBackForwardListCounts.h:
(WebKit::WebBackForwardListCounts::encode const): Deleted.
(WebKit::WebBackForwardListCounts::decode): Deleted.
* Source/WebKit/Shared/WebBackForwardListCounts.serialization.in: Added.
* Source/WebKit/Sources.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/269662@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 9daa36: Get rid of a few more false positives in count-han...

2023-10-23 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9daa364b60433a09f4718da8bbbdfc9fe2a90358
  
https://github.com/WebKit/WebKit/commit/9daa364b60433a09f4718da8bbbdfc9fe2a90358
  Author: Brady Eidson 
  Date:   2023-10-23 (Mon, 23 Oct 2023)

  Changed paths:
M Tools/Scripts/count-handwritten-decoders

  Log Message:
  ---
  Get rid of a few more false positives in count-handwritten-decoders
https://bugs.webkit.org/show_bug.cgi?id=263515
rdar://117335018

Reviewed by Alex Christensen.

* Tools/Scripts/count-handwritten-decoders:

Canonical link: https://commits.webkit.org/269651@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 1e851f: Use C++ serializers for NSString and NSURL

2023-10-20 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1e851ff01daba9c70bbabe570f0772902c581f92
  
https://github.com/WebKit/WebKit/commit/1e851ff01daba9c70bbabe570f0772902c581f92
  Author: Brady Eidson 
  Date:   2023-10-20 (Fri, 20 Oct 2023)

  Changed paths:
M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm

  Log Message:
  ---
  Use C++ serializers for NSString and NSURL
https://bugs.webkit.org/show_bug.cgi?id=263389

Reviewed by Alex Christensen.

We auto generate our WTF::String and WTF::URL serializers.
So leverage them when encoding/decoding NSString or NSURL.

* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::encodeStringInternal):
(IPC::decodeStringInternal):
(IPC::encodeURLInternal):
(IPC::decodeURLInternal):

Canonical link: https://commits.webkit.org/269599@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 0dfb3f: Two Proxy-related API tests are timing out

2023-10-18 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0dfb3fab57130990a9a8e0e23615d6e49064f6cb
  
https://github.com/WebKit/WebKit/commit/0dfb3fab57130990a9a8e0e23615d6e49064f6cb
  Author: Brady Eidson 
  Date:   2023-10-18 (Wed, 18 Oct 2023)

  Changed paths:
M Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm

  Log Message:
  ---
  Two Proxy-related API tests are timing out
https://bugs.webkit.org/show_bug.cgi?id=263325
rdar://116703485

Reviewed by Alex Christensen.

When building in the open source project with the public SDK, 
NetworkSessionCocoa was not actually applying the proxies.
Let's fix that.

* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::setProxyConfigData):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/269489@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] a7616f: Cleanup webpushd.plist install location

2023-10-13 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a7616f1b230beece9e6daef6432e68526fa90fa5
  
https://github.com/WebKit/WebKit/commit/a7616f1b230beece9e6daef6432e68526fa90fa5
  Author: Brady Eidson 
  Date:   2023-10-13 (Fri, 13 Oct 2023)

  Changed paths:
M Source/WebKit/Configurations/webpushd.xcconfig

  Log Message:
  ---
  Cleanup webpushd.plist install location
https://bugs.webkit.org/show_bug.cgi?id=263127
rdar://116030136

Reviewed by Elliott Williams.

Restore the SYSTEM_SECONDARY_CONTENT_PATH behavior lost in a previous patch.

* Source/WebKit/Configurations/webpushd.xcconfig:

Canonical link: https://commits.webkit.org/269331@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ededc2: Add script to count instances of handwritten seria...

2023-10-11 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ededc2ad69321b5b8b6e28b047e5f64d77732361
  
https://github.com/WebKit/WebKit/commit/ededc2ad69321b5b8b6e28b047e5f64d77732361
  Author: Brady Eidson 
  Date:   2023-10-11 (Wed, 11 Oct 2023)

  Changed paths:
A Tools/Scripts/count-handwritten-decoders

  Log Message:
  ---
  Add script to count instances of handwritten serialization code in Source
https://bugs.webkit.org/show_bug.cgi?id=263057
rdar://116844772

Reviewed by Tim Horton.

* Tools/Scripts/count-handwritten-decoders: Added.

Canonical link: https://commits.webkit.org/269240@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 74d5f7: Generate BlobPart serializer (with some minor refa...

2023-09-29 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 74d5f782ae368d11eb26bdb832be4bc5950121a3
  
https://github.com/WebKit/WebKit/commit/74d5f782ae368d11eb26bdb832be4bc5950121a3
  Author: Brady Eidson 
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
M Source/WebCore/platform/network/BlobPart.h
M Source/WebKit/Shared/WebCoreArgumentCoders.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  ---
  Generate BlobPart serializer (with some minor refactoring)
https://bugs.webkit.org/show_bug.cgi?id=262396
rdar://116253299

Reviewed by Andy Estes.

Love taking various informal "this should've been a variant<>" patterns and 
making them
actually be variants.

* Source/WebCore/platform/network/BlobPart.h:
(WebCore::BlobPart::BlobPart):
(WebCore::BlobPart::type const):
(WebCore::BlobPart::moveData):
(WebCore::BlobPart::url const):
(WebCore::BlobPart::detachFromCurrentThread):
(WebCore::BlobPart::data const): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder::decode): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/268674@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 6cba78: Generate a handful of serializers from WebCoreArgu...

2023-09-29 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6cba786901b85de12e880a112b51730f7273d384
  
https://github.com/WebKit/WebKit/commit/6cba786901b85de12e880a112b51730f7273d384
  Author: Brady Eidson 
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
M Source/WebCore/platform/graphics/GraphicsContextGL.h
M Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm
M Source/WebKit/Shared/WebCoreArgumentCoders.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  ---
  Generate a handful of serializers from WebCoreArgumentCoders.h
https://bugs.webkit.org/show_bug.cgi?id=262379
rdar://116242048

Reviewed by Alex Christensen.

* Source/WebCore/platform/graphics/GraphicsContextGL.h:
* Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder::encode):
 Deleted.
(IPC::ArgumentCoder::decode):
 Deleted.
(IPC::ArgumentCoder::encode):
 Deleted.
(IPC::ArgumentCoder::decode):
 Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder::decode): Deleted.
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder::decode): Deleted.
(IPC::ArgumentCoder::encode): Deleted.
(IPC::ArgumentCoder::decode): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/268661@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] ef78ea: Generate serializes for ObjectIdentifier (by addin...

2023-09-28 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ef78eaa134b5c063abbe9664a9b365eca1ef82e8
  
https://github.com/WebKit/WebKit/commit/ef78eaa134b5c063abbe9664a9b365eca1ef82e8
  Author: Brady Eidson 
  Date:   2023-09-28 (Thu, 28 Sep 2023)

  Changed paths:
M Source/JavaScriptCore/runtime/Microtask.h
M Source/WTF/wtf/ObjectIdentifier.h
M Source/WebCore/Modules/cache/DOMCacheIdentifier.h
M Source/WebCore/Modules/fetch/FetchIdentifier.h
M Source/WebCore/Modules/filesystemaccess/FileSystemHandleIdentifier.h
M 
Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandleIdentifier.h
M 
Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnectionCallbackIdentifier.h
M Source/WebCore/Modules/mediastream/RTCRtpScriptTransformer.h
M 
Source/WebCore/Modules/permissions/MainThreadPermissionObserverIdentifier.h
M Source/WebCore/Modules/push-api/PushSubscriptionIdentifier.h
M 
Source/WebCore/Modules/speech/SpeechRecognitionConnectionClientIdentifier.h
M Source/WebCore/Modules/web-locks/WebLockIdentifier.h
M Source/WebCore/Modules/websockets/WebSocketIdentifier.h
M Source/WebCore/accessibility/AXCoreObject.h
M Source/WebCore/dom/BroadcastChannelIdentifier.h
M Source/WebCore/dom/ElementIdentifier.h
M Source/WebCore/dom/PortIdentifier.h
M Source/WebCore/editing/TextManipulationItemIdentifier.h
M Source/WebCore/editing/TextManipulationToken.h
M Source/WebCore/editing/cocoa/AttributedString.h
M Source/WebCore/page/GlobalWindowIdentifier.h
M Source/WebCore/page/SecurityOriginData.h
M Source/WebCore/page/cocoa/ImageOverlayDataDetectionResultIdentifier.h
M Source/WebCore/platform/MediaSessionGroupIdentifier.h
M Source/WebCore/platform/MediaUniqueIdentifier.h
M Source/WebCore/platform/ProcessIdentifier.h
M Source/WebCore/platform/graphics/ImageDecoderIdentifier.h
M Source/WebCore/platform/graphics/InbandGenericCueIdentifier.h
M Source/WebCore/platform/graphics/LayerHostingContextIdentifier.h
M Source/WebCore/platform/graphics/RenderingResourceIdentifier.h
M Source/WebCore/platform/graphics/mac/DisplayConfigurationMonitor.h
M Source/WebCore/platform/mediastream/RTCDataChannelLocalIdentifier.h
M Source/WebCore/platform/mediastream/RealtimeMediaSourceIdentifier.h
M Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCSocketIdentifier.h
M Source/WebCore/platform/text/TextCheckingRequestIdentifier.h
M Source/WebCore/workers/service/ServiceWorkerIdentifier.h
M Source/WebCore/workers/service/ServiceWorkerTypes.h
M 
Source/WebCore/workers/service/background-fetch/BackgroundFetchRecordIdentifier.h
M Source/WebCore/workers/shared/SharedWorkerIdentifier.h
M Source/WebCore/worklets/WorkletGlobalScope.h
M Source/WebKit/GPUProcess/media/RemoteMediaResourceIdentifier.h
M Source/WebKit/GPUProcess/media/RemoteSourceBufferIdentifier.h
M Source/WebKit/GPUProcess/media/TrackPrivateRemoteIdentifier.h
M Source/WebKit/NetworkProcess/CustomProtocols/LegacyCustomProtocolID.h
M Source/WebKit/NetworkProcess/Downloads/DownloadID.h
M 
Source/WebKit/NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementNetworkLoaderCocoa.mm
M Source/WebKit/Platform/IPC/Connection.h
M Source/WebKit/Platform/IPC/DaemonCoders.cpp
M Source/WebKit/Scripts/generate-serializers.py
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h
M Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp
M Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in
M Source/WebKit/Shared/ContentWorldShared.h
M Source/WebKit/Shared/Extensions/WebExtensionControllerIdentifier.h
M Source/WebKit/Shared/ShapeDetectionIdentifier.h
M Source/WebKit/Shared/WTFArgumentCoders.serialization.in
M Source/WebKit/Shared/WebGPU/WebGPUIdentifier.h
M Source/WebKit/Shared/WebsiteData/QuotaIncreaseRequestIdentifier.h
M Source/WebKit/Shared/XR/XRDeviceIdentifier.h
M Source/WebKit/Shared/wc/WCContentBufferIdentifier.h
M Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h
M Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
M Source/WebKit/WebProcess/GPU/graphics/GraphicsContextGLIdentifier.h
M Source/WebKit/WebProcess/GPU/graphics/RenderingBackendIdentifier.h
M Source/WebKit/WebProcess/GPU/graphics/wc/WCLayerTreeHostIdentifier.h
M Source/WebKit/WebProcess/GPU/media/RemoteAudioHardwareListenerIdentifier.h
M Source/WebKit/WebProcess/GPU/media/RemoteAudioSessionIdentifier.h
M Source/WebKit/WebProcess/GPU/media/RemoteCDMIdentifier.h
M Source/WebKit/WebProcess/GPU/media/RemoteCDMInstanceIdentifier.h
M Source/WebKit/WebProcess/GPU/media/RemoteCDMInstanceSessionIdentifier.h
M Source/WebKit/WebProcess/GPU/media/RemoteLegacyCDMIdentifier.h
M Source/WebKit/WebProcess/GPU/media

[webkit-changes] [WebKit/WebKit] c3745a: Generate serializers for MemoryPressureHandler.h

2023-09-26 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c3745a742d7d83e0ba0b958240f4c3c42114feda
  
https://github.com/WebKit/WebKit/commit/c3745a742d7d83e0ba0b958240f4c3c42114feda
  Author: Brady Eidson 
  Date:   2023-09-26 (Tue, 26 Sep 2023)

  Changed paths:
M Source/WTF/wtf/MemoryPressureHandler.cpp
M Source/WTF/wtf/MemoryPressureHandler.h
M Source/WebKit/Shared/WTFArgumentCoders.serialization.in

  Log Message:
  ---
  Generate serializers for MemoryPressureHandler.h
https://bugs.webkit.org/show_bug.cgi?id=262161
rdar://116098010

Reviewed by Alex Christensen.

* Source/WTF/wtf/MemoryPressureHandler.cpp:
(WTF::MemoryPressureHandlerConfiguration::MemoryPressureHandlerConfiguration):
(WTF::MemoryPressureHandler::Configuration::Configuration): Deleted.
* Source/WTF/wtf/MemoryPressureHandler.h:
(WTF::MemoryPressureHandler::Configuration::encode const): Deleted.
(WTF::MemoryPressureHandler::Configuration::decode): Deleted.
* Source/WebKit/Shared/WTFArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/268496@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 860991: REGRESSION(268408@main): [ macOS ] TestWebKitAPI.W...

2023-09-26 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 860991a7920d2f60a54d108defe3f18169c3bb32
  
https://github.com/WebKit/WebKit/commit/860991a7920d2f60a54d108defe3f18169c3bb32
  Author: Brady Eidson 
  Date:   2023-09-26 (Tue, 26 Sep 2023)

  Changed paths:
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  ---
  REGRESSION(268408@main): [ macOS ] 
TestWebKitAPI.WebPushDPushNotificationEventTest.Basic is constantly timing out.
https://bugs.webkit.org/show_bug.cgi?id=262150
rdar://116087660

Unreviewed test gardening.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

Canonical link: https://commits.webkit.org/268491@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 5856ca: Generate serializers for FontTaggedSettings.h

2023-09-26 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5856cad983b6efaf26dddec0982d681ef62c6210
  
https://github.com/WebKit/WebKit/commit/5856cad983b6efaf26dddec0982d681ef62c6210
  Author: Brady Eidson 
  Date:   2023-09-26 (Tue, 26 Sep 2023)

  Changed paths:
M Source/WebCore/platform/graphics/FontTaggedSettings.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  ---
  Generate serializers for FontTaggedSettings.h
https://bugs.webkit.org/show_bug.cgi?id=262138
rdar://116079823

Reviewed by Alex Christensen.

* Source/WebCore/platform/graphics/FontTaggedSettings.h:
(WebCore::FontTaggedSetting::encode const): Deleted.
(WebCore::FontTaggedSetting::decode): Deleted.
(WebCore::FontTaggedSettings::encode const): Deleted.
(WebCore::FontTaggedSettings::decode): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/268488@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] f685af: Replace CapabilityValueOrRange with CapabilityRange

2023-09-26 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f685afa11acafdf44fd60af91b837cb1f3bf85f9
  
https://github.com/WebKit/WebKit/commit/f685afa11acafdf44fd60af91b837cb1f3bf85f9
  Author: Brady Eidson 
  Date:   2023-09-26 (Tue, 26 Sep 2023)

  Changed paths:
M Source/WebCore/Modules/mediastream/MediaTrackCapabilities.cpp
M Source/WebCore/platform/mediastream/MediaConstraints.h
M Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp
M Source/WebCore/platform/mediastream/RealtimeMediaSourceCapabilities.h
M Source/WebCore/platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp
M 
Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp
M 
Source/WebCore/platform/mediastream/gstreamer/MockDisplayCaptureSourceGStreamer.cpp
M Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.h
M Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp
M Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.h
M Source/WebCore/platform/mediastream/mac/MockAudioSharedUnit.mm
M Source/WebCore/platform/mock/MockRealtimeAudioSource.cpp
M Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  ---
  Replace CapabilityValueOrRange with CapabilityRange
https://bugs.webkit.org/show_bug.cgi?id=262099
rdar://116038461

Reviewed by Eric Carlson.

- Remove basically unused "value()" feature
- Do nothing by store ranges internall
- Update all users of the class to be nicer
- Generate encode/decode, with validated min/max

* Source/WebCore/Modules/mediastream/MediaTrackCapabilities.cpp:
(WebCore::capabilityDoubleRange):
(WebCore::capabilityIntRange):
* Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::supportsSizeFrameRateAndZoom):
(WebCore::RealtimeMediaSource::fitnessDistance):
(WebCore::RealtimeMediaSource::applyConstraint):
(WebCore::RealtimeMediaSource::extractVideoFrameSizeConstraints):
(WebCore::RealtimeMediaSource::applyConstraints):
* Source/WebCore/platform/mediastream/RealtimeMediaSourceCapabilities.h:
(WebCore::CapabilityValueOrRange::CapabilityValueOrRange):
(WebCore::CapabilityValueOrRange::rangeMin const):
(WebCore::CapabilityValueOrRange::rangeMax const):
(WebCore::CapabilityValueOrRange::value const):
(WebCore::CapabilityValueOrRange::encode const): Deleted.
(WebCore::CapabilityValueOrRange::decode): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/268487@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] d2bfb9: Auto-generate yet another handful of WebCore/platf...

2023-09-26 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d2bfb96ad96328fcbdb30379b6ed05015ec4aa51
  
https://github.com/WebKit/WebKit/commit/d2bfb96ad96328fcbdb30379b6ed05015ec4aa51
  Author: Brady Eidson 
  Date:   2023-09-26 (Tue, 26 Sep 2023)

  Changed paths:
M Source/WebCore/platform/ThreadSafeDataBuffer.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  ---
  Auto-generate yet another handful of WebCore/platform coders
https://bugs.webkit.org/show_bug.cgi?id=262090
rdar://116027783

Reviewed by Alex Christensen.

* Source/WebCore/platform/ThreadSafeDataBuffer.h:
(WebCore::ThreadSafeDataBufferImpl::create):
(WebCore::ThreadSafeDataBuffer::create):
(WebCore::ThreadSafeDataBuffer::ThreadSafeDataBuffer):
(WebCore::ThreadSafeDataBuffer::encode const): Deleted.
(WebCore::ThreadSafeDataBuffer::decode): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/268451@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] e48bf0: Auto-generate another handful of WebCore/platform ...

2023-09-25 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e48bf086c1f3bf6811e7383d07c54a6f7bb664af
  
https://github.com/WebKit/WebKit/commit/e48bf086c1f3bf6811e7383d07c54a6f7bb664af
  Author: Brady Eidson 
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
M Source/WebCore/platform/audio/PlatformMediaSession.h
M Source/WebCore/platform/graphics/GraphicsStyle.h
M Source/WebCore/platform/graphics/filters/FEComponentTransfer.h
M Source/WebCore/platform/network/SocketStreamError.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  ---
  Auto-generate another handful of WebCore/platform coders
https://bugs.webkit.org/show_bug.cgi?id=262075
rdar://116017771

Reviewed by Alex Christensen.

* Source/WebCore/platform/audio/PlatformMediaSession.h:
(WebCore::PlatformMediaSession::resumeBuffering):
(WebCore::PlatformMediaSession::RemoteCommandArgument::encode const): Deleted.
(WebCore::PlatformMediaSession::RemoteCommandArgument::decode): Deleted.
* Source/WebCore/platform/graphics/GraphicsStyle.h:
(WebCore::GraphicsDropShadow::hasOutsets const):
(WebCore::GraphicsDropShadow::encode const): Deleted.
(WebCore::GraphicsDropShadow::decode): Deleted.
(WebCore::GraphicsGaussianBlur::encode const): Deleted.
(WebCore::GraphicsGaussianBlur::decode): Deleted.
(WebCore::GraphicsColorMatrix::encode const): Deleted.
(WebCore::GraphicsColorMatrix::decode): Deleted.
* Source/WebCore/platform/graphics/filters/FEComponentTransfer.h:
* Source/WebCore/platform/network/SocketStreamError.h:
(WebCore::SocketStreamError::SocketStreamError):
(WebCore::SocketStreamError::encode const): Deleted.
(WebCore::SocketStreamError::decode): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/268430@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] f489a4: Auto-generate a handful of WebCore/platform coders

2023-09-25 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f489a4cb98a0ec913c3b1ccc63418bbc7bda24c6
  
https://github.com/WebKit/WebKit/commit/f489a4cb98a0ec913c3b1ccc63418bbc7bda24c6
  Author: Brady Eidson 
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
M Source/WebCore/platform/audio/NowPlayingInfo.h
M Source/WebCore/platform/graphics/DisplayUpdate.h
M Source/WebCore/platform/graphics/MediaUsageInfo.h
M Source/WebCore/platform/graphics/PlatformTextTrack.h
M Source/WebCore/platform/mediacapabilities/VideoConfiguration.h
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  ---
  Auto-generate a handful of WebCore/platform coders
https://bugs.webkit.org/show_bug.cgi?id=262066
rdar://116012933

Reviewed by Alex Christensen.

* Source/WebCore/platform/audio/NowPlayingInfo.h:
(WebCore::NowPlayingInfoArtwork::operator== const):
(WebCore::NowPlayingInfoArtwork::encode const): Deleted.
(WebCore::NowPlayingInfoArtwork::decode): Deleted.
(WebCore::NowPlayingInfo::encode const): Deleted.
(WebCore::NowPlayingInfo::decode): Deleted.
* Source/WebCore/platform/graphics/DisplayUpdate.h:
(WebCore::DisplayUpdate::encode const): Deleted.
(WebCore::DisplayUpdate::decode): Deleted.
* Source/WebCore/platform/graphics/MediaUsageInfo.h:
(WebCore::MediaUsageInfo::encode const): Deleted.
(WebCore::MediaUsageInfo::decode): Deleted.
* Source/WebCore/platform/graphics/PlatformTextTrack.h:
(WebCore::PlatformTextTrackData::decode): Deleted.
(WebCore::PlatformTextTrackData::encode const): Deleted.
* Source/WebCore/platform/mediacapabilities/VideoConfiguration.h:
(WebCore::VideoConfiguration::encode const): Deleted.
(WebCore::VideoConfiguration::decode): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/268419@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] d3f529: Declarative Web Push: Flatten the JSON structure, ...

2023-09-25 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d3f529899e76b9a2e64ea39fee114fcbfb776f52
  
https://github.com/WebKit/WebKit/commit/d3f529899e76b9a2e64ea39fee114fcbfb776f52
  Author: Brady Eidson 
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
M Source/WebCore/Modules/notifications/NotificationJSONParser.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  ---
  Declarative Web Push: Flatten the JSON structure, removing the `options` 
sub-object
https://bugs.webkit.org/show_bug.cgi?id=262055
rdar://116003373

Reviewed by Alex Christensen.

This helps to reconcile the non-optional "default action URL" JSON member with 
the
completely optional "default action URL" NotificationOptions dictionary member.

Makes describing the JSON simpler, as well as making future additions easier.

* Source/WebCore/Modules/notifications/NotificationJSONParser.cpp:
(WebCore::NotificationJSONParser::parseNotificationPayload):
(WebCore::optionsKey): Deleted.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

Canonical link: https://commits.webkit.org/268408@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [WebKit/WebKit] 72258d: Declarative Web Push: Add "defaultAction" member t...

2023-09-25 Thread Brady Eidson
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 72258dba1b792f0c7f60bb30c81ecc2d8d4b4bfe
  
https://github.com/WebKit/WebKit/commit/72258dba1b792f0c7f60bb30c81ecc2d8d4b4bfe
  Author: Brady Eidson 
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
M Source/WebCore/Modules/notifications/Notification.cpp
M Source/WebCore/Modules/notifications/Notification.h
M Source/WebCore/Modules/notifications/Notification.idl
M Source/WebCore/Modules/notifications/NotificationOptions.idl
M Source/WebCore/workers/service/ServiceWorkerRegistration.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm

  Log Message:
  ---
  Declarative Web Push: Add "defaultAction" member to Notification and 
NotificationOptions
https://bugs.webkit.org/show_bug.cgi?id=262004
rdar://115938949

Reviewed by Dan Glastonbury.

When a declarative web push message comes in, it is required to have a default 
action URL.
This is so the user activating the notification can bypass service workers, as 
service workers are not required.

If the message is mutable, and a `pushnotification` event handler decides to 
show a different notification,
then that notification also needs a default action URL.

We put that as an option on NotificationOptions, add a Notification accessor 
for it, and enforce that
new notifications shown during `pushnotification` event handlers have one.

Then we test it.

* Source/WebCore/Modules/notifications/Notification.cpp:
(WebCore::Notification::create):
(WebCore::Notification::Notification):
(WebCore::Notification::data const):
* Source/WebCore/Modules/notifications/Notification.h:
* Source/WebCore/Modules/notifications/Notification.idl:
* Source/WebCore/Modules/notifications/NotificationOptions.idl:
* Source/WebCore/workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::showNotification):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

Canonical link: https://commits.webkit.org/268402@main


___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


  1   2   >