DFG property access stubs should use structure transition watchpoints
https://bugs.webkit.org/show_bug.cgi?id=91135

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

This adds a Watchpoint subclass that will clear a structure stub (i.e.
a property access stub) when fired. The DFG stub generation code now
uses this optimization.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::resetStub):
(JSC::CodeBlock::resetStubInternal):
* bytecode/CodeBlock.h:
(JSC):
(CodeBlock):
* bytecode/StructureStubClearingWatchpoint.cpp: Added.
(JSC):
(JSC::StructureStubClearingWatchpoint::~StructureStubClearingWatchpoint):
(JSC::StructureStubClearingWatchpoint::push):
(JSC::StructureStubClearingWatchpoint::fireInternal):
(JSC::WatchpointsOnStructureStubInfo::~WatchpointsOnStructureStubInfo):
(JSC::WatchpointsOnStructureStubInfo::addWatchpoint):
(JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint):
* bytecode/StructureStubClearingWatchpoint.h: Added.
(JSC):
(StructureStubClearingWatchpoint):
(JSC::StructureStubClearingWatchpoint::StructureStubClearingWatchpoint):
(WatchpointsOnStructureStubInfo):
(JSC::WatchpointsOnStructureStubInfo::WatchpointsOnStructureStubInfo):
(JSC::WatchpointsOnStructureStubInfo::codeBlock):
(JSC::WatchpointsOnStructureStubInfo::stubInfo):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::reset):
(JSC::StructureStubInfo::addWatchpoint):
(StructureStubInfo):
* dfg/DFGRepatch.cpp:
(JSC::DFG::addStructureTransitionCheck):
(DFG):
(JSC::DFG::generateProtoChainAccessStub):
(JSC::DFG::emitPutTransitionStub):
* jit/JumpReplacementWatchpoint.h:

LayoutTests: 

* fast/js/dfg-proto-stub-watchpoint-fire-expected.txt: Added.
* fast/js/dfg-proto-stub-watchpoint-fire.html: Added.
* fast/js/script-tests/dfg-proto-stub-watchpoint-fire.js: Added.
(A):
(B):
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CodeGeneratorJS.pm need to handle the attribute which has "CallWith=ScriptExecutionContext" option.
https://bugs.webkit.org/show_bug.cgi?id=91185

Patch by Dongwoo Im <dw.im@samsung.com> on 2012-07-12
Reviewed by Kentaro Hara.

When an attribute has "CallWith=ScriptExecutionContext" option, 'ScriptExecutionContext*' parameter should be the last parameter.

No new tests. Covered by existing tests.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
RadioNodeList is not updated upon input type change
https://bugs.webkit.org/show_bug.cgi?id=91178

Reviewed by Alexey Proskuryakov.

Source/WebCore: 

Invalidate the radio node lists when type content attribute changes since it excludes
image type input elements.

Test: fast/forms/radionodelist-image-type.html

* dom/Document.cpp:
(WebCore::shouldInvalidateNodeListForType):
* dom/Document.h: Renamed InvalidateOnIdNameForAttrChange to InvalidateOnFormAttrChange
since listing all attribute name isn't useful at this point.
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):

LayoutTests: 

Add a regression test.

* fast/forms/radionodelist-image-type-expected.txt: Added.
* fast/forms/radionodelist-image-type.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add API to get HTTPS status to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=91100

Reviewed by Martin Robinson.

Source/WebCore:

* platform/network/soup/ResourceResponse.h:
(WebCore::ResourceResponse::soupMessageCertificate): Return the
certificate.
(WebCore::ResourceResponse::setSoupMessageCertificate): Set a
certificate.
(WebCore::ResourceResponse::soupMessageTLSErrors): Return the TLS
errors.
(WebCore::ResourceResponse::setSoupMessageTLSErrors): Set TLS
errors.
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::toSoupMessage): Set the certificate
and TLS errors to the newly created SoupMessage.
(WebCore::ResourceResponse::updateFromSoupMessage): Get the
certificate and TLS errors from the SoupMessage.

Source/WebKit2:

Add webkit_uri_response_get_https_status() to return
GTlsCertificate and GTlsCertificateFlags with information about
the SSL certificate and the possible errors with the certificate.

* GNUmakefile.list.am: Add new files to compilation.
* PlatformEfl.cmake: Ditto.
* Shared/efl/PlatformCertificateInfo.h: Removed.
* Shared/soup/PlatformCertificateInfo.cpp: Added.
(WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
(WebKit::PlatformCertificateInfo::~PlatformCertificateInfo):
(WebKit::PlatformCertificateInfo::encode): Encode the
GTlsCertificate and GTlsCertificateFlags.
(WebKit::PlatformCertificateInfo::decode): Decode
PlatformCertificateInfo into a GTlsCertificate and GTlsCertificateFlags.
* Shared/soup/PlatformCertificateInfo.h: Renamed from Source/WebKit2/Shared/gtk/PlatformCertificateInfo.h.
(WebKit::PlatformCertificateInfo::certificate): Return the certificate.
(WebKit::PlatformCertificateInfo::tlsErrors): Return the TLS errors
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(didCommitLoadForFrame): Set the certificate of the current frame
to the response of the main resource.
* UIProcess/API/gtk/WebKitURIResponse.cpp:
(webkit_uri_response_get_https_status): Return GTlsCertificate and
GTlsCertificateFlags.
(webkitURIResponseSetCertificateInfo): Update the internal
ResourceResponse with the GTlsCertificate and GTlsCertificateFlags
of the given PlatformCertificateInfo.
* UIProcess/API/gtk/WebKitURIResponse.h:
* UIProcess/API/gtk/WebKitURIResponsePrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
* UIProcess/API/gtk/tests/GNUmakefile.am:
* UIProcess/API/gtk/tests/TestMain.h:
(Test::getResourcesDir): Helper function to get the resources
directory of the WebKit2 API tests.
* UIProcess/API/gtk/tests/TestSSL.cpp: Added.
(testSSL):
(serverCallback):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/tests/WebKitTestServer.cpp:
(WebKitTestServer::WebKitTestServer): Add support por SSL test
servers.
* UIProcess/API/gtk/tests/WebKitTestServer.h:
(WebKitTestServer): Add ssl parameter to create a HTTPS server.
* UIProcess/API/gtk/tests/resources/test-cert.pem: Added.
* UIProcess/API/gtk/tests/resources/test-key.pem: Added.

Source/WTF:

Add support for GByteArray.

* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr):
(WTF):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
(WTF):
* wtf/gobject/GTypedefs.h:

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