[Webkit-unassigned] [Bug 222999] New: Need to rationalize preference like settings on the WKWebViewConfiguration that use the WebPreferences infrastructure

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 9 15:00:42 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=222999

            Bug ID: 222999
           Summary: Need to rationalize preference like settings on the
                    WKWebViewConfiguration that use the WebPreferences
                    infrastructure
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit2
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sam at webkit.org
                CC: kkinnunen at apple.com

There is an issue with all the preference like settings on the WKWebViewConfiguration that use the WebPreferences infrastructure to communicate their state. The issue stems from the configuration values updating the value of the shared WebPreferences object, when their intention was really only to affect the one WKWebView they were being used with. As an example:

    WKWebViewConfiguration *configurationA = [[WKWebViewConfiguration alloc] init];
    configuration._colorFilterEnabled = NO;

    WKWebView *webViewA = [[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) configuration:configuration];

    // At this point, color filter is disable for webViewA.

    WKWebViewConfiguration *configurationCopy = webViewA.configuration;
    configurationCopy._colorFilterEnabled = YES;

    WKWebView *webViewB = [[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) configuration:configurationCopy];

    // At this point, color filter is now enabled for webViewA and webViewB.

I think we need to stop updating the shared preferences entirely from [WKWebView _setupPageConfiguration:] and treat each configuration value as immutable for that WKWebView. This will require a bit of reworking.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210309/65ad0569/attachment.htm>


More information about the webkit-unassigned mailing list