| Summary: | Add KVO SPI WKWebView._negotiatedLegacyTLS | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||||||
| Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | aestes, commit-queue, thorton, webkit-bug-importer | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Alex Christensen
2020-01-31 13:30:45 PST
Created attachment 389403 [details]
patch
Created attachment 389412 [details]
patch
Created attachment 389413 [details]
patch with SPI documentation.
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. (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. Created attachment 389416 [details]
Patch
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. Comment on attachment 389416 [details] Patch Clearing flags on attachment: 389416 Committed r255522: <https://trac.webkit.org/changeset/255522> All reviewed patches have been landed. Closing bug. (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. https://trac.webkit.org/changeset/255527/webkit was a build fix after this. |