Bug 273975 - [WPE][GTK] createNewPage in WebKitUIClient.cpp needs some hooking up of the API::PageConfiguration
Summary: [WPE][GTK] createNewPage in WebKitUIClient.cpp needs some hooking up of the A...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on: 273993
Blocks:
  Show dependency treegraph
 
Reported: 2024-05-09 15:30 PDT by Michael Catanzaro
Modified: 2024-05-16 16:59 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2024-05-09 15:30:38 PDT
On webkit-dev@, Alex writes:

"createNewPage in WebKitUIClient.cpp needs some hooking up of the API::PageConfiguration in a way I couldn’t figure out in the few minutes I looked at it.  This should be pretty straightforward to someone who knows the glib code better than I do."

I'm going to propose a pull request to unblock this, but I have a question. In webkitWebContextCreatePageForWebView, we need to take many settings from the related view's configuration, because this is an API guarantee. Presumably the new API::Configuration object is expected to match the related view, so it's probably not a problem, but this does mean we won't respect all of the values set in the API::Configuration in case they are different for some reason. Specifically:

    pageConfiguration->setProcessPool(context->priv->processPool.get());
    pageConfiguration->setPreferences(webkitSettingsGetPreferences(webkit_web_view_get_settings(webView)));
    pageConfiguration->setRelatedPage(relatedView ? &webkitWebViewGetPage(relatedView) : nullptr);
    pageConfiguration->setUserContentController(userContentManager ? webkitUserContentManagerGetUserContentControllerProxy(userContentManager) : nullptr);
    pageConfiguration->setControlledByAutomation(webkit_web_view_is_controlled_by_automation(webView));

All those will get overridden. I *assume* this is OK.
Comment 1 Michael Catanzaro 2024-05-09 15:37:36 PDT
Pull request: https://github.com/WebKit/WebKit/pull/28365
Comment 2 EWS 2024-05-16 16:59:19 PDT
Committed 278896@main (4f5aa1a1182d): <https://commits.webkit.org/278896@main>

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