[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
paroga at webkit.org
paroga at webkit.org
Sun Feb 20 23:40:38 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 52569f77a1eb21cb1b4339f95d1daf6ad0958d48
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 24 01:00:57 2011 +0000
2011-01-23 Patrick Gansterer <paroga at webkit.org>
Reviewed by Darin Adler.
Use WTF::StringHasher in WebCore
https://bugs.webkit.org/show_bug.cgi?id=52934
Add an additional function to calculate the hash
of data with a runtimedependent size.
* wtf/StringHasher.h:
(WTF::StringHasher::createBlobHash):
2011-01-23 Patrick Gansterer <paroga at webkit.org>
Reviewed by Darin Adler.
Use WTF::StringHasher in WebCore
https://bugs.webkit.org/show_bug.cgi?id=52934
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::urlHostHash):
* platform/LinkHash.cpp:
(WebCore::visitedLinkHashInline):
* platform/cf/BinaryPropertyList.cpp:
(WebCore::IntegerArrayHash::hash):
* platform/graphics/wx/FontPlatformDataWx.cpp:
(WebCore::FontPlatformData::computeHash):
* platform/network/ProtectionSpaceHash.h:
(WebCore::ProtectionSpaceHash::hash):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 817195b..f76583a 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,5 +1,18 @@
2011-01-23 Patrick Gansterer <paroga at webkit.org>
+ Reviewed by Darin Adler.
+
+ Use WTF::StringHasher in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=52934
+
+ Add an additional function to calculate the hash
+ of data with a runtimedependent size.
+
+ * wtf/StringHasher.h:
+ (WTF::StringHasher::createBlobHash):
+
+2011-01-23 Patrick Gansterer <paroga at webkit.org>
+
Reviewed by David Kilzer.
Fix comment in String::ascii()
diff --git a/Source/JavaScriptCore/wtf/StringHasher.h b/Source/JavaScriptCore/wtf/StringHasher.h
index 63ce74f..a84b2c4 100644
--- a/Source/JavaScriptCore/wtf/StringHasher.h
+++ b/Source/JavaScriptCore/wtf/StringHasher.h
@@ -141,6 +141,12 @@ public:
return createHash<UChar>(static_cast<const UChar*>(data), length / sizeof(UChar));
}
+ static inline unsigned createBlobHash(const void* data, unsigned size)
+ {
+ ASSERT(!(size % 2));
+ return createHash<UChar>(static_cast<const UChar*>(data), size / sizeof(UChar));
+ }
+
private:
static inline UChar defaultCoverter(UChar ch)
{
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 322d7ec..22b8609 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,5 +1,23 @@
2011-01-23 Patrick Gansterer <paroga at webkit.org>
+ Reviewed by Darin Adler.
+
+ Use WTF::StringHasher in WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=52934
+
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::urlHostHash):
+ * platform/LinkHash.cpp:
+ (WebCore::visitedLinkHashInline):
+ * platform/cf/BinaryPropertyList.cpp:
+ (WebCore::IntegerArrayHash::hash):
+ * platform/graphics/wx/FontPlatformDataWx.cpp:
+ (WebCore::FontPlatformData::computeHash):
+ * platform/network/ProtectionSpaceHash.h:
+ (WebCore::ProtectionSpaceHash::hash):
+
+2011-01-23 Patrick Gansterer <paroga at webkit.org>
+
Reviewed by David Kilzer.
Add an overload to base64Encode with String output
diff --git a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp b/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
index 7b20775..0c00ee6 100644
--- a/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
+++ b/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
@@ -89,7 +89,7 @@ static unsigned urlHostHash(const KURL& url)
unsigned hostStart = url.hostStart();
unsigned hostEnd = url.hostEnd();
- return AlreadyHashed::avoidDeletedValue(StringImpl::computeHash(url.string().characters() + hostStart, hostEnd - hostStart));
+ return AlreadyHashed::avoidDeletedValue(WTF::StringHasher::createHash(url.string().characters() + hostStart, hostEnd - hostStart));
}
ApplicationCacheGroup* ApplicationCacheStorage::loadCacheGroup(const KURL& manifestURL)
diff --git a/Source/WebCore/platform/LinkHash.cpp b/Source/WebCore/platform/LinkHash.cpp
index ac3aa3c..a2acad1 100644
--- a/Source/WebCore/platform/LinkHash.cpp
+++ b/Source/WebCore/platform/LinkHash.cpp
@@ -197,7 +197,7 @@ static inline bool needsTrailingSlash(const UChar* characters, unsigned length)
static ALWAYS_INLINE LinkHash visitedLinkHashInline(const UChar* url, unsigned length)
{
- return AlreadyHashed::avoidDeletedValue(StringImpl::computeHash(url, length));
+ return AlreadyHashed::avoidDeletedValue(WTF::StringHasher::createHash(url, length));
}
LinkHash visitedLinkHash(const UChar* url, unsigned length)
diff --git a/Source/WebCore/platform/cf/BinaryPropertyList.cpp b/Source/WebCore/platform/cf/BinaryPropertyList.cpp
index 27b44d4..41769e8 100644
--- a/Source/WebCore/platform/cf/BinaryPropertyList.cpp
+++ b/Source/WebCore/platform/cf/BinaryPropertyList.cpp
@@ -92,7 +92,7 @@ struct IntegerArrayHash {
unsigned IntegerArrayHash::hash(const IntegerArray& array)
{
- return StringImpl::computeHash(reinterpret_cast<const UChar*>(array.integers()), array.size() / (sizeof(int) / sizeof(UChar)));
+ return WTF::StringHasher::createBlobHash(array.integers(), array.size());
}
bool IntegerArrayHash::equal(const IntegerArray& a, const IntegerArray& b)
diff --git a/Source/WebCore/platform/graphics/wx/FontPlatformDataWx.cpp b/Source/WebCore/platform/graphics/wx/FontPlatformDataWx.cpp
index 66c69ee..d144a2c 100644
--- a/Source/WebCore/platform/graphics/wx/FontPlatformDataWx.cpp
+++ b/Source/WebCore/platform/graphics/wx/FontPlatformDataWx.cpp
@@ -126,7 +126,7 @@ unsigned FontPlatformData::computeHash() const
thisFont->GetStyle(),
thisFont->GetWeight(),
thisFont->GetUnderlined(),
- StringImpl::computeHash(thisFont->GetFaceName().utf8_str())
+ WTF::StringHasher::createHash(thisFont->GetFaceName().utf8_str())
};
return WTF::StringHasher::createBlobHash<sizeof(hashCodes)>(hashCodes);
diff --git a/Source/WebCore/platform/network/ProtectionSpaceHash.h b/Source/WebCore/platform/network/ProtectionSpaceHash.h
index 08716b5..9934321 100644
--- a/Source/WebCore/platform/network/ProtectionSpaceHash.h
+++ b/Source/WebCore/platform/network/ProtectionSpaceHash.h
@@ -42,11 +42,11 @@ struct ProtectionSpaceHash {
protectionSpace.realm().impl() ? protectionSpace.realm().impl()->hash() : 0
};
- unsigned codeCount = sizeof(hashCodes) / sizeof(UChar);
+ unsigned codeCount = sizeof(hashCodes);
// Ignore realm for proxies.
if (protectionSpace.isProxy())
- codeCount -= sizeof(hashCodes[0]) / sizeof(UChar);
- return StringImpl::computeHash(reinterpret_cast<UChar*>(hashCodes), codeCount);
+ codeCount -= sizeof(hashCodes[0]);
+ return WTF::StringHasher::createBlobHash(hashCodes, codeCount);
}
static bool equal(const ProtectionSpace& a, const ProtectionSpace& b) { return a == b; }
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list