Bug 45998

Summary: Make certificate data available to the WKFrameRef after it is committed
Product: WebKit Reporter: Sam Weinig <sam>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ossy, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch andersca: review+

Description Sam Weinig 2010-09-17 14:31:38 PDT
We should make certificate data available to the WKFrameRef after it is committed.
Comment 1 Sam Weinig 2010-09-17 14:35:03 PDT
Created attachment 67952 [details]
Patch
Comment 2 WebKit Review Bot 2010-09-17 14:38:25 PDT
Attachment 67952 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebKit2/Shared/mac/PlatformCertificateInfo.h:33:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
WebKit2/UIProcess/API/C/WKCertificateInfo.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKit2/UIProcess/API/C/WKCertificateInfo.cpp:29:  Alphabetical sorting problem.  [build/include_order] [4]
WebKit2/UIProcess/API/C/WKAPICast.h:70:  More than one command on the same line  [whitespace/newline] [4]
WebKit2/UIProcess/API/C/WKAPICast.h:102:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 5 in 25 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Anders Carlsson 2010-09-17 16:45:03 PDT
Comment on attachment 67952 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=67952&action=prettypatch

Looks good otherwise!

> WebKit2/ChangeLog:18
> +

comma instead of period here (unless you forgot to type something here)

> WebKit2/WebKit2.pro:377
> +    WebProcess/WebCoreSupport/qt/'sQt.cpp \

This looks wrong :)

> WebKit2/Shared/APIObject.h:37
> +        TypeNull = 0,

No need for this.

> WebKit2/Shared/WebCertificateInfo.h:45
> +    void setPlatformCertificateInfo(const PlatformCertificateInfo& info) { m_platformCertificateInfo = info; }

Maybe we should make WebCertificatInfo immutable and just replace the entire object instead?

> WebKit2/Shared/mac/PlatformCertificateInfo.h:51
> +

Please put this inside #ifndef NDEBUG

> WebKit2/Shared/mac/PlatformCertificateInfo.mm:47
> +{

Same here.

> WebKit2/Shared/mac/PlatformCertificateInfo.mm:61
> +        encoder->encodeBool(false);

I think you can use a numeric_limits<uint64>::max() to indicate an empty list instead (that's what we do for strings).

> WebKit2/Shared/mac/PlatformCertificateInfo.mm:77
> +    printf("PlatformCertificateInfo::encode Total Size %d", (int)totalSize);

Remove this.

> WebKit2/Shared/qt/PlatformCertificateInfo.h:41
> +    PlatformCertificateInfo(const WebCore::ResourceResponse&)

Make this constructor explicit.

> WebKit2/Shared/win/PlatformCertificateInfo.h:41
> +    PlatformCertificateInfo(const WebCore::ResourceResponse&)

Make this constructor explicit.

> WebKit2/UIProcess/WebFrameProxy.cpp:41
> +    , m_certificateInfo(WebCertificateInfo::create())

Could we initialize this lazily?

> WebKit2/UIProcess/WebFrameProxy.h:77
> +    void setPlatformCertificateInfo(const PlatformCertificateInfo&);

I think it would be better if setPlatformCertificatInfo actually took a PassRefPtr<WebCertificateInfo>
Comment 4 Sam Weinig 2010-09-17 17:20:52 PDT
Landed in http://trac.webkit.org/changeset/67760.
Comment 5 Csaba Osztrogonác 2010-09-20 07:05:56 PDT
(In reply to comment #4)
> Landed in http://trac.webkit.org/changeset/67760.

And an unreviewed buildfix landed in http://trac.webkit.org/changeset/67763.