[GTK] Add WebKit2 API for TLS errors
https://bugs.webkit.org/show_bug.cgi?id=120160

Patch by Brian Holt <brian.holt@samsung.com> on 2013-10-22
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Added a new constructor for CertificateInfo under Soup.

* platform/network/CertificateInfo.h:
* platform/network/soup/CertificateInfoSoup.cpp:
(WebCore::CertificateInfo::CertificateInfo): New constructor using
GTlsCertificateFlags and GTlsCertificate.

Source/WebKit2:

Add a new signal load-failed-with-tls-errors that is emitted with
a WebKitCertificateInfo boxed type to allow users to deal with TLS
errors. A new API is exposed in WebKitWebContext to allow
exceptions for TLS errors on a given host.

* GNUmakefile.list.am:
* PlatformGTK.cmake:
* UIProcess/API/gtk/WebKitCertificateInfo.cpp: Added.
(webkitCertificateInfoGetCertificateInfo):
(webkit_certificate_info_copy):
(webkit_certificate_info_free):
(webkit_certificate_info_get_tls_certificate):
(webkit_certificate_info_get_tls_errors):
* UIProcess/API/gtk/WebKitCertificateInfo.h: Added.
* UIProcess/API/gtk/WebKitCertificateInfoPrivate.h: Added.
(_WebKitCertificateInfo::_WebKitCertificateInfo):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_allow_tls_certificate_for_host): Support TLS
exceptions for a given host.
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init): Added new signal.
(webkitWebViewLoadFailedWithTLSErrors): Emit new signal with
WebKitCertificateInfo and host.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/docs/webkit2gtk.types:
* UIProcess/API/gtk/tests/TestSSL.cpp:
(testLoadFailedWithTLSErrors):
(httpsServerCallback):
(beforeAll): Added new test.
* UIProcess/API/gtk/webkit2.h:
* UIProcess/API/gtk/webkit2marshal.list:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::allowSpecificHTTPSCertificateForHost): Send
message to WebProcess to allow a certificate and host pair.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: New message to tell
WebProcess to allow a specific TLS certificate for a given host.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::allowSpecificHTTPSCertificateForHost): Allow
certificate and host pair.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introduce ACCESSIBILITY_OBJECT_TYPE_CASTS to replace manual toFoo() in accessibility child class
https://bugs.webkit.org/show_bug.cgi?id=123140

Reviewed by Andreas Kling.

As a step to let toFoo use TYPE_CASTS_BASE, DEFINE_TYPE_CASTS can be used for toFoo() in accessibility
child class. The DEFINE_TYPE_CASTS will generate plenty more helper functions for accessibility type cast.

No new tests, no behavior changes.

* accessibility/AccessibilityList.h:
* accessibility/AccessibilityMenuList.h:
* accessibility/AccessibilityMockObject.h:
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilitySVGRoot.h:
* accessibility/AccessibilityScrollView.h:
* accessibility/AccessibilitySpinButton.h:
* accessibility/AccessibilityTable.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove some unnecessary null checks in RenderElement::setStyle().
<https://webkit.org/b/123146>

After assigning the new style to RenderElement::m_style, we know that
it'll be non-null, so remove all the checking for this.

Reviewed by Antti Koivisto.


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