[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
tkent at chromium.org
tkent at chromium.org
Wed Dec 22 11:41:47 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3a07b9b8cb6bc0d03833bb424d50556ff997411e
Author: tkent at chromium.org <tkent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Aug 4 01:51:37 2010 +0000
2010-08-03 Kent Tamura <tkent at chromium.org>
Reviewed by Dimitri Glazkov.
[DRT/Chromium] Remove dependency of base/md5.h
https://bugs.webkit.org/show_bug.cgi?id=43403
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::dumpImage): Use wtf/MD5.h
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index ebec8ce..ec5525d 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2010-08-03 Kent Tamura <tkent at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [DRT/Chromium] Remove dependency of base/md5.h
+ https://bugs.webkit.org/show_bug.cgi?id=43403
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::dumpImage): Use wtf/MD5.h
+
2010-08-03 Joseph Pecoraro <joepeck at webkit.org>
Reviewed by David Kilzer.
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
index bcb503c..1b52699 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp
@@ -35,7 +35,6 @@
#include "DRTDevToolsClient.h"
#include "LayoutTestController.h"
#include "WebViewHost.h"
-#include "base/md5.h" // FIXME: Wrap by webkit_support.
#include "base/string16.h"
#include "gfx/codec/png_codec.h" // FIXME: Remove dependecy. WebCore/platform/image-encoder is better?
#include "public/WebDataSource.h"
@@ -57,6 +56,7 @@
#include <algorithm>
#include <cctype>
#include <vector>
+#include <wtf/MD5.h>
using namespace WebKit;
using namespace std;
@@ -584,13 +584,18 @@ void TestShell::dumpImage(skia::PlatformCanvas* canvas) const
// some images that are the pixel identical on windows and other platforms
// but have different MD5 sums. At this point, rebaselining all the windows
// tests is too much of a pain, so we just check in different baselines.
- MD5Context ctx;
- MD5Init(&ctx);
- MD5Update(&ctx, sourceBitmap.getPixels(), sourceBitmap.getSize());
-
- MD5Digest digest;
- MD5Final(&digest, &ctx);
- string md5hash = MD5DigestToBase16(digest);
+ MD5 digester;
+ Vector<uint8_t, 16> digestValue;
+ digester.addBytes(reinterpret_cast<const uint8_t*>(sourceBitmap.getPixels()), sourceBitmap.getSize());
+ digester.checksum(digestValue);
+ string md5hash;
+ md5hash.reserve(16 * 2);
+ for (unsigned i = 0; i < 16; ++i) {
+ char hex[3];
+ // Use "x", not "X". The string must be lowercased.
+ sprintf(hex, "%02x", digestValue[i]);
+ md5hash.append(hex);
+ }
// Only encode and dump the png if the hashes don't match. Encoding the image
// is really expensive.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list