Database process crashes when multiple transactions attempt to run at once
https://bugs.webkit.org/show_bug.cgi?id=134139

Reviewed by David Kilzer.

Source/WebCore:
Ensure that only one transaction can be running at a time.

Test: storage/indexeddb/transaction-overlapping.html

* Modules/indexeddb/IDBTransactionCoordinator.cpp:
(WebCore::IDBTransactionCoordinator::canRunTransaction):

LayoutTests:
* storage/indexeddb/transaction-overlapping-expected.txt: Added.
* storage/indexeddb/transaction-overlapping.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix release build

* Modules/indexeddb/IDBTransactionCoordinator.cpp:
(WebCore::IDBTransactionCoordinator::canRunTransaction):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r170324.
https://bugs.webkit.org/show_bug.cgi?id=134223

lots of build breakage (Requested by bradeeoh on #webkit).

Reverted changeset:

"Unreviewed, revert an unintentional change committed with
r170323."
http://trac.webkit.org/changeset/170324

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add SPI for Injected Bundle to provide user agent for a given URL.
https://bugs.webkit.org/show_bug.cgi?id=133562

Patch by Grant Kennell <gkennell@apple.com> on 2014-06-23
Reviewed by Sam Weinig.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
  Added delegate method to WebProcess PluIn protocol to provide UserAgent per URL.
* WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
  Added new typedef for function pointer for this new delegate call.
  Added new version (V8) of bundle loader client struct containing
  a function pointer of that new type.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(userAgentForURL): Makes delegate call with the new method.
(setUpPageLoaderClient): Sets the struct's new function pointer to the new method.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::userAgentForURL):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::userAgent):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::userAgent): Began using the new API to ask for user agent
  instead of simply returning what had been stored.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userAgent): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/17413498> [Cocoa] Expose WebPreferences::offlineWebApplicationCacheEnabled
https://bugs.webkit.org/show_bug.cgi?id=134217

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _offlineApplicationCacheIsEnabled]):
(-[WKPreferences _setOfflineApplicationCacheIsEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added _offlineWebApplicationCacheIsEnabled
property.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r170323.
https://bugs.webkit.org/show_bug.cgi?id=134224

lots of build breakage (Requested by bradeeoh on #webkit).

Reverted changeset:

"[Mac] process raw VTT in-band captions"
https://bugs.webkit.org/show_bug.cgi?id=134178
http://trac.webkit.org/changeset/170323

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] remove InbandTextTrackPrivateAVFIOS
https://bugs.webkit.org/show_bug.cgi?id=134220

Reviewed by Benjamin Poulain.

* WebCore.xcodeproj/project.pbxproj: Remove references to InbandTextTrackPrivateAVFIOS.

* platform/graphics/ios/InbandTextTrackPrivateAVFIOS.h: Removed.
* platform/graphics/ios/InbandTextTrackPrivateAVFIOS.mm: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add -[WKBackForwardList _removeAllItems]
https://bugs.webkit.org/show_bug.cgi?id=134227
<rdar://problem/17291623>

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKBackForwardList.mm:
(-[WKBackForwardList _removeAllItems]):
* UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Added.
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Use the page background color instead of white when swipe snapshots were purged (134218)
https://bugs.webkit.org/show_bug.cgi?id=134218
<rdar://problem/17426454>

Reviewed by Benjamin Poulain.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):
(-[WKWebView WebKit::]):
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::shouldUseSnapshotForSize):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::retrieveSnapshotForItem): Deleted.
* UIProcess/mac/ViewSnapshotStore.h:
Store a color along with each snapshot.
Set the background color of the swipe snapshot layer accordingly.

* WebCore.exp.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLMediaElement seek algorithm should allow cancelling previous seeks.
https://bugs.webkit.org/show_bug.cgi?id=134116

Reviewed by Eric Carlson.

Source/WebCore:
Test: media/video-seek-double.html

Fulfill the requirement of the §4.7.14.9 seeking algorithm to do steps 5+ asynchronously and cancel
previous instances of the algorithm.

For the html/ parts of the algorithm, implement this by adding a seek timer, which when fired will
issue steps 5-12. MediaPlayerPrivateAVFoundation will already coalesce multiple seek operations, so nothing
additional needs be done there.  However, MediaPlayerPrivateMediaSourceAVFObjC needs to implement the same
pending seek logic in case additional seeks were issued after the html/ algorithm reached step 12.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the new m_seekTimer.
(WebCore::HTMLMediaElement::parseAttribute): Clear the seek timer.
(WebCore::HTMLMediaElement::seekInternal): Differentiate between DOM seeks and internal seeks.
(WebCore::HTMLMediaElement::seekWithTolerance:) Split into the seekTimerFired() method.
(WebCore::HTMLMediaElement::seekTimerFired:) Added, split from seekWithTolerance().
* html/HTMLMediaElement.h:
* html/MediaController.cpp:
(MediaController::bringElementUpToSpeed): Call seekInternal().
(WebCore::HTMLMediaElement::PendingSeek::PendingSeek): Added convenience struct for storing seek requests.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::PendingSeek::PendingSeek): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC): Modify the time jumped
    handler to not clear the m_seeking flag if another seek request is pending.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):

LayoutTests:
* media/video-seek-double-expected.txt: Added.
* media/video-seek-double.html: Added.

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