IndexedDB: Implement custom bindings for parsing options
https://bugs.webkit.org/show_bug.cgi?id=96614

Patch by Michael Pruett <michael@68k.org> on 2012-12-18
Reviewed by Darin Adler.

Parsing the options dictionary in IDBDatabase.createObjectStore()
and IDBObjectStore.createIndex() requires custom bindings in JSC.

Tests: storage/indexeddb/*

* GNUmakefile.list.am:
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore):
(WebCore):
* Modules/indexeddb/IDBDatabase.h:
(IDBDatabase):
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):
(WebCore):
* Modules/indexeddb/IDBObjectStore.h:
(IDBObjectStore):
* Modules/indexeddb/IDBObjectStore.idl:
* UseJSC.cmake:
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::idbKeyPathFromValue): Added utility function for converting a JSValue to an IDBKeyPath.
(WebCore):
* bindings/js/IDBBindingUtilities.h:
(WebCore):
* bindings/js/JSIDBDatabaseCustom.cpp: Added.
(WebCore):
(WebCore::JSIDBDatabase::createObjectStore):
* bindings/js/JSIDBObjectStoreCustom.cpp: Added.
(WebCore):
(WebCore::JSIDBObjectStore::createIndex):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] pull in the CDM module recently added to media
https://bugs.webkit.org/show_bug.cgi?id=105360

Unreiviewed build fix, but sanity checked by ddorwin.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
EventSource should support CORS
https://bugs.webkit.org/show_bug.cgi?id=61862

Patch by Per-Erik Brodin <per-erik.brodin@ericsson.com> on 2012-12-18
Reviewed by Alexey Proskuryakov.

Source/WebCore:

Enabled CORS in EventSource with optional constructor argument to
indicate whether credentials should be included or not, as per the spec.
Added didFailAccessControlCheck to ThreadableLoaderClient to be able to
properly distinguish CORS failures from other errors.

Tests: http/tests/eventsource/eventsource-cors-basic.html
       http/tests/eventsource/eventsource-cors-no-server.html
       http/tests/eventsource/eventsource-cors-with-credentials.html

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::preflightFailure):
* loader/ThreadableLoaderClient.h:
(WebCore::ThreadableLoaderClient::didFailAccessControlCheck):
* loader/ThreadableLoaderClientWrapper.h:
(WebCore::ThreadableLoaderClientWrapper::didFailAccessControlCheck):
(ThreadableLoaderClientWrapper):
* loader/WorkerThreadableLoader.cpp:
(WebCore::workerContextDidFailAccessControlCheck):
(WebCore):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
* loader/WorkerThreadableLoader.h:
(MainThreadBridge):
* page/EventSource.cpp:
(WebCore::EventSource::EventSource):
(WebCore::EventSource::create):
(WebCore::EventSource::connect):
(WebCore::EventSource::withCredentials):
(WebCore):
(WebCore::EventSource::didReceiveResponse):
(WebCore::EventSource::didFailAccessControlCheck):
(WebCore::EventSource::didFailRedirectCheck):
(WebCore::EventSource::abortConnectionAttempt):
(WebCore::EventSource::parseEventStreamLine):
(WebCore::EventSource::createMessageEvent):
* page/EventSource.h:
(WebCore):
(EventSource):
(WebCore::EventSource::refEventTarget):
(WebCore::EventSource::derefEventTarget):
* page/EventSource.idl:

LayoutTests:

Added new CORS tests for EventSource. Modified existing test to verify
that the new constructor argument can be passed to the constructor.

* fast/eventsource/eventsource-constructor-expected.txt:
* fast/eventsource/eventsource-constructor.html:
* fast/js/constructor-length.html:
* http/tests/eventsource/eventsource-cors-basic-expected.txt: Added.
* http/tests/eventsource/eventsource-cors-basic.html: Added.
* http/tests/eventsource/eventsource-cors-no-server-expected.txt: Added.
* http/tests/eventsource/eventsource-cors-no-server.html: Added.
* http/tests/eventsource/eventsource-cors-with-credentials-expected.txt: Added.
* http/tests/eventsource/eventsource-cors-with-credentials.html: Added.
* http/tests/eventsource/resources/es-cors-basic.php: Added.
* http/tests/eventsource/resources/es-cors-credentials.php: Added.
* platform/blackberry/fast/js/constructor-length-expected.txt:
* platform/chromium/fast/js/constructor-length-expected.txt:
* platform/gtk/fast/js/constructor-length-expected.txt:
* platform/mac/fast/js/constructor-length-expected.txt:
* platform/qt/fast/js/constructor-length-expected.txt:

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