diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-05 19:55:40 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-05 19:55:40 +0000 |
commit | cc4ba248e6714e6cf29bfa956d415977d78db246 (patch) | |
tree | 75e3e7ed27126513482f913df80cd2b376e6d689 | |
parent | 6dcefa2aded298fa4015a5da4f54e56c65061ab0 (diff) | |
download | chromium_src-cc4ba248e6714e6cf29bfa956d415977d78db246.zip chromium_src-cc4ba248e6714e6cf29bfa956d415977d78db246.tar.gz chromium_src-cc4ba248e6714e6cf29bfa956d415977d78db246.tar.bz2 |
Update to WebKit r46807.
BUG=none
TEST=Covered by existing unittests
Review URL: http://codereview.chromium.org/162018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22518 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | DEPS | 2 | ||||
-rw-r--r-- | webkit/api/src/WebImageSkia.cpp | 6 | ||||
-rw-r--r-- | webkit/tools/test_shell/image_decoder_unittest.cc | 2 | ||||
-rw-r--r-- | webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp | 19 |
4 files changed, 9 insertions, 20 deletions
@@ -1,7 +1,7 @@ vars = { "webkit_trunk": "http://svn.webkit.org/repository/webkit/trunk", - "webkit_revision": "46804", + "webkit_revision": "46807", } diff --git a/webkit/api/src/WebImageSkia.cpp b/webkit/api/src/WebImageSkia.cpp index 0a3ce5e..0bba7ae 100644 --- a/webkit/api/src/WebImageSkia.cpp +++ b/webkit/api/src/WebImageSkia.cpp @@ -35,7 +35,7 @@ #include "WebSize.h" #include "Image.h" -#include "ImageSourceSkia.h" +#include "ImageSource.h" #include "NativeImageSkia.h" #include "SharedBuffer.h" #include <wtf/OwnPtr.h> @@ -47,8 +47,8 @@ namespace WebKit { WebImage WebImage::fromData(const WebData& data, const WebSize& desiredSize) { - ImageSourceSkia source; - source.setData(PassRefPtr<SharedBuffer>(data).get(), true, desiredSize); + ImageSource source; + source.setData(PassRefPtr<SharedBuffer>(data).get(), true); if (!source.isSizeAvailable()) return WebImage(); diff --git a/webkit/tools/test_shell/image_decoder_unittest.cc b/webkit/tools/test_shell/image_decoder_unittest.cc index 7ce7ebb..ddb9b03 100644 --- a/webkit/tools/test_shell/image_decoder_unittest.cc +++ b/webkit/tools/test_shell/image_decoder_unittest.cc @@ -68,7 +68,7 @@ void VerifyImage(WebCore::ImageDecoder* decoder, size_t frame_index) { // Make sure decoding can complete successfully. EXPECT_TRUE(decoder->isSizeAvailable()) << path; - EXPECT_GE(static_cast<size_t>(decoder->frameCount()), frame_index) << path; + EXPECT_GE(decoder->frameCount(), frame_index) << path; WebCore::RGBA32Buffer* image_buffer = decoder->frameBufferAtIndex(frame_index); ASSERT_NE(static_cast<WebCore::RGBA32Buffer*>(NULL), image_buffer) << path; diff --git a/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp b/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp index b3eb5f2..0203ddf 100644 --- a/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp +++ b/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp @@ -35,22 +35,14 @@ #include "ICOImageDecoder.h" #include "SharedBuffer.h" -static const int kFavIconSize = 16; - class ICOImageDecoderTest : public ImageDecoderTest { public: - ICOImageDecoderTest() : ImageDecoderTest(L"ico"), - testing_favicon_size_(false) { } + ICOImageDecoderTest() : ImageDecoderTest(L"ico") { } protected: virtual WebCore::ImageDecoder* CreateDecoder() const { - WebCore::IntSize desired_size; - if (testing_favicon_size_) - desired_size = WebCore::IntSize(kFavIconSize, kFavIconSize); - return new WebCore::ICOImageDecoder(desired_size); + return new WebCore::ICOImageDecoder(); } - - bool testing_favicon_size_; }; TEST_F(ICOImageDecoderTest, Decoding) { @@ -64,8 +56,7 @@ TEST_F(ICOImageDecoderTest, ChunkedDecoding) { #endif TEST_F(ICOImageDecoderTest, FaviconSize) { - // Test that the decoder decodes a preferred size when specified. - testing_favicon_size_ = true; + // Test that the decoder decodes multiple sizes of icons which have them. // Load an icon that has both favicon-size and larger entries. std::wstring multisize_icon_path(data_dir_); @@ -75,13 +66,11 @@ TEST_F(ICOImageDecoderTest, FaviconSize) { // Verify the decoding. const std::wstring md5_sum_path(GetMD5SumPath(multisize_icon_path) + L"2"); - static const int kDesiredFrameIndex = 0; + static const int kDesiredFrameIndex = 3; #ifdef CALCULATE_MD5_SUMS SaveMD5Sum(md5_sum_path, decoder->frameBufferAtIndex(kDesiredFrameIndex)); #else VerifyImage(decoder.get(), multisize_icon_path, md5_sum_path, kDesiredFrameIndex); #endif - - testing_favicon_size_ = false; } |