WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
207613
Can't enable color filter in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=207613
Summary
Can't enable color filter in MiniBrowser
Ryosuke Niwa
Reported
2020-02-11 20:37:10 PST
Enabling color filter, etc... is broken because [WK2BrowserWindowController didChangeSettings] updates the properties of _webView.configuration.preferences but that's on a copy of WKWebView's _configuration.
Attachments
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2020-02-11 20:37:33 PST
Has this changed recently? How did this work at all??
Tim Horton
Comment 2
2020-02-11 20:52:05 PST
The WKWebViewConfiguration is a copy, that's how WKWebViewConfiguration works. The WKPreferences object inside it should NOT be a copy.
Tim Horton
Comment 3
2020-02-11 20:53:47 PST
Also, in general you may have to make a new view once you've set a preference, which should work. We aren't super great about invalidating preferences.
Ryosuke Niwa
Comment 4
2020-02-11 22:29:12 PST
(In reply to Tim Horton from
comment #2
)
> The WKWebViewConfiguration is a copy, that's how WKWebViewConfiguration > works. The WKPreferences object inside it should NOT be a copy.
(In reply to Tim Horton from
comment #3
)
> Also, in general you may have to make a new view once you've set a > preference, which should work. We aren't super great about invalidating > preferences.
Hm... I see what you're saying. Back to the original problem.
Ryosuke Niwa
Comment 5
2020-02-11 22:33:42 PST
Hm... maybe there is a race condition between when WebContent process is created & when WebPageProxy::preferencesDidChange() gets called. In particular, when hasRunningProcess() is false, we exit early without sending any IPC even if we're in the middle of starting a new web content process.
Ryosuke Niwa
Comment 6
2020-02-11 22:40:49 PST
_webView->_impl->page().hasRunningProcess() is still false after: _webView = [[WKWebView alloc] initWithFrame:[containerView bounds] configuration:_configuration]
Tim Horton
Comment 7
2020-02-11 22:46:23 PST
(In reply to Ryosuke Niwa from
comment #6
)
> _webView->_impl->page().hasRunningProcess() is still false after: > > _webView = [[WKWebView alloc] initWithFrame:[containerView bounds] > configuration:_configuration]
Of course, process doesn't come up till later
Ryosuke Niwa
Comment 8
2020-02-11 22:48:02 PST
(In reply to Tim Horton from
comment #7
)
> (In reply to Ryosuke Niwa from
comment #6
) > > _webView->_impl->page().hasRunningProcess() is still false after: > > > > _webView = [[WKWebView alloc] initWithFrame:[containerView bounds] > > configuration:_configuration] > > Of course, process doesn't come up till later
Right, but by this time, we've already asked WebContent process to be stared with the old configuration / parameters so new WebContent process ends up receiving the stale configuration / preferences when launched. Yet we never notify them of the preference / configuration change we made.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug