Unlock partially decoded images after passing them to the ImageDecodingStore
https://bugs.webkit.org/show_bug.cgi?id=110778

Patch by Min Qin <qinmin@chromium.org> on 2013-02-27
Reviewed by Stephen White.

Source/WebCore:

For partially decoded images, we need to unlock them so that the memory can be freed.
This change unlocks all the image frames after they are passed to ImageDecodingStore.
Unit tests are added in ImageFrameGeneratorTest.

* platform/graphics/chromium/ImageFrameGenerator.cpp:
(WebCore::ImageFrameGenerator::tryToResumeDecodeAndScale):
(WebCore::ImageFrameGenerator::tryToDecodeAndScale):
(WebCore::ImageFrameGenerator::decode):
* platform/image-decoders/ImageDecoder.h:
(ImageDecoder):
(WebCore::ImageDecoder::lockFrameBuffers):
(WebCore::ImageDecoder::unlockFrameBuffers):

Source/WebKit/chromium:

Test for testing that image frames are unlocked after passing to ImageDecodingStore.

* tests/ImageFrameGeneratorTest.cpp:
(WebCore::ImageFrameGeneratorTest::SetUp):
(WebCore::ImageFrameGeneratorTest::frameBuffersUnlocked):
(ImageFrameGeneratorTest):
(WebCore::ImageFrameGeneratorTest::frameBuffersLocked):
(WebCore::TEST_F):
* tests/MockImageDecoder.h:
(WebCore::MockImageDecoderClient::frameBuffersLocked):
(WebCore::MockImageDecoderClient::frameBuffersUnlocked):
(WebCore::MockImageDecoder::unlockFrameBuffers):
(WebCore::MockImageDecoder::lockFrameBuffers):
(MockImageDecoder):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed (speculative) build fixes for EFL, GTK and Qt after r144218.

* CMakeLists.txt:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebSpeech: support speech cancel
https://bugs.webkit.org/show_bug.cgi?id=107349

Reviewed by Beth Dakin.

Source/WebCore: 

Add the ability to cancel speech utterances and make it work with Mac
and the mock speech synthesizer.

Test: platform/mac/fast/speechsynthesis/speech-synthesis-cancel.html

* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::pending):
(WebCore::SpeechSynthesis::cancel):
(WebCore::SpeechSynthesis::handleSpeakingCompleted):
* platform/PlatformSpeechSynthesizer.h:
(PlatformSpeechSynthesizer):
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(-[WebSpeechSynthesisWrapper cancel]):
(WebCore::PlatformSpeechSynthesizer::cancel):
(WebCore):
* platform/mock/PlatformSpeechSynthesizerMock.cpp:
(WebCore::PlatformSpeechSynthesizerMock::cancel):
(WebCore):
(WebCore::PlatformSpeechSynthesizerMock::speak):
* platform/mock/PlatformSpeechSynthesizerMock.h:
(PlatformSpeechSynthesizerMock):

LayoutTests: 

* platform/mac/fast/speechsynthesis/speech-synthesis-cancel-expected.txt: Added.
* platform/mac/fast/speechsynthesis/speech-synthesis-cancel.html: Added.



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