Implement optional arguments in AudioBufferSourceNode start() method
https://bugs.webkit.org/show_bug.cgi?id=100894

Reviewed by Kenneth Russell.

Source/WebCore:

The start() method should be able to take 1, 2, or 3 arguments, optionally supporting
offset and duration.  Currently, only 1 and 3 arguments are supported.

Test: webaudio/audiobuffersource-start.html

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::renderFromBuffer):
(WebCore::AudioBufferSourceNode::startGrain):
(WebCore):
* Modules/webaudio/AudioBufferSourceNode.h:
(AudioBufferSourceNode):
* Modules/webaudio/AudioBufferSourceNode.idl:

LayoutTests:

* webaudio/audiobuffersource-loop-comprehensive.html:
* webaudio/audiobuffersource-start-expected.txt: Added.
* webaudio/audiobuffersource-start.html: Added.
* webaudio/resources/audiobuffersource-testing.js: Added.
(createTestBuffer):
(checkSingleTest):
(checkAllTests):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Crash on html popup form control when element is deleted
https://bugs.webkit.org/show_bug.cgi?id=100869

Reviewed by Yong Li.

Make the element pointers RefPtr so they don't go away before the popup
is closed.

* WebCoreSupport/ColorPickerClient.h:
(ColorPickerClient):
* WebCoreSupport/DatePickerClient.h:
(DatePickerClient):
* WebCoreSupport/SelectPopupClient.h:
(SelectPopupClient):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
A JSC printf (support for %J+s and %b).
https://bugs.webkit.org/show_bug.cgi?id=100566.

Reviewed by Michael Saboff.

Source/JavaScriptCore: 

Added VMInspector::printf(), fprintf(), sprintf(), and snprintf().
- %b prints ints as boolean TRUE (non-zero) or FALSE (zero).
- %Js prints a WTF::String* like a %s prints a char*.
  Also works for 16bit WTF::Strings (prints wchar_t* using %S).
- '+' is a modifier meaning 'use verbose mode', and %J+s is an example
  of its use.

* JavaScriptCore.xcodeproj/project.pbxproj:
* interpreter/VMInspector.cpp:
(FormatPrinter):
(JSC::FormatPrinter::~FormatPrinter):
(JSC::FormatPrinter::print):
(JSC::FormatPrinter::printArg):
(JSC::FormatPrinter::printWTFString):
(JSC::FileFormatPrinter::FileFormatPrinter):
(JSC::FileFormatPrinter::printArg):
(JSC::StringFormatPrinter::StringFormatPrinter):
(JSC::StringFormatPrinter::printArg):
(JSC::StringNFormatPrinter::StringNFormatPrinter):
(JSC::StringNFormatPrinter::printArg):
(JSC::VMInspector::fprintf):
(JSC::VMInspector::printf):
(JSC::VMInspector::sprintf):
(JSC::VMInspector::snprintf):
* interpreter/VMInspector.h:
(VMInspector):

Source/WebCore: 

Added forwarding header for VMInspector.h.

No new tests needed for this.

* ForwardingHeaders/interpreter/VMInspector.h: Added.

Tools: 

Added regression tests for VMInspector::fprintf() sprintf() and snprintf().

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/JavaScriptCore: Added.
* TestWebKitAPI/Tests/JavaScriptCore/VMInspector.cpp: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Skipping http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.html. 
Not supported in CFNetwork yet. https://bugs.webkit.org/show_bug.cgi?id=100349.

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Skip another failing drag and drop test.
Drag & Drop doesn't work correctly in DRT <rdar://5621244>

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] Test that dynamically setting shape-inside causes relayout in child elements
https://bugs.webkit.org/show_bug.cgi?id=97721

Patch by Bear Travis <betravis@adobe.com> on 2012-10-31
Reviewed by Dirk Schulze.

Adding a test that dynamically sets shape-inside on a block containing multiple block children.

* fast/exclusions/resources/simple-rectangle.js:
(createRectangleTest): Modifying test to work with elements with existing content.
(createRectangleTestResult): Modifying test expectation to work with elements with existing content.
* fast/exclusions/shape-inside/shape-inside-multiple-blocks-dynamic-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-multiple-blocks-dynamic.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: add methods to support id-based backend APIs
https://bugs.webkit.org/show_bug.cgi?id=100425

Reviewed by Tony Chang.

Source/WebCore:

First half of refactor involves adding a number of methods that
are int64_t-based rather than String-based. As a part of this, the
IDB*Metadata structs and the backend objectStore/index maps all
use int64_t as keys, rather than String.

In addition, there were a number of cleanups that came out of the
refactor:

- The list of object stores active in a transaction is now
  maintained by the frontend IDBTransaction rather than the backend
  IDBTransactionBackendImpl. This also had a simplifying rippling
  effect through other call signatures.

- I was able to remove an apparently old FIXME from
  IDBTransactionBackendImpl::objectStore and replace it with an ASSERT.

- IDBObjectStoreBackendImpl's IndexWriter class got a little
  simpler since the id is now easily available in the
  IDBIndexMetadata.

- A number of methods got simpler in their int64_t versions,
  specifically dropping a number of ExceptionCodes.

There is also some glue code
(getIndexId/getIndexIds/getObjectStoreId) that will go away with
the 2nd half of this: https://bugs.webkit.org/show_bug.cgi?id=100425

No new tests, no new functionality as this is just a refactor.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::objectStoreNames):
(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::deleteObjectStore):
(WebCore::IDBDatabase::transaction):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::metadata):
(WebCore::IDBDatabaseBackendImpl::createObjectStore):
(WebCore::IDBDatabaseBackendImpl::objectStore):
(WebCore::IDBDatabaseBackendImpl::getObjectStoreId):
(WebCore):
(WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
(WebCore::IDBDatabaseBackendImpl::transaction):
(WebCore::IDBDatabaseBackendImpl::loadObjectStores):
(WebCore::IDBDatabaseBackendImpl::removeObjectStoreFromMap):
(WebCore::IDBDatabaseBackendImpl::addObjectStoreToMap):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
(IDBDatabaseBackendInterface):
* Modules/indexeddb/IDBIndex.h:
(WebCore::IDBIndex::id):
(WebCore::IDBIndex::openKeyCursor):
* Modules/indexeddb/IDBIndexBackendInterface.h:
* Modules/indexeddb/IDBMetadata.h:
(WebCore::IDBIndexMetadata::IDBIndexMetadata):
(IDBIndexMetadata):
(IDBObjectStoreMetadata):
(WebCore::IDBObjectStoreMetadata::containsIndex):
(IDBDatabaseMetadata):
(WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
(WebCore::IDBDatabaseMetadata::containsObjectStore):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::indexNames):
(WebCore::IDBObjectStore::put):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::deleteIndex):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::put):
(WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
(WebCore):
(WebCore::makeIndexWriters):
(WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
(WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
(WebCore::IDBObjectStoreBackendImpl::setIndexesReadyInternal):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::deleteInternal):
(WebCore::IDBObjectStoreBackendImpl::createIndex):
(WebCore::IDBObjectStoreBackendImpl::index):
(WebCore::IDBObjectStoreBackendImpl::getIndexId):
(WebCore::IDBObjectStoreBackendImpl::getIndexIds):
(WebCore::IDBObjectStoreBackendImpl::deleteIndex):
(WebCore::IDBObjectStoreBackendImpl::loadIndexes):
(WebCore::IDBObjectStoreBackendImpl::removeIndexFromMap):
(WebCore::IDBObjectStoreBackendImpl::addIndexToMap):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(IDBObjectStoreBackendImpl):
* Modules/indexeddb/IDBObjectStoreBackendInterface.h:
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::onUpgradeNeeded):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess):
(WebCore::IDBRequest::uncaughtExceptionInEventHandler):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::create):
(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::objectStore):
* Modules/indexeddb/IDBTransaction.h:
(IDBTransaction):
* Modules/indexeddb/IDBTransactionBackendImpl.cpp:
(WebCore::IDBTransactionBackendImpl::create):
(WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
(WebCore::IDBTransactionBackendImpl::objectStore):
(WebCore):
(WebCore::IDBTransactionBackendImpl::scheduleTask):
* Modules/indexeddb/IDBTransactionBackendImpl.h:
(IDBTransactionBackendImpl):
* Modules/indexeddb/IDBTransactionBackendInterface.h:

Source/WebKit/chromium:

Chromium Proxy and WebIDB* support for new int64_t-based methods.

* public/WebIDBDatabase.h:
(WebKit::WebIDBDatabase::deleteObjectStore):
(WebKit::WebIDBDatabase::transaction):
* public/WebIDBObjectStore.h:
(WebKit::WebIDBObjectStore::put):
(WebKit::WebIDBObjectStore::setIndexKeys):
(WebKit::WebIDBObjectStore::setIndexesReady):
(WebKit::WebIDBObjectStore::index):
(WebKit::WebIDBObjectStore::deleteIndex):
* public/WebIDBTransaction.h:
(WebKit::WebIDBTransaction::objectStore):
* src/IDBDatabaseBackendProxy.cpp:
(WebKit::IDBDatabaseBackendProxy::deleteObjectStore):
(WebKit):
(WebKit::IDBDatabaseBackendProxy::transaction):
* src/IDBDatabaseBackendProxy.h:
(IDBDatabaseBackendProxy):
* src/IDBObjectStoreBackendProxy.cpp:
(WebKit::IDBObjectStoreBackendProxy::put):
(WebKit):
(WebKit::IDBObjectStoreBackendProxy::setIndexKeys):
(WebKit::IDBObjectStoreBackendProxy::setIndexesReady):
(WebKit::IDBObjectStoreBackendProxy::index):
(WebKit::IDBObjectStoreBackendProxy::deleteIndex):
* src/IDBObjectStoreBackendProxy.h:
(IDBObjectStoreBackendProxy):
* src/IDBTransactionBackendProxy.cpp:
(WebKit::IDBTransactionBackendProxy::objectStore):
* src/IDBTransactionBackendProxy.h:
(IDBTransactionBackendProxy):
* src/WebIDBMetadata.cpp:
(WebKit::WebIDBMetadata::WebIDBMetadata):
(WebKit::WebIDBMetadata::operator IDBDatabaseMetadata):
* src/WebIDBTransactionImpl.cpp:
(WebKit::WebIDBTransactionImpl::objectStore):
(WebKit):
* src/WebIDBTransactionImpl.h:
* tests/IDBDatabaseBackendTest.cpp:


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