[chromium] MediaStream API: Enhance WebUserMediaClientMock and add a test for it
https://bugs.webkit.org/show_bug.cgi?id=85618

Reviewed by Adam Barth.

Adding the capability to control which MediaStreamTracks actually get created,
and adding a test that exercises the JS api using that capability.

Tools:

* DumpRenderTree/chromium/WebUserMediaClientMock.cpp:
(WebKit::WebUserMediaClientMock::requestUserMedia):
* DumpRenderTree/chromium/WebUserMediaClientMock.h:
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::testMediaStreamClient):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

LayoutTests:

* fast/mediastream/getusermedia-expected.txt: Added.
* fast/mediastream/getusermedia.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] setContentsMemoryAllocationLimitBytes needs to setNeedsCommit.
https://bugs.webkit.org/show_bug.cgi?id=85801

Patch by Michal Mocny <mmocny@google.com> on 2012-05-07
Reviewed by Adrienne Walker.

CCLayerTreeHost::setContentsMemoryAllocationLimitBytes needs to call setNeedsCommit after adjusting memory
limits, so that we push a new frame.  In particular, when returning from non visibile state, we adjust
memory allocation from 0 to non 0, and we need to push a non blank frame.

* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::setVisible):
(WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Allow UserMediaRequest::succeed to take an MediaStreamDescriptor
https://bugs.webkit.org/show_bug.cgi?id=85798

Reviewed by Adam Barth.

Source/Platform:

Adding another UserMediaRequest::succeed function that takes an MediaStreamDescriptor
instead of the two MediaStreamSource arrays.

* chromium/public/WebMediaStreamCenter.h:
(WebMediaStreamCenter):
(WebKit::WebMediaStreamCenter::constructSDP):

Source/WebCore:

Adding another UserMediaRequest::succeed function that takes an MediaStreamDescriptor
instead of the two MediaStreamSource arrays.

Not currently testable.

* Modules/mediastream/LocalMediaStream.cpp:
(WebCore::LocalMediaStream::create):
(WebCore):
(WebCore::LocalMediaStream::LocalMediaStream):
* Modules/mediastream/LocalMediaStream.h:
(LocalMediaStream):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::succeed):
(WebCore):
* Modules/mediastream/UserMediaRequest.h:
(WebCore):
(UserMediaRequest):

Source/WebKit/chromium:

Adding another WebUserMediaRequest::requestSucceed function that takes an
WebMediaStreamDescriptor instead of the two WebMediaStreamSource arrays.

* public/WebUserMediaRequest.h:
(WebKit):
(WebUserMediaRequest):
* src/WebUserMediaRequest.cpp:
(WebKit::WebUserMediaRequest::requestSucceeded):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Add methods need by client side
https://bugs.webkit.org/show_bug.cgi?id=85661

Patch by Crystal Zhang <haizhang@rim.com> on 2012-05-07
Reviewed by Antonio Gomes.

Add methods needed by client side when create and close HTML popup dialogs.
PR 154360

* Api/WebPageClient.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r115525.
http://trac.webkit.org/changeset/115525
https://bugs.webkit.org/show_bug.cgi?id=66683

Too many pages rely on DOMTimeStamp as first argument.
Reverting while we consider next steps.

Source/WebCore:

* WebCore.exp.in:
* bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
(WebCore::JSRequestAnimationFrameCallback::handleEvent):
* dom/Document.cpp:
(WebCore::Document::serviceScriptedAnimations):
* dom/Document.h:
(Document):
* dom/RequestAnimationFrameCallback.h:
(RequestAnimationFrameCallback):
* dom/RequestAnimationFrameCallback.idl:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::serviceScriptedAnimations):
(WebCore):
(WebCore::ScriptedAnimationController::windowScreenDidChange):
(WebCore::ScriptedAnimationController::scheduleAnimation):
(WebCore::ScriptedAnimationController::animationTimerFired):
* dom/ScriptedAnimationController.h:
(ScriptedAnimationController):
(WebCore::ScriptedAnimationController::displayRefreshFired):
* page/FrameView.cpp:
(WebCore::FrameView::serviceScriptedAnimations):
* page/FrameView.h:
(FrameView):
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
(WebCore::DisplayRefreshMonitor::notifyClients):
* platform/graphics/DisplayRefreshMonitor.h:
(DisplayRefreshMonitor):
* platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
(WebCore::DisplayRefreshMonitor::displayLinkFired):
* platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
(WebCore):
(WebCore::DisplayRefreshMonitor::requestRefreshCallback):
(WebCore::DisplayRefreshMonitor::displayLinkFired):

Source/WebKit/chromium:

* src/PageWidgetDelegate.cpp:
(WebKit::PageWidgetDelegate::animate):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::updateAnimations):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkit.org instructions for debugging WebProcess are unnecessarily complex
https://bugs.webkit.org/show_bug.cgi?id=85756

Reviewed by Darin Adler.

* building/debug.html: Added instructions for setting up and using the WebKit workspace for
debugging the Web process, as well as instructions for debugging the Web process from the
command line using debug-safari and debug-minibrowser.
* building/tools.html: Updated links and tweaked the language.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Rename MediaStreamCenter::didConstructMediaStream
https://bugs.webkit.org/show_bug.cgi?id=85796

Reviewed by Adam Barth.

Source/Platform:

Renamed WebMediaStreamCenter::didConstructMediaStream to didCreateMediaStream,
and change so that it is only called for MediaStreams created from JS.
Also send out the WebMediaStreamDescriptor non-const instead.

* chromium/public/WebMediaStreamCenter.h:
(WebKit::WebMediaStreamCenter::didCreateMediaStream):
(WebMediaStreamCenter):
(WebKit::WebMediaStreamCenter::didConstructMediaStream):

Source/WebCore:

Renamed MediaStreamCenter::didConstructMediaStream to didCreateMediaStream,
and change so that it is only called for MediaStreams created from JS.

Not really testable.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create):
* platform/mediastream/MediaStreamCenter.h:
(MediaStreamCenter):
* platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
(WebCore::MediaStreamCenterChromium::didCreateMediaStream):
* platform/mediastream/chromium/MediaStreamCenterChromium.h:
(MediaStreamCenterChromium):
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
(WebCore::MediaStreamCenterGStreamer::didCreateMediaStream):
* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
(MediaStreamCenterGStreamer):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, GTK gardening.

* platform/gtk/test_expectations.txt: Mark new mediastream test as
expected failure.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, GTK gardening.

* platform/gtk/test_expectations.txt: Mark
fast/events/message-port-close.html as crashing in debug builds.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in RenderBlock::updateFirstLetterStyle.
https://bugs.webkit.org/show_bug.cgi?id=85759

Reviewed by Julien Chaffraix.

Source/WebCore:

Test: fast/css-generated-content/first-letter-next-sibling-crash.html

RenderBlock::removeChild can bring up the children from last single anonymous block,
causing |nextSibling| in RenderBlock::updateFirstLetterStyle to go stale. We prevent
this by removing the child safely using removeChildNode before destroying it.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetterStyle):

LayoutTests:

* fast/css-generated-content/first-letter-next-sibling-crash-expected.txt: Added.
* fast/css-generated-content/first-letter-next-sibling-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] media/video-seek-past-end-playing.html times out
https://bugs.webkit.org/show_bug.cgi?id=84858

Patch by Dominik Röttsches <dominik.rottsches@linux.intel.com> on 2012-05-07
Reviewed by Philippe Normand.

Source/WebCore:

Removing the intentional state change to PAUSED on didEnd().
My understanding is that the fix works because the additional
state transition to PAUSED was resetting the internal m_seeking state to early,
so that updatePlayState() in HTMLMediaElement was not able to
correctly figure out/recover playstate after seeking.

No new tests, covered by existing media tests, and fixing
video-seek-past-end-playing.html flakiness on GTK, failure on EFL.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

LayoutTests:

video-seek-past-end-playing.html should work reliably after fix, removing.

* platform/gtk/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CG] ImageBuffer::ImageDataToDataURL: Remove alpha stuffing when encoding to JPEG
https://bugs.webkit.org/show_bug.cgi?id=85779

Reviewed by Eric Seidel.

No change in behavior. Covered by fast/canvas/webgl/premultiplyalpha-test.html

* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageDataToDataURL): Remove the need to stuff the alpha channel with 255.
Rename dataVector to premultipliedData and verify that its resize() worked. Rewrite
the premultiplication loop without the alpha channel = 255 part and ask the CG JPEG
encoder to ignore the alpha channel (kCGImageAlphaNoneSkipLast) instead.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Wrong positioning due to wrong width calculation wrt width:0
https://bugs.webkit.org/show_bug.cgi?id=50135

Patch by Pravin D <pravind.2k4@gmail.com> on 2012-05-07
Reviewed by Eric Seidel.

Source/WebCore:

Test: fast/block/block-parent-with-zero-width-child.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computePreferredLogicalWidths):
When width is fixed, the specified width must be taken, provided the value is positive.
Width=0 case was being ignored.

LayoutTests:

* fast/block/block-parent-with-zero-width-child-expected.txt: Added.
* fast/block/block-parent-with-zero-width-child.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] CCMathUtil projectPoint needs to avoid divide-by-zero
https://bugs.webkit.org/show_bug.cgi?id=85560

Reviewed by Adrienne Walker.

Source/WebCore:

Unit test added: CCMathUtilTest.cpp - verifyProjectionOfPerpendicularPlane
Unit test updated/renamed: CCLayerTreeHostCommonTest.cpp - verifyVisibleRectFor3dPerspectiveWhenClippedByW

The divide-by-zero occurs in an innocuous case where the layers
are probably invisible anyway. However, producing Infs and NaNs
could cause values to be used when un-intended, so its appropriate
to handle the divide-by-zero correctly.

* platform/graphics/chromium/cc/CCMathUtil.cpp:
(WebCore::projectPoint):

Source/WebKit/chromium:

* tests/CCLayerTreeHostCommonTest.cpp:
(WebKitTests::TEST):
* tests/CCMathUtilTest.cpp:
(WebCore::TEST):
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: LevelDB coding for bools is broken
https://bugs.webkit.org/show_bug.cgi?id=85810

Reviewed by Tony Chang.

Source/WebCore:

Code was appending to a pre-sized Vector, rather than using an
index setter. This caused uninitialized data to be written out.
Issue was detected on the Chromium side in http://crbug.com/126388

Tests: webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.*codeBool'

* Modules/indexeddb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::encodeBool):

Source/WebKit/chromium:

Added tests for encodeBool/decodeBool.

* tests/IDBLevelDBCodingTest.cpp:
(IDBLevelDBCoding::TEST):
(IDBLevelDBCoding):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Create LinkHighlightLayerChromium class to provide link-highlight preview animations for GraphicsLayerChromium.
https://bugs.webkit.org/show_bug.cgi?id=85084

Reviewed by Adrienne Walker.

Source/WebCore:

Unit test provided.

Creates a layer delegate class to provide link highlight animations for link-preview feature.
These are added to a GraphicsLayerChromium via provided methods. Moves dispensing of animation
ids into a separate class.

* WebCore.gypi:
* platform/graphics/chromium/AnimationIdVendor.cpp: Added.
(WebCore):
(WebCore::AnimationIdVendor::getNextAnimationId):
(WebCore::AnimationIdVendor::getNextGroupId):
* platform/graphics/chromium/AnimationIdVendor.h: Added.
(WebCore):
(AnimationIdVendor):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::updateNames):
(WebCore::GraphicsLayerChromium::addAnimation):
(WebCore::GraphicsLayerChromium::addLinkHighlightLayer):
(WebCore):
(WebCore::GraphicsLayerChromium::didFinishLinkHighlightLayer):
(WebCore::GraphicsLayerChromium::updateChildList):
(WebCore::GraphicsLayerChromium::mapAnimationNameToId):
* platform/graphics/chromium/GraphicsLayerChromium.h:
(WebCore):
(GraphicsLayerChromium):
* platform/graphics/chromium/LinkHighlightLayerDelegate.cpp: Added.
(WebCore):
(WebCore::LinkHighlightLayerDelegate::create):
(WebCore::LinkHighlightLayerDelegate::LinkHighlightLayerDelegate):
(WebCore::LinkHighlightLayerDelegate::~LinkHighlightLayerDelegate):
(WebCore::LinkHighlightLayerDelegate::getContentLayer):
(WebCore::LinkHighlightLayerDelegate::paintContents):
(WebCore::LinkHighlightLayerDelegate::didScroll):
(WebCore::LinkHighlightLayerDelegate::notifyAnimationStarted):
(WebCore::LinkHighlightLayerDelegate::notifyAnimationFinished):
* platform/graphics/chromium/LinkHighlightLayerDelegate.h: Added.
(WebCore):
(LinkHighlightLayerDelegate):

Source/WebKit/chromium:

* WebKit.gypi:
* tests/LinkHighlightLayerDelegateTest.cpp: Added.
(WebCore):
(MockGraphicsLayerClient):
(WebCore::MockGraphicsLayerClient::notifyAnimationStarted):
(WebCore::MockGraphicsLayerClient::notifySyncRequired):
(WebCore::MockGraphicsLayerClient::paintContents):
(WebCore::MockGraphicsLayerClient::showDebugBorders):
(WebCore::MockGraphicsLayerClient::showRepaintCounter):
(WebCore::TEST):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Test the combination of CSP and srcdoc
https://bugs.webkit.org/show_bug.cgi?id=85778

Reviewed by Eric Seidel.

This test ensure that <iframe srcdoc> can't be used to bypass
Content-Security-Policy restrictions on script-src. We already have the
correct behavior. This test just verifies it.

* http/tests/security/contentSecurityPolicy/srcdoc-doesnt-bypass-script-src-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/srcdoc-doesnt-bypass-script-src.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Move fileSystem to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=85760

Reviewed by Adam Barth.

Part of a refactoring series. See tracking bug 82948.

Source/Platform:

* Platform.gypi:
* chromium/public/Platform.h:
(WebKit):
(Platform):
(WebKit::Platform::fileSystem):
* chromium/public/WebFileSystem.h: Added.
(WebKit):
(WebFileSystem):
(WebKit::WebFileSystem::move):
(WebKit::WebFileSystem::copy):
(WebKit::WebFileSystem::remove):
(WebKit::WebFileSystem::removeRecursively):
(WebKit::WebFileSystem::readMetadata):
(WebKit::WebFileSystem::createFile):
(WebKit::WebFileSystem::createDirectory):
(WebKit::WebFileSystem::fileExists):
(WebKit::WebFileSystem::directoryExists):
(WebKit::WebFileSystem::readDirectory):
(WebKit::WebFileSystem::createFileWriter):
(WebKit::WebFileSystem::createSnapshotFileAndReadMetadata):
(WebKit::WebFileSystem::~WebFileSystem):

Source/WebKit/chromium:

* WebKit.gyp:
* public/platform/WebFileSystem.h:
* public/platform/WebKitPlatformSupport.h:
(WebKit):
(WebKitPlatformSupport):
* src/AssertMatchingEnums.cpp:
* src/AsyncFileSystemChromium.cpp:
(WebCore::AsyncFileSystemChromium::AsyncFileSystemChromium):
* src/LocalFileSystemChromium.cpp:
* src/WebFileSystemCallbacksImpl.cpp:
* src/WebFileSystemCallbacksImpl.h:
* src/WebFrameImpl.cpp:
* src/WebWorkerClientImpl.h:
* src/WorkerAsyncFileSystemChromium.cpp:
* src/WorkerAsyncFileWriterChromium.cpp:
* src/WorkerFileSystemCallbacksBridge.h:
* src/WorkerFileWriterCallbacksBridge.cpp:
(WebKit::WorkerFileWriterCallbacksBridge::initOnMainThread):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Replace numeric constants with strings
https://bugs.webkit.org/show_bug.cgi?id=84894

Patch by Alec Flett <alecflett@chromium.org> on 2012-05-07
Reviewed by Tony Chang.

Source/WebCore:

Test: storage/indexeddb/legacy-constants.html

Update IDBObjectStore.openCursor, IDBIndex.openCursor,
IDBIndex.openKeyCursor, IDBDatabase.transaction,
IDBCursor.direction, IDBTransaction.mode, and
IDBRequest.readyState to meet the latest spec. All of these APIs
now support string-based values in addition to the
legacy/deprecated enum-based values.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore):
(WebCore::IDBCursor::direction):
(WebCore::IDBCursor::stringToDirection):
(WebCore::IDBCursor::directionToString):
* Modules/indexeddb/IDBCursor.h:
(IDBCursor):
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::transaction):
(WebCore):
* Modules/indexeddb/IDBDatabase.h:
(IDBDatabase):
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::openCursor):
(WebCore):
(WebCore::IDBIndex::openKeyCursor):
* Modules/indexeddb/IDBIndex.h:
(WebCore::IDBIndex::openCursor):
(IDBIndex):
(WebCore::IDBIndex::openKeyCursor):
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::openCursor):
(WebCore):
* Modules/indexeddb/IDBObjectStore.h:
(WebCore::IDBObjectStore::openCursor):
(IDBObjectStore):
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::readyState):
(WebCore::IDBRequest::markEarlyDeath):
(WebCore::IDBRequest::resetReadyState):
(WebCore::IDBRequest::abort):
(WebCore::IDBRequest::finishCursor):
(WebCore::IDBRequest::onSuccess):
(WebCore::IDBRequest::stop):
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore):
(WebCore::IDBTransaction::mode):
(WebCore::IDBTransaction::stringToMode):
(WebCore::IDBTransaction::modeToString):
* Modules/indexeddb/IDBTransaction.h:
(IDBTransaction):
* Modules/indexeddb/IDBTransaction.idl:

LayoutTests:

New test for legacy constants (legacy-constants) and update all
other tests to use the new string-based constants.

* storage/indexeddb/basics-expected.txt:
* storage/indexeddb/basics-workers-expected.txt:
* storage/indexeddb/constants-expected.txt:
* storage/indexeddb/create-object-store-options-expected.txt:
* storage/indexeddb/cursor-added-bug-expected.txt:
* storage/indexeddb/cursor-advance-expected.txt:
* storage/indexeddb/cursor-continue-expected.txt:
* storage/indexeddb/cursor-continue-validity-expected.txt:
* storage/indexeddb/cursor-delete-expected.txt:
* storage/indexeddb/cursor-inconsistency-expected.txt:
* storage/indexeddb/cursor-index-delete-expected.txt:
* storage/indexeddb/cursor-key-order-expected.txt:
* storage/indexeddb/cursor-prev-no-duplicate-expected.txt:
* storage/indexeddb/cursor-primary-key-order-expected.txt:
* storage/indexeddb/cursor-reverse-bug-expected.txt:
* storage/indexeddb/cursor-skip-deleted-expected.txt:
* storage/indexeddb/cursor-update-expected.txt:
* storage/indexeddb/data-corruption-expected.txt:
* storage/indexeddb/database-quota-expected.txt:
* storage/indexeddb/delete-range-expected.txt:
* storage/indexeddb/error-causes-abort-by-default-expected.txt:
* storage/indexeddb/exception-in-event-aborts-expected.txt:
* storage/indexeddb/factory-deletedatabase-expected.txt:
* storage/indexeddb/index-count-expected.txt:
* storage/indexeddb/index-multientry-expected.txt:
* storage/indexeddb/index-unique-expected.txt:
* storage/indexeddb/key-generator-expected.txt:
* storage/indexeddb/key-type-array-expected.txt:
* storage/indexeddb/keypath-edges-expected.txt:
* storage/indexeddb/keypath-intrinsic-properties-expected.txt:
* storage/indexeddb/legacy-constants-expected.txt: Added.
* storage/indexeddb/legacy-constants.html: Added.
* storage/indexeddb/mozilla/clear-expected.txt:
* storage/indexeddb/mozilla/create-index-unique-expected.txt:
* storage/indexeddb/mozilla/create-objectstore-basics-expected.txt:
* storage/indexeddb/mozilla/cursor-mutation-expected.txt:
* storage/indexeddb/mozilla/cursor-mutation-objectstore-only-expected.txt:
* storage/indexeddb/mozilla/cursors-expected.txt:
* storage/indexeddb/mozilla/index-prev-no-duplicate-expected.txt:
* storage/indexeddb/mozilla/index-prev-no-duplicate.html:
* storage/indexeddb/mozilla/indexes-expected.txt:
* storage/indexeddb/mozilla/odd-result-order-expected.txt:
* storage/indexeddb/mozilla/readwrite-transactions-expected.txt:
* storage/indexeddb/mozilla/readyState-expected.txt:
* storage/indexeddb/mozilla/resources/clear.js:
(clear):
* storage/indexeddb/mozilla/resources/create-index-unique.js:
(createAndVerifyIndex):
* storage/indexeddb/mozilla/resources/create-objectstore-basics.js:
(cleanDatabase):
* storage/indexeddb/mozilla/resources/cursor-mutation-objectstore-only.js:
(checkCursorResultsAndSetupMutatingCursor):
* storage/indexeddb/mozilla/resources/cursor-mutation.js:
(setupMutatingCursor):
* storage/indexeddb/mozilla/resources/cursors.js:
* storage/indexeddb/mozilla/resources/indexes.js:
* storage/indexeddb/mozilla/resources/odd-result-order.js:
(addRecord):
(deleteRecord):
* storage/indexeddb/mozilla/resources/readwrite-transactions.js:
(setVersionComplete):
(postAdd):
(postAdd2):
(postPut):
(postPut2):
(postPut3):
(postPut4):
(postDelete):
(postDelete2):
* storage/indexeddb/mozilla/resources/readyState.js:
(test):
(openSuccess):
(setupObjectStore):
(getRecord):
(finalCheck):
* storage/indexeddb/mozilla/resources/versionchange.js:
(postSetVersion):
(postSetVersion2):
* storage/indexeddb/mozilla/versionchange-expected.txt:
* storage/indexeddb/mutating-cursor-expected.txt:
* storage/indexeddb/noblobs-expected.txt:
* storage/indexeddb/noblobs.html:
* storage/indexeddb/objectstore-autoincrement-expected.txt:
* storage/indexeddb/objectstore-basics-expected.txt:
* storage/indexeddb/objectstore-basics-workers-expected.txt:
* storage/indexeddb/objectstore-count-expected.txt:
* storage/indexeddb/open-cursor-expected.txt:
* storage/indexeddb/open-during-transaction-expected.txt:
* storage/indexeddb/opencursor-key-expected.txt:
* storage/indexeddb/prefetch-bugfix-108071-expected.txt:
* storage/indexeddb/readonly-expected.txt:
* storage/indexeddb/request-event-propagation-expected.txt:
* storage/indexeddb/resources/basics.js:
(test):
(openCallback):
* storage/indexeddb/resources/constants.js:
(test):
* storage/indexeddb/resources/create-object-store-options.js:
(setVersionComplete):
* storage/indexeddb/resources/cursor-added-bug.js:
(openCursor):
* storage/indexeddb/resources/cursor-advance.js:
(runTest):
(testAdvanceIndexNoDupe):
(testAdvanceIndexPrev):
(testAdvanceIndexPrevNoDupe):
* storage/indexeddb/resources/cursor-continue-validity.js:
(continueTest):
(continueIndexTest):
(testModifyContinueOrder):
* storage/indexeddb/resources/cursor-continue.js:
(ascendingTest):
(descendingTest):
* storage/indexeddb/resources/cursor-delete.js:
(openCursor):
(addObject):
* storage/indexeddb/resources/cursor-inconsistency.js:
(openBasicCursor):
* storage/indexeddb/resources/cursor-index-delete.js:
(openCursor):
(addObject):
* storage/indexeddb/resources/cursor-key-order.js:
* storage/indexeddb/resources/cursor-prev-no-duplicate.js:
(populateStore):
(testFarRangeCursor_closed):
(testFarRangeCursor_open):
(testFarRangeCursor_indexClosed):
(testFarRangeCursor_indexOpen):
(testFarRangeCursor_indexKeyOpen):
(testFarRangeCursor_indexKeyClosed):
(testBoundaryCursor_closed):
(testBoundaryCursor_open):
(testBoundaryCursor_indexClosed):
(testBoundaryCursor_indexOpen):
(testBoundaryCursor_indexKeyClosed):
(testBoundaryCursor_indexKeyOpen):
(testNoDuplicate_closed):
(testNoDuplicate_open):
(testNoDuplicate_indexKeyClosed):
* storage/indexeddb/resources/cursor-primary-key-order.js:
(populateStore):
* storage/indexeddb/resources/cursor-reverse-bug.js:
(populateStore):
(testCursor):
* storage/indexeddb/resources/cursor-skip-deleted.js:
(basicCursorTest):
(reverseCursorTest):
* storage/indexeddb/resources/cursor-update.js:
(openBasicCursor):
* storage/indexeddb/resources/data-corruption.js:
(addData):
(getData):
* storage/indexeddb/resources/database-quota.js:
(checkQuotaEnforcing):
* storage/indexeddb/resources/delete-range.js:
(runTests.nextTest):
(runTests):
* storage/indexeddb/resources/error-causes-abort-by-default.js:
(addData):
(transactionCompleted):
(transactionAborted1):
* storage/indexeddb/resources/exception-in-event-aborts.js:
(startTest):
(transactionAborted1):
(transactionAborted2):
* storage/indexeddb/resources/factory-deletedatabase.js:
(getValue):
* storage/indexeddb/resources/index-count.js:
* storage/indexeddb/resources/index-cursor.js:
(runNextTest):
(testNullKeyRange):
* storage/indexeddb/resources/index-multientry.js:
* storage/indexeddb/resources/index-unique.js:
(setVersionCompleted):
* storage/indexeddb/resources/key-generator.js:
(.):
* storage/indexeddb/resources/key-type-array.js:
* storage/indexeddb/resources/keypath-edges.js:
* storage/indexeddb/resources/keypath-intrinsic-properties.js:
* storage/indexeddb/resources/legacy-constants.js: Added.
(test):
(prepareDatabase.openreq.onsuccess.verreq.onsuccess):
(prepareDatabase.openreq.onsuccess):
(prepareDatabase):
(populateStore):
(checkNext.request.onsuccess):
(checkNext):
(checkNextNoDuplicate.request.onsuccess):
(checkNextNoDuplicate):
(checkPrev.request.onsuccess):
(checkPrev):
(checkPrevNoDuplicate.request.onsuccess):
(checkPrevNoDuplicate):
* storage/indexeddb/resources/mutating-cursor.js:
(openForwardCursor):
(openReverseCursor):
* storage/indexeddb/resources/objectstore-autoincrement.js:
(setVersionCompleted):
* storage/indexeddb/resources/objectstore-basics.js:
(addData):
(addAgainFailure):
* storage/indexeddb/resources/objectstore-count.js:
* storage/indexeddb/resources/objectstore-cursor.js:
(runNextTest):
(testNullKeyRange):
* storage/indexeddb/resources/open-cursor.js:
(cursorWithKeySuccess):
(cursorSuccess):
* storage/indexeddb/resources/open-during-transaction.js:
* storage/indexeddb/resources/opencursor-key.js:
* storage/indexeddb/resources/prefetch-bugfix-108071.js:
* storage/indexeddb/resources/request-event-propagation.js:
(startTest):
(transactionAborted):
(transactionAborted2):
* storage/indexeddb/resources/set_version_blocked.js:
(blocked):
* storage/indexeddb/resources/transaction-abort.js:
(startTest):
* storage/indexeddb/resources/transaction-after-close.js:
(runFirstRegularTransaction):
(firstTransactionComplete):
(onSecondOpen):
* storage/indexeddb/resources/transaction-basics.js:
(testInvalidMode):
* storage/indexeddb/resources/transaction-event-propagation.js:
(startTest):
(dbAbortBubbleCallback):
* storage/indexeddb/resources/transaction-rollback.js:
(setVersionComplete):
(abortCallback):
* storage/indexeddb/set_version_blocked-expected.txt:
* storage/indexeddb/structured-clone-expected.txt:
* storage/indexeddb/structured-clone.html:
* storage/indexeddb/transaction-abort-expected.txt:
* storage/indexeddb/transaction-abort-with-js-recursion-cross-frame-expected.txt:
* storage/indexeddb/transaction-abort-with-js-recursion-cross-frame.html:
* storage/indexeddb/transaction-abort-with-js-recursion-expected.txt:
* storage/indexeddb/transaction-abort-with-js-recursion.html:
* storage/indexeddb/transaction-after-close-expected.txt:
* storage/indexeddb/transaction-basics-expected.txt:
* storage/indexeddb/transaction-event-propagation-expected.txt:
* storage/indexeddb/transaction-rollback-expected.txt:
* storage/indexeddb/tutorial.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116337 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKitTestRunner needs layoutTestController.dumpFrameLoadCallbacks
https://bugs.webkit.org/show_bug.cgi?id=42331
<rdar://problem/8193641>

Reviewed by Darin Adler.

This patch sets up the framework for supporting dumpFrameLoadCallbacks, as well as
outputting some of the required strings. As tests become unskipped the other callbacks
can be supported.

* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: Add dumpFrameLoadCallbacks()
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessage): pass in the dictionary containing keys needed to initialize
dump callbacks for the layoutTestController.
(WTR::InjectedBundle::booleanForKey): Helper function to extract boolean value from key in WKDictionaryRef.
Output some warning if we are trying to extract a value that is not a boolean.
(WTR::InjectedBundle::beginTesting): Update to take in the dictionary passed in by the TestController.
We cannot set the bits on the layoutTestController until it has been created in beginTesting().
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessage):
(WTR):
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR):
(WTR::dumpFrameDescriptionSuitableForTestResult): Static function similar to
-[WebFrame _drt_descriptionSuitableForTestResult] in DumpRenderTree.
(WTR::InjectedBundlePage::didStartProvisionalLoadForFrame): Output string.
(WTR::InjectedBundlePage::didCommitLoadForFrame): Output string.
(WTR::InjectedBundlePage::didFinishLoadForFrame): Output string.
(WTR::InjectedBundlePage::didReceiveTitleForFrame): Output string.
(WTR::InjectedBundlePage::didCancelClientRedirectForFrame): Output string.
(WTR::InjectedBundlePage::willPerformClientRedirectForFrame): Output string. In WK1 it's
"willPerformClientRedirectToURL" so we will have to use that value here.
(WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): Output string.
(WTR::InjectedBundlePage::didHandleOnloadEventsForFrame): Output string.
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::LayoutTestController): Initialize to not dump frame load callbacks.
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(WTR::LayoutTestController::dumpFrameLoadCallbacks): Change to use setShouldDumpFrameLoadCallbacks.
(WTR::LayoutTestController::setShouldDumpFrameLoadCallbacks): Set bit.
(WTR::LayoutTestController::shouldDumpFrameLoadCallbacks): Return bit.
(LayoutTestController): Added m_dumpFrameLoadCallbacks to track whether to dump the output.
* WebKitTestRunner/TestInvocation.cpp:
(WTR::shouldLogFrameLoadDelegates): Similar to DRT.
(WTR::TestInvocation::invoke): Based on the URL loaded, set the bit in the dictionary that gets passed
to the injected bundle.

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