[GTK] Add API to set a TLS errors policy to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=104482

Reviewed by Martin Robinson.

Source/WebCore:

* platform/network/soup/ResourceError.h:
(WebCore::ResourceError::setTLSErrors): Set the TLS error flags.
(WebCore::ResourceError::setCertificate): Set the certificate.
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::ResourceError::tlsError): Set the given TLS errors and
certificate to the ResourceError.
(WebCore::ResourceError::platformCopy): Copy also the TLS errors
and the certificate.
(WebCore::ResourceError::platformCompare): Compare also the TLS
errors.

Source/WebKit2:

Add an emum for TLS errors policy with values IGNORE and FAIL and
API to WebKitWebContext to set/get the policy.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Encode ignoreTLSErrors.
(WebKit::WebProcessCreationParameters::decode): Decode ignoreTLSErrors.
* Shared/WebProcessCreationParameters.h:
(WebProcessCreationParameters): Add ignoreTLSErrors when building
with soup network backend.
* Shared/soup/PlatformCertificateInfo.cpp:
(WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Add a
constructor that receives a ResourceError.
* Shared/soup/PlatformCertificateInfo.h:
* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(CoreIPC::::encodePlatformData): Encode the
PlatformCertificateInfo as part for the ResourceError.
(CoreIPC::::decodePlatformData): Decode the
PlatformCertificateInfo and set certificate and TLS errors in the
ResourceError.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(didFailProvisionalLoadWithErrorForFrame): Call
webkitWebViewLoadFailedWithTLSErrors() if the load failed due to
TLS errors.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(_WebKitWebContextPrivate): Add tlsErrorsPolicy member.
(createDefaultWebContext): Initiales tlsErrorsPolicy.
(webkit_web_context_set_tls_errors_policy): Set the TLS errors
policy notify WebContext to ignore TLS errors or not.
(webkit_web_context_get_tls_errors_policy): Return the current TLS
errors policy.
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewLoadFailedWithTLSErrors): Finish the load with an
error if the TLS errors policy is FAIL.
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/tests/TestSSL.cpp:
(testTLSErrorsPolicy):
(beforeAll):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext): Initialize m_ignoreTLSErrors.
* UIProcess/WebContext.h:
(WebContext): Add m_ignoreTLSErrors member.
(WebKit::WebContext::ignoreTLSErrors): Return m_ignoreTLSErrors.
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformInitializeWebProcess): Set
ignoreTLSErrors parameter.
(WebKit::WebContext::setIgnoreTLSErrors): Send SetIgnoreTLSErrors
message to the web process.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformInitializeWebProcess): Set
ignoreTLSErrors parameter.
(WebKit::WebContext::setIgnoreTLSErrors): Send SetIgnoreTLSErrors
message to the web process.
(WebKit):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl): Remove the call to
ResourceHandle::setIgnoreSSLErrors().
* WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMainGtk): Remove the call to
ResourceHandle::setIgnoreSSLErrors().
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::setIgnoreTLSErrors): Call
ResourceHandle::setIgnoreSSLErrors().
(WebKit):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Block level pseudo elements bleed background color to <html>
https://bugs.webkit.org/show_bug.cgi?id=104855

Patch by Elliott Sprehn <esprehn@gmail.com> on 2012-12-20
Reviewed by Julien Chaffraix.

Before r137336 placing a pseudo element :before or :after that was display
block on the <html> element would also set the background color of the
root of the document.

This was because RenderObject::isRoot checked if document()->documentElement() == m_node,
which was true for html:before or html:after with the old implementation
of generated content. Instead it should have compared against node() which
would have compensated for the anonymous generated content.

This is fixed by the new generated content implementation that was turned
on in r137336 because m_node is now the PseudoElement, not the generatingNode.

* fast/css-generated-content/html-pseudo-background-color-expected.html: Added.
* fast/css-generated-content/html-pseudo-background-color.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138274 268f45cc-cd09-0410-ab3c-d52691b4dbfc