IndexedDB: Migrate backend ObjectStore calls to use transaction id
https://bugs.webkit.org/show_bug.cgi?id=102741

Reviewed by Tony Chang.

Source/WebCore:

Fully migrate 8 core data calls (get, put, setIndexKeys, setIndexesReady,
openCursor, count, deleteRange, and clear) into IDBDatabaseBackendImpl,
combining common code from IDBObjectStoreBackendImpl and IDBIndexBackendImpl
in order to simplify the backend interface. These calls are now
implemented in terms of an int64_t-based transactionId rather than
an IDBTransactionBackendInterface, which simplifies the ownership model
between the frontend and the backend.

In addition, remove references to IDBObjectStoreBackend* from IDBIndex,
as it is no longer needed.

A few duplicate IDB_TRACE methods have been removed from wrapper methods
that call another method that already have IDB_TRACE's.

Finally, IDBCursorBackendImpl now no longer holds onto an
IDBObjectStoreBackendImpl*, so its destruction and member variables are
simplified, and reordered to match proper destruction order.

* Modules/indexeddb/IDBCursorBackendImpl.cpp: Reordered to account for proper destruction.
(WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
(WebCore::IDBCursorBackendImpl::~IDBCursorBackendImpl):
(WebCore::IDBCursorBackendImpl::deleteFunction):
* Modules/indexeddb/IDBCursorBackendImpl.h:
(WebCore::IDBCursorBackendImpl::create):
(IDBCursorBackendImpl):
* Modules/indexeddb/IDBDatabase.h:
(WebCore::IDBDatabase::backend):
(IDBDatabase):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(GetOperation): Combined from IDBObjectStoreBackendImpl/IDBIndexBackendImpl::*RetrievalOperation
(WebCore::GetOperation::create):
(WebCore::GetOperation::GetOperation):
(WebCore):
(PutOperation): Combined from IDBObjectStoreBackendImpl/IDBIndexBackendImpl::*StorageOperation.
(WebCore::PutOperation::create):
(WebCore::PutOperation::PutOperation):
(SetIndexesReadyOperation): Moved from IDBObjectStoreBackendImpl::IndexesReadyOperation
(WebCore::SetIndexesReadyOperation::create):
(WebCore::SetIndexesReadyOperation::SetIndexesReadyOperation):
(OpenCursorOperation): Combined from IDBObjectStoreBackendImpl/IDBIndexBackendImpl::Open*CursorOperation
(WebCore::OpenCursorOperation::create):
(WebCore::OpenCursorOperation::OpenCursorOperation):
(CountOperation): Combined from IDBObjectStoreBackendImpl/IDBIndexBackendImpl::CountOperation
(WebCore::CountOperation::create):
(WebCore::CountOperation::CountOperation):
(DeleteRangeOperation): Moved from IDBObjectStoreBackendImpl::DeleteOperation
(WebCore::DeleteRangeOperation::create):
(WebCore::DeleteRangeOperation::DeleteRangeOperation):
(ClearOperation): Moved from IDBObjectStoreBackendImpl::ClearOperation
(WebCore::ClearOperation::create):
(WebCore::ClearOperation::ClearOperation):
(WebCore::IDBDatabaseBackendImpl::get): Combined from IDBObjectStoreBackendImpl/IDBIndexBackendImpl::get*
(WebCore::GetOperation::perform):
(WebCore::IDBDatabaseBackendImpl::put): Moved from IDBObjectStoreBackendImpl::put
(WebCore::PutOperation::perform):
(WebCore::IDBDatabaseBackendImpl::setIndexKeys): Moved from IDBObjectStoreBackendImpl::setIndexKeys
(WebCore::IDBDatabaseBackendImpl::setIndexesReady):
(WebCore::SetIndexesReadyOperation::perform):
(WebCore::IDBDatabaseBackendImpl::openCursor):
(WebCore::IDBDatabaseBackendImpl::count):
(WebCore::CountOperation::perform):
(WebCore::IDBDatabaseBackendImpl::deleteRange):
(WebCore::DeleteRangeOperation::perform):
(WebCore::IDBDatabaseBackendImpl::clear):
(WebCore::ClearOperation::perform):
(WebCore::OpenCursorOperation::perform):
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::IDBIndex):
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::getKey):
(WebCore::IDBIndex::backendDB):
(WebCore):
* Modules/indexeddb/IDBIndex.h:
(WebCore::IDBIndex::create):
(IDBIndex):
* Modules/indexeddb/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
* Modules/indexeddb/IDBIndexBackendImpl.h:
(WebCore::IDBIndexBackendImpl::create):
(WebCore::IDBIndexBackendImpl::openCursor):
(WebCore::IDBIndexBackendImpl::count):
(WebCore::IDBIndexBackendImpl::openKeyCursor):
(WebCore::IDBIndexBackendImpl::get):
(WebCore::IDBIndexBackendImpl::getKey):
(IDBIndexBackendImpl):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::put):
(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::clear):
(WebCore):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::count):
(WebCore::IDBObjectStore::backendDB):
* Modules/indexeddb/IDBObjectStore.h:
(WebCore::IDBObjectStore::id):
(IDBObjectStore):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::createIndex):
(WebCore::IDBObjectStoreBackendImpl::loadIndexes):
(WebCore::IDBObjectStoreBackendImpl::generateKey):
(WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
* Modules/indexeddb/IDBObjectStoreBackendImpl.h:
(WebCore::IDBObjectStoreBackendImpl::get):
(WebCore::IDBObjectStoreBackendImpl::put):
(WebCore::IDBObjectStoreBackendImpl::deleteFunction):
(WebCore::IDBObjectStoreBackendImpl::clear):
(WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
(WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
(WebCore::IDBObjectStoreBackendImpl::openCursor):
(WebCore::IDBObjectStoreBackendImpl::count):
(IDBObjectStoreBackendImpl):
* Modules/indexeddb/IDBTransactionBackendImpl.h:
(WebCore::IDBTransactionBackendImpl::database):
(IDBTransactionBackendImpl):

Source/WebKit/chromium:

Fix a bug where an array was initialized with a large empty buffer,
clean up whitespace, and update to match signatures that changed
in WebCore.

* public/WebIDBDatabase.h:
(WebKit::WebIDBDatabase::clear):
* src/WebIDBDatabaseImpl.cpp:
(WebKit::WebIDBDatabaseImpl::put):
* src/WebIDBIndexImpl.cpp:
* tests/IDBDatabaseBackendTest.cpp:

LayoutTests:

Add additional count() tests for multi-entry indexes, not previously
covered.

* storage/indexeddb/index-multientry-expected.txt:
* storage/indexeddb/resources/index-multientry.js:
(.transaction.oncomplete):
(verifyCount.request.onsuccess.request.onsuccess):
(verifyCount.request.onsuccess):
(verifyCount):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Exclude IndexedDB tests which use eventSender.beginDragWithFiles()
https://bugs.webkit.org/show_bug.cgi?id=106138

Patch by Michael Pruett <michael@68k.org> on 2013-01-05
Reviewed by Alexey Proskuryakov.

* platform/wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaControls::show() should make controls opaque
https://bugs.webkit.org/show_bug.cgi?id=106034

Patch by Min Qin <qinmin@chromium.org> on 2013-01-05
Reviewed by Eric Carlson.

Source/WebCore:

When a video enters fullscreen, webkit starts a timer to make the control transparent when the timer expires.
If the user exits fullscreen while the timer expires, webkit will call mediaControls::show().
However, show() actually displays nothing as the control is transparent.
The user had to move his mouse outside the video rect and move it back in order to show the controls.
Simply clicking/moving the mouse inside the video rect will not make the control opaque.
Test: media/video-controls-visible-exiting-fullscreen.html

* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::show):

LayoutTests:

Add tests to check that video controls are shown when exiting from fullscreen.

* media/video-controls-visible-exiting-fullscreen-expected.txt: Added.
* media/video-controls-visible-exiting-fullscreen.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Only enable MinGW-w64 pow() workaround if needed
https://bugs.webkit.org/show_bug.cgi?id=106099

Patch by Jonathan Liu <net147@gmail.com> on 2013-01-05
Reviewed by Filip Pizlo.

The pow() workaround is no longer needed in the latest version
of MinGW-w64.

* wtf/MathExtras.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
seamless iframes don't take border into account properly and make the iframe too small.
https://bugs.webkit.org/show_bug.cgi?id=90827

Reviewed by Ojan Vafai.

Source/WebCore:

Seamless IFrames were incorrectly calculating their width; borders and
padding of the child document were accidentally left out of the end
result. This tiny patch adds the border/padding width to the calculated
width for the seamless IFrame, bringing things back into line with
expectations.

Test: fast/frames/seamless/seamless-border-padding.html

* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::minPreferredLogicalWidth):
(WebCore::RenderIFrame::maxPreferredLogicalWidth):
    Add borderAndPaddingLogicalWidth() to the result of both methods.

LayoutTests:

* fast/frames/seamless/seamless-border-padding-expected.txt: Added.
* fast/frames/seamless/seamless-border-padding.html: Added.
    This test checks the IFrame's handling of borders and padding.
    Things work correctly for width after this patch, but there are
    still issues with padding and height, which will be fixed in
    http://wkbug.com/106167


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