WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
222945
Preferences do not need to be passed to the WebProcess via WebPageCreationParameters since the store already is
https://bugs.webkit.org/show_bug.cgi?id=222945
Summary
Preferences do not need to be passed to the WebProcess via WebPageCreationPar...
Sam Weinig
Reported
2021-03-08 15:38:06 PST
Preferences do not need to be passed to the WebProcess via WebPageCreationParameters since the store already is
Attachments
Patch
(18.72 KB, patch)
2021-03-08 15:46 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(18.72 KB, patch)
2021-03-09 08:46 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Patch
(15.28 KB, patch)
2021-03-09 16:24 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2021-03-08 15:46:09 PST
Comment hidden (obsolete)
Created
attachment 422628
[details]
Patch
Sam Weinig
Comment 2
2021-03-09 08:46:11 PST
Created
attachment 422707
[details]
Patch
Alex Christensen
Comment 3
2021-03-09 13:52:13 PST
Comment on
attachment 422707
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=422707&action=review
> Source/WebKit/UIProcess/WebPageProxy.cpp:-7988 > - parameters.httpsUpgradeEnabled = preferences().upgradeKnownHostsToHTTPSEnabled() ? m_configuration->httpsUpgradeEnabled() : false;
This is not equivalent to its replacement. This uses the value from WKWebViewConfiguration only if the preference is on, which allows you to turn off the feature with the internal preference but by default it will use the value from WKWebViewConfiguration.
> Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:554 > + pageConfiguration->preferences()->setUpgradeKnownHostsToHTTPSEnabled(!![_configuration upgradeKnownHostsToHTTPS]);
This always uses the value from WKWebViewConfiguration, which Simon is about to discover breaks his internal performance benchmark.
Sam Weinig
Comment 4
2021-03-09 14:03:21 PST
(In reply to Alex Christensen from
comment #3
)
> Comment on
attachment 422707
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=422707&action=review
> > > Source/WebKit/UIProcess/WebPageProxy.cpp:-7988 > > - parameters.httpsUpgradeEnabled = preferences().upgradeKnownHostsToHTTPSEnabled() ? m_configuration->httpsUpgradeEnabled() : false; > > This is not equivalent to its replacement. This uses the value from > WKWebViewConfiguration only if the preference is on, which allows you to > turn off the feature with the internal preference but by default it will use > the value from WKWebViewConfiguration. > > > Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:554 > > + pageConfiguration->preferences()->setUpgradeKnownHostsToHTTPSEnabled(!![_configuration upgradeKnownHostsToHTTPS]); > > This always uses the value from WKWebViewConfiguration, which Simon is about > to discover breaks his internal performance benchmark.
Ah right, this needs to follow the mediaDevicesEnabled model. if (pageConfiguration->preferences().upgradeKnownHostsToHTTPSEnabled()) pageConfiguration->preferences()->setUpgradeKnownHostsToHTTPSEnabled(!![_configuration upgradeKnownHostsToHTTPS]); We should probably do that for a few others. I'll add a test for this.
Sam Weinig
Comment 5
2021-03-09 14:18:03 PST
The whole concept of having something on the configuration is supposed to mean it is immutable, but if you also make it a preference, things get really weird, and don't really make sense. We should really try to avoid that whenever we can. In reality, what this "internal feature" really is is "force disable upgradeKnownHostsToHTTPS", so perhaps the cleanest way to model this would be with two preferences, one for mapping the configuration state, and one for mapping the preferences state, annoying as that is. What a mess.
Sam Weinig
Comment 6
2021-03-09 15:01:09 PST
I filed
https://bugs.webkit.org/show_bug.cgi?id=222999
to actually rationalize this stuff.
Sam Weinig
Comment 7
2021-03-09 16:24:08 PST
Created
attachment 422775
[details]
Patch
Sam Weinig
Comment 8
2021-03-09 16:24:34 PST
This version is a bit scaled back while I work out a general solution for the configuration / preference fiasco.
EWS
Comment 9
2021-03-09 19:13:01 PST
Committed
r274192
: <
https://commits.webkit.org/r274192
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 422775
[details]
.
Radar WebKit Bug Importer
Comment 10
2021-03-09 19:14:16 PST
<
rdar://problem/75246653
>
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