RESOLVED FIXED 207067
Add KVO SPI WKWebView._negotiatedLegacyTLS
https://bugs.webkit.org/show_bug.cgi?id=207067
Summary Add KVO SPI WKWebView._negotiatedLegacyTLS
Alex Christensen
Reported 2020-01-31 13:30:45 PST
Add KVO SPI WKWebView._negotiatedLegacyTLS
Attachments
patch (23.30 KB, patch)
2020-01-31 13:33 PST, Alex Christensen
no flags
patch (23.30 KB, patch)
2020-01-31 14:01 PST, Alex Christensen
no flags
patch with SPI documentation. (23.54 KB, patch)
2020-01-31 14:12 PST, Alex Christensen
no flags
Patch (24.19 KB, patch)
2020-01-31 14:32 PST, Alex Christensen
no flags
Alex Christensen
Comment 1 2020-01-31 13:33:31 PST
Radar WebKit Bug Importer
Comment 2 2020-01-31 13:37:12 PST
Alex Christensen
Comment 3 2020-01-31 14:01:16 PST
Alex Christensen
Comment 4 2020-01-31 14:12:49 PST
Created attachment 389413 [details] patch with SPI documentation.
Andy Estes
Comment 5 2020-01-31 14:28:00 PST
Comment on attachment 389413 [details] patch with SPI documentation. View in context: https://bugs.webkit.org/attachment.cgi?id=389413&action=review > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:820 > + auto tlsVersion = (tls_protocol_version_t)metrics.negotiatedTLSProtocolVersion.unsignedShortValue; reinterpret_cast? > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:821 > + if (tlsVersion == tls_protocol_version_TLSv10 || tlsVersion == tls_protocol_version_TLSv11) `tlsVersion < tls_protocol_version_TLSv12`? > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:828 > + if (tlsVersion == kTLSProtocol11 || tlsVersion == kTLSProtocol1) Ditto? > Source/WebKit/UIProcess/PageLoadState.h:226 > + double estimatedProgress { 0.0 }; Our style is to just use 0 here.
Alex Christensen
Comment 6 2020-01-31 14:32:04 PST
(In reply to Andy Estes from comment #5) > Comment on attachment 389413 [details] > patch with SPI documentation. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=389413&action=review > > > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:820 > > + auto tlsVersion = (tls_protocol_version_t)metrics.negotiatedTLSProtocolVersion.unsignedShortValue; > > reinterpret_cast? Sounds good. > > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:821 > > + if (tlsVersion == tls_protocol_version_TLSv10 || tlsVersion == tls_protocol_version_TLSv11) > > `tlsVersion < tls_protocol_version_TLSv12`? > > > Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:828 > > + if (tlsVersion == kTLSProtocol11 || tlsVersion == kTLSProtocol1) > > Ditto? Strangely enough, we only want to do that with these two particular protocols here. > > Source/WebKit/UIProcess/PageLoadState.h:226 > > + double estimatedProgress { 0.0 }; > > Our style is to just use 0 here. I think you're right, even though I think we should change our style in this wonderfully statically-typed language with typed literals. I'll change to 0.
Alex Christensen
Comment 7 2020-01-31 14:32:58 PST
Alex Christensen
Comment 8 2020-01-31 14:34:09 PST
Also of note: we use c-style casts heavily in WebKit's ObjC++ code. Maybe we should go through and change them all to c++-style casts.
WebKit Commit Bot
Comment 9 2020-01-31 15:16:52 PST
Comment on attachment 389416 [details] Patch Clearing flags on attachment: 389416 Committed r255522: <https://trac.webkit.org/changeset/255522>
WebKit Commit Bot
Comment 10 2020-01-31 15:16:54 PST
All reviewed patches have been landed. Closing bug.
Andy Estes
Comment 11 2020-01-31 15:36:13 PST
(In reply to Alex Christensen from comment #8) > Also of note: we use c-style casts heavily in WebKit's ObjC++ code. Maybe > we should go through and change them all to c++-style casts. I think our rule (or at least the rule I follow) is to use a C-style cast for Objective-C and CF types (e.g., (__bridge CFSStringRef)@"hello") and C++-style casts otherwise. Or perhaps more generally, use C++ casts for the code that caused you to create the .mm file and C-style casts otherwise.
Alex Christensen
Comment 12 2020-02-03 14:05:16 PST
Note You need to log in before you can comment on or make changes to this bug.