[Chromium] add setIDBFactory method for embedders to call
https://bugs.webkit.org/show_bug.cgi?id=105465

Reviewed by Darin Fisher.

This is step 1 of getting rid of WebKitPlatform::idbFactory. This
adds a setter for embedders to call upon initialization, which (if
set) will be used instead of calling the idbFactory()
method. Eventually the idbFactory() method will go away, and this
setter will be the only way to initialize the Indexed Database API.

* public/WebIDBFactory.h:
(WebKit):
* src/IDBFactoryBackendProxy.cpp:
(WebKit):
(WebKit::setIDBFactory):
(WebKit::IDBFactoryBackendProxy::IDBFactoryBackendProxy):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r137607): resource load client callbacks are not called for the main resource when loading HTML string
https://bugs.webkit.org/show_bug.cgi?id=105330

Reviewed by Brady Eidson.

* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::responseReceived):
(WebCore::MainResourceLoader::dataReceived):
(WebCore::MainResourceLoader::didFinishLoading):
(WebCore::MainResourceLoader::load):
(WebCore::MainResourceLoader::identifier):
* loader/MainResourceLoader.h:
(MainResourceLoader):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove old setBackingTextureId/setBackingIOSurfaceId API on WebPluginContainer
https://bugs.webkit.org/show_bug.cgi?id=105472

Reviewed by James Robinson.

This is not called anymore by chromium (as of r173545), using
setWebPlugin instead.

* public/WebPluginContainer.h:
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::WebPluginContainerImpl):
* src/WebPluginContainerImpl.h:
(WebPluginContainerImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in TextTrack::trackIndexRelativeToRenderedTracks()
https://bugs.webkit.org/show_bug.cgi?id=105371

Reviewed by Simon Fraser.

Source/WebCore:

Add an RAII object to manage text track update blocking, use it to always process the
current cues to ensure that cues from a track that is deleted are removed from the
shadow DOM before the next layout.

No new tests, this fixes a crash in media/video-controls-captions-trackmenu.html.

* html/HTMLMediaElement.cpp:
(WebCore::TrackDisplayUpdateScope::TrackDisplayUpdateScope): New, call beginIgnoringTrackDisplayUpdateRequests.
(WebCore::TrackDisplayUpdateScope::~TrackDisplayUpdateScope): New, call endIgnoringTrackDisplayUpdateRequests.
(WebCore::HTMLMediaElement::beginIgnoringTrackDisplayUpdateRequests):
(WebCore::HTMLMediaElement::endIgnoringTrackDisplayUpdateRequests): Call updateActiveTextTrackCues
    when the ignore count reaches zero.
(WebCore::HTMLMediaElement::textTrackAddCues): Use TrackDisplayUpdateScope instead of calling
    beginIgnoringTrackDisplayUpdateRequests and endIgnoringTrackDisplayUpdateRequests directly.
(WebCore::HTMLMediaElement::textTrackRemoveCues): Ditto.
(WebCore::HTMLMediaElement::removeTrack): Ditto.
(WebCore::HTMLMediaElement::removeAllInbandTracks): Ditto.
(WebCore::HTMLMediaElement::didRemoveTrack): Ditto. Call removeTrack.
* html/HTMLMediaElement.h: Declare TrackDisplayUpdateScope as a friend of HTMLMediaElement so it
    can call protected methods.

LayoutTests:

* platform/mac/TestExpectations: Unskip video-controls-captions-trackmenu.html.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Remove idbFactory from PlatformSupport
https://bugs.webkit.org/show_bug.cgi?id=105460

Reviewed by Darin Fisher.

Part of a larger refactoring series; see tracking bug 82948.

Source/WebCore:

* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/chromium/PlatformSupport.h: Removed.
* storage/chromium: Removed.
* storage/chromium/IDBFactoryBackendInterface.cpp: Removed.

Source/WebKit/chromium:

* WebKit.gyp:
* src/IDBFactoryBackendInterface.cpp: Added.
(WebCore):
(WebCore::IDBFactoryBackendInterface::create):
* src/PlatformSupport.cpp: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Adopt new assertion SPI for process suppression on Mac
https://bugs.webkit.org/show_bug.cgi?id=105378

Patch by Kiran Muppala <cmuppala@apple.com> on 2012-12-19
Reviewed by Mark Rowe.

Source/WebKit2:

Process suppression for WebKit2 child processes is currently enabled or disabled using AutomaticTermination.
This should be replaced with a new assertion SPI specific to process suppression.

* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::ChildProcess): Remove unused member variable m_applicationIsOccluded.
* Shared/ChildProcess.h:
(WebKit::ChildProcess::applicationIsOccluded): Infer occlusion state from m_processVisibleAssertion.
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::setApplicationIsOccluded): Use applicationIsOccluded() accessor to check if the
occlusion state has changed and take or release a process visible assertion accordingly.
(WebKit::ChildProcess::platformInitialize): Remove call to initializeTimerCoalescingPolicy(), since taking
a process visible assertion also sets the timer coalescing policy appropriately.  Set the occlusion
state to false on initialization.

WebKitLibraries:

Add WKNSProcessInfoProcessAssertionWithTypes().

* WebKitSystemInterface.h:

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